summaryrefslogtreecommitdiff
path: root/backend/epjitsu.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-10-08 12:32:49 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-10-08 12:32:49 +0200
commitcfd27ef2ad8b005fd47ab41ef29b71d9e3d48201 (patch)
tree56cb8849a5df91b19b72fd4f48c79c343cd9bc5e /backend/epjitsu.h
parentba8d09abe681600aad991f4a75e904615b7ed29f (diff)
Imported Upstream version 1.0.25upstream/1.0.25
Diffstat (limited to 'backend/epjitsu.h')
-rw-r--r--backend/epjitsu.h49
1 files changed, 32 insertions, 17 deletions
diff --git a/backend/epjitsu.h b/backend/epjitsu.h
index ed63504..7bb1ccc 100644
--- a/backend/epjitsu.h
+++ b/backend/epjitsu.h
@@ -18,8 +18,7 @@ enum scanner_Option
OPT_MODE_GROUP,
OPT_SOURCE, /*adffront/adfback/adfduplex/fb*/
OPT_MODE, /*mono/gray/color*/
- OPT_X_RES,
- OPT_Y_RES,
+ OPT_RES,
OPT_GEOMETRY_GROUP,
OPT_TL_X,
@@ -56,7 +55,11 @@ struct image {
int width_bytes;
int height;
int pages;
-
+ int x_res;
+ int y_res;
+ int x_start_offset;
+ int x_offset_bytes;
+ int y_skip_offset;
unsigned char * buffer;
};
@@ -68,6 +71,8 @@ struct transfer {
int total_bytes;
int rx_bytes;
int done;
+ int x_res;
+ int y_res;
unsigned char * raw_data;
struct image * image;
@@ -77,6 +82,9 @@ struct page {
int bytes_total;
int bytes_scanned;
int bytes_read;
+ int lines_rx; /* received from scanner */
+ int lines_pass; /* passed thru from scanner to user (might be smaller than tx for 225dpi) */
+ int lines_tx; /* transmitted to user */
int done;
struct image *image;
};
@@ -94,15 +102,13 @@ struct scanner
int has_fb;
int has_adf;
- int x_res_150;
- int x_res_225;
- int x_res_300;
- int x_res_600;
+ int has_adf_duplex;
+
+ int min_res;
+ int max_res;
- int y_res_150;
- int y_res_225;
- int y_res_300;
- int y_res_600;
+ float white_factor[3];
+ int adf_height_padding;
/* the scan size in 1/1200th inches, NOT basic_units or sane units */
int max_x;
@@ -127,8 +133,7 @@ struct scanner
/*mode group, room for lineart, gray, color, null */
SANE_String_Const source_list[5];
SANE_String_Const mode_list[4];
- SANE_Int x_res_list[4];
- SANE_Int y_res_list[4];
+ SANE_Range res_range;
/*geometry group*/
SANE_Range tl_x_range;
@@ -151,9 +156,7 @@ struct scanner
/*mode group*/
int source; /* adf or fb */
int mode; /* color,lineart,etc */
- int res; /* from a limited list, x and y same */
- int resolution_x; /* unused dummy */
- int resolution_y; /* unused dummy */
+ int resolution; /* dpi */
/*geometry group*/
/* The desired size of the scan, all in 1/1200 inch */
@@ -213,6 +216,8 @@ struct scanner
/* the scan struct holds these larger numbers, but image buffer is unused */
struct {
int done;
+ int x_res;
+ int y_res;
int height;
int rx_bytes;
int width_bytes;
@@ -257,6 +262,9 @@ struct scanner
#define MODEL_NONE 0
#define MODEL_S300 1
#define MODEL_FI60F 2
+#define MODEL_S1100 3
+#define MODEL_S1300i 4
+#define MODEL_FI65F 5
#define USB_COMMAND_TIME 10000
#define USB_DATA_TIME 10000
@@ -278,6 +286,9 @@ struct scanner
#define WINDOW_SENDCAL 2
#define WINDOW_SCAN 3
+#define EPJITSU_PAPER_INGEST 1
+#define EPJITSU_PAPER_EJECT 0
+
/* ------------------------------------------------------------------------- */
#define MM_PER_UNIT_UNFIX SANE_UNFIX(SANE_FIX(MM_PER_INCH / 1200.0))
@@ -286,6 +297,9 @@ struct scanner
#define SCANNER_UNIT_TO_FIXED_MM(number) SANE_FIX((number) * MM_PER_UNIT_UNFIX)
#define FIXED_MM_TO_SCANNER_UNIT(number) SANE_UNFIX(number) / MM_PER_UNIT_UNFIX
+#define PIX_TO_SCANNER_UNIT(number, dpi) SANE_UNFIX(SANE_FIX((number) * 1200 / dpi ))
+#define SCANNER_UNIT_TO_PIX(number, dpi) SANE_UNFIX(SANE_FIX((number) * dpi / 1200 ))
+
#define CONFIG_FILE "epjitsu.conf"
#ifndef PATH_MAX
@@ -354,7 +368,8 @@ static SANE_Status destroy(struct scanner *s);
static SANE_Status teardown_buffers(struct scanner *s);
static SANE_Status setup_buffers(struct scanner *s);
-static SANE_Status ingest(struct scanner *s);
+static SANE_Status object_position(struct scanner *s, int ingest);
+static SANE_Status six5 (struct scanner *s);
static SANE_Status coarsecal(struct scanner *s);
static SANE_Status finecal(struct scanner *s);
static SANE_Status send_lut(struct scanner *s);