Fixed coding-style.

Henning Meier-Geinitz <henning@meier-geinitz.de>
DEVEL_2_0_BRANCH-1
Henning Geinitz 2002-04-10 19:09:50 +00:00
rodzic 4fd19494cb
commit 3862186fb0
7 zmienionych plików z 2162 dodań i 2351 usunięć

Plik diff jest za duży Load Diff

Plik diff jest za duży Load Diff

Wyświetl plik

@ -60,49 +60,47 @@
struct Mustek_Usb_Device;
typedef SANE_Status
(* Powerdelay_Function) (ma1017 *, SANE_Byte);
typedef SANE_Status (*Powerdelay_Function) (ma1017 *, SANE_Byte);
typedef SANE_Status
(* Getline_Function) (struct Mustek_Usb_Device * dev, SANE_Byte *,
SANE_Bool is_order_invert);
(*Getline_Function) (struct Mustek_Usb_Device * dev, SANE_Byte *,
SANE_Bool is_order_invert);
typedef SANE_Status
(* Backtrack_Function) (struct Mustek_Usb_Device * dev);
typedef SANE_Status (*Backtrack_Function) (struct Mustek_Usb_Device * dev);
typedef enum Colormode
{
RGB48=0,
RGB42=1,
RGB36=2,
RGB30=3,
RGB24=4,
GRAY16=5,
GRAY14=6,
GRAY12=7,
GRAY10=8,
GRAY8=9,
TEXT=10,
RGB48EXT=11,
RGB42EXT=12,
RGB36EXT=13,
RGB30EXT=14,
RGB24EXT=15,
GRAY16EXT=16,
GRAY14EXT=17,
GRAY12EXT=18,
GRAY10EXT=19,
GRAY8EXT=20,
TEXTEXT=21
}
RGB48 = 0,
RGB42 = 1,
RGB36 = 2,
RGB30 = 3,
RGB24 = 4,
GRAY16 = 5,
GRAY14 = 6,
GRAY12 = 7,
GRAY10 = 8,
GRAY8 = 9,
TEXT = 10,
RGB48EXT = 11,
RGB42EXT = 12,
RGB36EXT = 13,
RGB30EXT = 14,
RGB24EXT = 15,
GRAY16EXT = 16,
GRAY14EXT = 17,
GRAY12EXT = 18,
GRAY10EXT = 19,
GRAY8EXT = 20,
TEXTEXT = 21
}
Colormode;
typedef enum Signal_State
{
SS_UNKNOWN=0,
SS_BRIGHTER=1,
SS_DARKER=2,
SS_EQUAL=3
SS_UNKNOWN = 0,
SS_BRIGHTER = 1,
SS_DARKER = 2,
SS_EQUAL = 3
}
Signal_State;
@ -110,11 +108,11 @@ typedef struct Calibrator
{
/* Calibration Data */
SANE_Bool is_prepared;
SANE_Word* k_white;
SANE_Word* k_dark;
SANE_Word *k_white;
SANE_Word *k_dark;
/* Working Buffer */
double* white_line;
double* dark_line;
double *white_line;
double *dark_line;
SANE_Int *white_buffer;
/* Necessary Parameters */
SANE_Word k_white_level;
@ -127,34 +125,34 @@ typedef struct Calibrator
SANE_Word max_width;
SANE_Word width;
SANE_Word threshold;
SANE_Word* gamma_table;
SANE_Word *gamma_table;
SANE_Byte calibrator_type;
}
Calibrator;
enum Mustek_Usb_Modes
{
MUSTEK_USB_MODE_LINEART=0,
MUSTEK_USB_MODE_LINEART = 0,
MUSTEK_USB_MODE_GRAY,
MUSTEK_USB_MODE_COLOR
};
enum Mustek_Usb_Option
{
OPT_NUM_OPTS = 0,
OPT_MODE_GROUP,
OPT_MODE,
OPT_RESOLUTION,
OPT_PREVIEW,
OPT_GEOMETRY_GROUP, /* 5 */
OPT_GEOMETRY_GROUP, /* 5 */
OPT_TL_X, /* top-left x */
OPT_TL_Y, /* top-left y */
OPT_BR_X, /* bottom-right x */
OPT_BR_Y, /* bottom-right y */
OPT_ENHANCEMENT_GROUP, /* 10 */
OPT_ENHANCEMENT_GROUP, /* 10 */
OPT_BRIGHTNESS,
OPT_CUSTOM_GAMMA,
OPT_GAMMA_VECTOR,
@ -182,11 +180,11 @@ typedef struct Mustek_Usb_Device
SANE_Range dpi_range;
SANE_Range x_range;
SANE_Range y_range;
/* max width & max height in 300 dpi*/
/* max width & max height in 300 dpi */
SANE_Int max_width;
SANE_Int max_height;
ma1017 * chip; /* registers of the scanner controller chip */
ma1017 *chip; /* registers of the scanner controller chip */
Colormode scan_mode;
SANE_Word x_dpi;
@ -233,7 +231,7 @@ typedef struct Mustek_Usb_Device
double init_green_black_factor;
double init_blue_black_factor;
double init_red_black_factor;
double init_gray_black_factor;
double init_gray_black_factor;
double init_green_factor;
double init_blue_factor;
double init_red_factor;
@ -261,16 +259,16 @@ typedef struct Mustek_Usb_Device
SANE_Byte init_green_mono_300_power_delay;
SANE_Byte init_blue_mono_300_power_delay;
SANE_Byte init_threshold;
SANE_Byte init_top_ref;
SANE_Byte init_front_end;
SANE_Byte init_red_offset;
SANE_Byte init_green_offset;
SANE_Byte init_blue_offset;
SANE_Int init_rgb_24_back_track;
SANE_Int init_mono_8_back_track;
SANE_Bool is_open;
SANE_Bool is_prepared;
SANE_Word expose_time;
@ -309,7 +307,7 @@ typedef struct Mustek_Usb_Device
SANE_Byte blue_mono_300_power_delay;
SANE_Word pixel_rate;
SANE_Byte threshold;
SANE_Word * gamma_table;
SANE_Word *gamma_table;
SANE_Word skips_per_row;
/* CCD */
@ -332,12 +330,12 @@ typedef struct Mustek_Usb_Scanner
{
/* all the state needed to define a scan request: */
struct Mustek_Usb_Scanner *next;
SANE_Option_Descriptor opt[NUM_OPTIONS];
Option_Value val[NUM_OPTIONS];
SANE_Int channels;
/* scan window in inches: top left x+y and width+height */
double tl_x;
double tl_y;
@ -379,8 +377,7 @@ static SANE_Status
usb_high_cal_init (Calibrator * cal, SANE_Byte type, SANE_Word target_white,
SANE_Word target_dark);
static SANE_Status
usb_high_cal_exit (Calibrator * cal);
static SANE_Status usb_high_cal_exit (Calibrator * cal);
static SANE_Status
usb_high_cal_embed_gamma (Calibrator * cal, SANE_Word * gamma_table);
@ -391,8 +388,8 @@ usb_high_cal_prepare (Calibrator * cal, SANE_Word max_width);
static SANE_Status
usb_high_cal_setup (Calibrator * cal, SANE_Word major_average,
SANE_Word minor_average, SANE_Word filter,
SANE_Word width, SANE_Word* white_needed,
SANE_Word* dark_needed);
SANE_Word width, SANE_Word * white_needed,
SANE_Word * dark_needed);
static SANE_Status
usb_high_cal_evaluate_white (Calibrator * cal, double factor);
@ -400,64 +397,58 @@ usb_high_cal_evaluate_white (Calibrator * cal, double factor);
static SANE_Status
usb_high_cal_evaluate_dark (Calibrator * cal, double factor);
static SANE_Status
usb_high_cal_evaluate_calibrator (Calibrator * cal);
static SANE_Status usb_high_cal_evaluate_calibrator (Calibrator * cal);
static SANE_Status
usb_high_cal_fill_in_white (Calibrator * cal, SANE_Word major,
SANE_Word minor, void * white_pattern);
SANE_Word minor, void *white_pattern);
static SANE_Status
usb_high_cal_fill_in_dark (Calibrator * cal, SANE_Word major,
SANE_Word minor, void * dark_pattern);
SANE_Word minor, void *dark_pattern);
static SANE_Status
usb_high_cal_calibrate (Calibrator * cal, void * src, void * target);
usb_high_cal_calibrate (Calibrator * cal, void *src, void *target);
static SANE_Status
usb_high_cal_i8o8_fill_in_white (Calibrator * cal, SANE_Word major,
SANE_Word minor, void * white_pattern);
SANE_Word minor, void *white_pattern);
static SANE_Status
usb_high_cal_i8o8_fill_in_dark (Calibrator * cal, SANE_Word major,
SANE_Word minor, void * dark_pattern);
usb_high_cal_i8o8_fill_in_dark (Calibrator * cal, SANE_Word major,
SANE_Word minor, void *dark_pattern);
static SANE_Status
usb_high_cal_i8o8_mono_calibrate (Calibrator * cal, void * src, void * target);
usb_high_cal_i8o8_mono_calibrate (Calibrator * cal, void *src, void *target);
static SANE_Status
usb_high_cal_i8o8_rgb_calibrate (Calibrator * cal, void * src, void * target);
usb_high_cal_i8o8_rgb_calibrate (Calibrator * cal, void *src, void *target);
static SANE_Status
usb_high_cal_i4o1_fill_in_white (Calibrator * cal, SANE_Word major,
SANE_Word minor, void * white_pattern);
usb_high_cal_i4o1_fill_in_white (Calibrator * cal, SANE_Word major,
SANE_Word minor, void *white_pattern);
static SANE_Status
usb_high_cal_i4o1_fill_in_dark (Calibrator * cal, SANE_Word major,
SANE_Word minor, void * dark_pattern);
SANE_Word minor, void *dark_pattern);
static SANE_Status
usb_high_cal_i4o1_calibrate (Calibrator * cal, void * src, void * target);
usb_high_cal_i4o1_calibrate (Calibrator * cal, void *src, void *target);
/* -------------------- scanning function declarations -------------------- */
static SANE_Status
usb_high_scan_init (Mustek_Usb_Device * dev);
static SANE_Status usb_high_scan_init (Mustek_Usb_Device * dev);
static SANE_Status usb_high_scan_exit (Mustek_Usb_Device * dev);
static SANE_Status usb_high_scan_prepare (Mustek_Usb_Device * dev);
static SANE_Status usb_high_scan_clearup (Mustek_Usb_Device * dev);
static SANE_Status
usb_high_scan_exit (Mustek_Usb_Device * dev);
static SANE_Status
usb_high_scan_prepare (Mustek_Usb_Device * dev);
static SANE_Status
usb_high_scan_clearup (Mustek_Usb_Device * dev);
static SANE_Status
usb_high_scan_turn_power (Mustek_Usb_Device * dev, SANE_Bool is_on);
static SANE_Status
usb_high_scan_back_home (Mustek_Usb_Device * dev);
static SANE_Status usb_high_scan_back_home (Mustek_Usb_Device * dev);
static SANE_Status
usb_high_scan_set_threshold (Mustek_Usb_Device * dev, SANE_Byte threshold);
@ -465,19 +456,17 @@ usb_high_scan_set_threshold (Mustek_Usb_Device * dev, SANE_Byte threshold);
static SANE_Status
usb_high_scan_embed_gamma (Mustek_Usb_Device * dev, SANE_Word * gamma_table);
static SANE_Status
usb_high_scan_reset (Mustek_Usb_Device * dev);
static SANE_Status usb_high_scan_reset (Mustek_Usb_Device * dev);
static SANE_Status
usb_high_scan_suggest_parameters (Mustek_Usb_Device * dev, SANE_Word dpi,
SANE_Word x, SANE_Word y, SANE_Word width,
SANE_Word height, Colormode color_mode);
static SANE_Status
usb_high_scan_detect_sensor (Mustek_Usb_Device *dev);
static SANE_Status usb_high_scan_detect_sensor (Mustek_Usb_Device * dev);
static SANE_Status
static SANE_Status
usb_high_scan_setup_scan (Mustek_Usb_Device * dev, Colormode color_mode,
SANE_Word x_dpi, SANE_Word y_dpi,
SANE_Word x_dpi, SANE_Word y_dpi,
SANE_Bool is_invert, SANE_Word x, SANE_Word y,
SANE_Word width);
@ -485,8 +474,7 @@ static SANE_Status
usb_high_scan_get_rows (Mustek_Usb_Device * dev, SANE_Byte * block,
SANE_Word rows, SANE_Bool is_order_invert);
static SANE_Status
usb_high_scan_stop_scan (Mustek_Usb_Device * dev);
static SANE_Status usb_high_scan_stop_scan (Mustek_Usb_Device * dev);
static SANE_Status
usb_high_scan_step_forward (Mustek_Usb_Device * dev, SANE_Int step_count);
@ -497,29 +485,26 @@ usb_high_scan_safe_forward (Mustek_Usb_Device * dev, SANE_Int step_count);
static SANE_Status
usb_high_scan_init_asic (Mustek_Usb_Device * dev, Sensor_Type sensor);
static SANE_Status
usb_high_scan_wait_carriage_home (Mustek_Usb_Device * dev);
static SANE_Status usb_high_scan_wait_carriage_home (Mustek_Usb_Device * dev);
static SANE_Status
static SANE_Status
usb_high_scan_hardware_calibration (Mustek_Usb_Device * dev);
static SANE_Status
usb_high_scan_line_calibration (Mustek_Usb_Device * dev);
static SANE_Status usb_high_scan_line_calibration (Mustek_Usb_Device * dev);
static SANE_Status
usb_high_scan_prepare_scan (Mustek_Usb_Device * dev);
static SANE_Status usb_high_scan_prepare_scan (Mustek_Usb_Device * dev);
static SANE_Word
usb_high_scan_calculate_max_rgb_600_expose (Mustek_Usb_Device * dev,
SANE_Byte* ideal_red_pd,
SANE_Byte* ideal_green_pd,
SANE_Byte* ideal_blue_pd);
static SANE_Word
usb_high_scan_calculate_max_rgb_600_expose (Mustek_Usb_Device * dev,
SANE_Byte * ideal_red_pd,
SANE_Byte * ideal_green_pd,
SANE_Byte * ideal_blue_pd);
static SANE_Word
static SANE_Word
usb_high_scan_calculate_max_mono_600_expose (Mustek_Usb_Device * dev,
SANE_Byte* ideal_red_pd,
SANE_Byte* ideal_green_pd,
SANE_Byte* ideal_blue_pd);
SANE_Byte * ideal_red_pd,
SANE_Byte * ideal_green_pd,
SANE_Byte * ideal_blue_pd);
static SANE_Status
usb_high_scan_prepare_rgb_signal_600_dpi (Mustek_Usb_Device * dev);
@ -527,17 +512,17 @@ usb_high_scan_prepare_rgb_signal_600_dpi (Mustek_Usb_Device * dev);
static SANE_Status
usb_high_scan_prepare_mono_signal_600_dpi (Mustek_Usb_Device * dev);
static SANE_Word
static SANE_Word
usb_high_scan_calculate_max_rgb_300_expose (Mustek_Usb_Device * dev,
SANE_Byte* ideal_red_pd,
SANE_Byte* ideal_green_pd,
SANE_Byte* ideal_blue_pd);
SANE_Byte * ideal_red_pd,
SANE_Byte * ideal_green_pd,
SANE_Byte * ideal_blue_pd);
static SANE_Word
static SANE_Word
usb_high_scan_calculate_max_mono_300_expose (Mustek_Usb_Device * dev,
SANE_Byte* ideal_red_pd,
SANE_Byte* ideal_green_pd,
SANE_Byte* ideal_blue_pd);
SANE_Byte * ideal_red_pd,
SANE_Byte * ideal_green_pd,
SANE_Byte * ideal_blue_pd);
static SANE_Status
usb_high_scan_prepare_rgb_signal_300_dpi (Mustek_Usb_Device * dev);
@ -549,14 +534,15 @@ static SANE_Status
usb_high_scan_evaluate_max_level (Mustek_Usb_Device * dev,
SANE_Word sample_lines,
SANE_Int sample_length,
SANE_Byte *ret_max_level);
SANE_Byte * ret_max_level);
static SANE_Status
static SANE_Status
usb_high_scan_bssc_power_delay (Mustek_Usb_Device * dev,
Powerdelay_Function set_power_delay,
Signal_State* signal_state, SANE_Byte* target,
SANE_Byte max, SANE_Byte min,
SANE_Byte threshold, SANE_Int length);
Signal_State * signal_state,
SANE_Byte * target, SANE_Byte max,
SANE_Byte min, SANE_Byte threshold,
SANE_Int length);
static SANE_Status
usb_high_scan_adjust_rgb_600_power_delay (Mustek_Usb_Device * dev);
@ -588,17 +574,13 @@ usb_high_scan_adjust_mono_300_power_delay (Mustek_Usb_Device * dev);
static SANE_Status
usb_high_scan_evaluate_pixel_rate (Mustek_Usb_Device * dev);
static SANE_Status
usb_high_scan_calibration_rgb_24 (Mustek_Usb_Device * dev);
static SANE_Status usb_high_scan_calibration_rgb_24 (Mustek_Usb_Device * dev);
static SANE_Status
usb_high_scan_calibration_mono_8 (Mustek_Usb_Device * dev);
static SANE_Status usb_high_scan_calibration_mono_8 (Mustek_Usb_Device * dev);
static SANE_Status
usb_high_scan_prepare_rgb_24 (Mustek_Usb_Device * dev);
static SANE_Status usb_high_scan_prepare_rgb_24 (Mustek_Usb_Device * dev);
static SANE_Status
usb_high_scan_prepare_mono_8 (Mustek_Usb_Device * dev);
static SANE_Status usb_high_scan_prepare_mono_8 (Mustek_Usb_Device * dev);
static SANE_Status
usb_high_scan_get_rgb_24_bit_line (Mustek_Usb_Device * dev,
@ -610,10 +592,8 @@ usb_high_scan_get_mono_8_bit_line (Mustek_Usb_Device * dev,
SANE_Byte * line,
SANE_Bool is_order_invert);
static SANE_Status
usb_high_scan_backtrack_rgb_24 (Mustek_Usb_Device * dev);
static SANE_Status usb_high_scan_backtrack_rgb_24 (Mustek_Usb_Device * dev);
static SANE_Status
usb_high_scan_backtrack_mono_8 (Mustek_Usb_Device * dev);
static SANE_Status usb_high_scan_backtrack_mono_8 (Mustek_Usb_Device * dev);
#endif /* mustek_usb_high_h */

Plik diff jest za duży Load Diff

Wyświetl plik

@ -83,23 +83,23 @@ Mustek_Type;
typedef enum Sensor_Type
{
ST_NONE=0,
ST_INI=1,
ST_INI_DARK=2,
ST_CANON300=3,
ST_CANON600=4,
ST_TOSHIBA600=5,
ST_CANON300600=6,
ST_NEC600=7
}
ST_NONE = 0,
ST_INI = 1,
ST_INI_DARK = 2,
ST_CANON300 = 3,
ST_CANON600 = 4,
ST_TOSHIBA600 = 5,
ST_CANON300600 = 6,
ST_NEC600 = 7
}
Sensor_Type;
typedef enum Motor_Type
{
MT_NONE=0,
MT_600=1,
MT_1200=2
}
MT_NONE = 0,
MT_600 = 1,
MT_1200 = 2
}
Motor_Type;
struct ma1017;
@ -168,8 +168,8 @@ typedef struct ma1017
SANE_Byte serial_length;
/* Use for Rowing */
SANE_Status (*get_row) (struct ma1017 * chip, SANE_Byte * row,
SANE_Word *lines_left);
SANE_Status (*get_row) (struct ma1017 * chip, SANE_Byte * row,
SANE_Word * lines_left);
SANE_Word cmt_table_length_word;
SANE_Word cmt_second_pos_word;
@ -227,11 +227,9 @@ Sampleway;
/* ------------------------- function declarations ------------------------ */
static SANE_Status
usb_low_init (ma1017 ** chip);
static SANE_Status usb_low_init (ma1017 ** chip);
static SANE_Status
usb_low_exit (ma1017 * chip);
static SANE_Status usb_low_exit (ma1017 * chip);
/* Register read and write functions */
/* A0 ~ A1 */
@ -240,89 +238,68 @@ usb_low_set_cmt_table (ma1017 * chip, SANE_Int index, Channel channel,
SANE_Bool is_move_motor, SANE_Bool is_transfer);
/* A2 */
static SANE_Status
usb_low_get_a2 (ma1017 * chip, SANE_Byte *value);
static SANE_Status usb_low_get_a2 (ma1017 * chip, SANE_Byte * value);
static SANE_Status
usb_low_start_cmt_table (ma1017 * chip);
static SANE_Status usb_low_start_cmt_table (ma1017 * chip);
static SANE_Status
usb_low_stop_cmt_table (ma1017 * chip);
static SANE_Status usb_low_stop_cmt_table (ma1017 * chip);
static SANE_Status
usb_low_set_test_sram_mode (ma1017 * chip, SANE_Bool is_test);
static SANE_Status
usb_low_set_fix_pattern (ma1017 * chip, SANE_Bool is_fix);
static SANE_Status usb_low_set_fix_pattern (ma1017 * chip, SANE_Bool is_fix);
/* A3 */
static SANE_Status
usb_low_adjust_timing (ma1017 * chip, SANE_Byte data);
static SANE_Status usb_low_adjust_timing (ma1017 * chip, SANE_Byte data);
/* A4 */
static SANE_Status
usb_low_get_a4 (ma1017 * chip, SANE_Byte *value);
static SANE_Status usb_low_get_a4 (ma1017 * chip, SANE_Byte * value);
static SANE_Status
usb_low_select_timing (ma1017 * chip, SANE_Byte data);
static SANE_Status usb_low_select_timing (ma1017 * chip, SANE_Byte data);
static SANE_Status
usb_low_turn_frontend_mode (ma1017 * chip, SANE_Bool is_on);
/* A6 */
static SANE_Status
usb_low_get_a6 (ma1017 * chip, SANE_Byte *value);
static SANE_Status usb_low_get_a6 (ma1017 * chip, SANE_Byte * value);
static SANE_Status
usb_low_set_asic_io_pins (ma1017 * chip, SANE_Byte data);
static SANE_Status usb_low_set_asic_io_pins (ma1017 * chip, SANE_Byte data);
static SANE_Status
usb_low_set_rgb_sel_pins (ma1017 * chip, SANE_Byte data);
static SANE_Status usb_low_set_rgb_sel_pins (ma1017 * chip, SANE_Byte data);
/* A7 */
static SANE_Status
usb_low_get_a7 (ma1017 * chip, SANE_Byte *value);
static SANE_Status usb_low_get_a7 (ma1017 * chip, SANE_Byte * value);
static SANE_Status
usb_low_set_timing (ma1017 * chip, SANE_Byte data);
static SANE_Status usb_low_set_timing (ma1017 * chip, SANE_Byte data);
static SANE_Status
usb_low_set_sram_bank (ma1017 * chip, Banksize banksize);
static SANE_Status usb_low_set_sram_bank (ma1017 * chip, Banksize banksize);
/* A8 */
static SANE_Status
usb_low_get_a8 (ma1017 * chip, SANE_Byte *value);
static SANE_Status usb_low_get_a8 (ma1017 * chip, SANE_Byte * value);
static SANE_Status
usb_low_set_cmt_table_length (ma1017 * chip, SANE_Byte table_length);
/* A9 */
static SANE_Status
usb_low_get_a9 (ma1017 * chip, SANE_Byte *value);
static SANE_Status usb_low_get_a9 (ma1017 * chip, SANE_Byte * value);
static SANE_Status
usb_low_set_cmt_second_position (ma1017 * chip, SANE_Byte position);
/* A10 + A8ID5 */
static SANE_Status
usb_low_get_a10 (ma1017 * chip, SANE_Byte *value);
static SANE_Status usb_low_get_a10 (ma1017 * chip, SANE_Byte * value);
static SANE_Status
usb_low_set_ccd_width (ma1017 * chip, SANE_Word ccd_width);
static SANE_Status usb_low_set_ccd_width (ma1017 * chip, SANE_Word ccd_width);
/* A11 + A8ID6 */
static SANE_Status
usb_low_get_a11 (ma1017 * chip, SANE_Byte *value);
static SANE_Status usb_low_get_a11 (ma1017 * chip, SANE_Byte * value);
static SANE_Status
usb_low_set_dummy (ma1017 * chip, SANE_Word dummy);
static SANE_Status usb_low_set_dummy (ma1017 * chip, SANE_Word dummy);
/* A12 + A13 */
static SANE_Status
usb_low_get_a12 (ma1017 * chip, SANE_Byte *value);
static SANE_Status usb_low_get_a12 (ma1017 * chip, SANE_Byte * value);
static SANE_Status
usb_low_get_a13 (ma1017 * chip, SANE_Byte *value);
static SANE_Status usb_low_get_a13 (ma1017 * chip, SANE_Byte * value);
static SANE_Status
usb_low_set_image_byte_width (ma1017 * chip, SANE_Word row_size);
@ -335,147 +312,115 @@ static SANE_Status
usb_low_set_cmt_loop_count (ma1017 * chip, SANE_Word loop_count);
/* A15 */
static SANE_Status
usb_low_get_a15 (ma1017 * chip, SANE_Byte *value);
static SANE_Status usb_low_get_a15 (ma1017 * chip, SANE_Byte * value);
static SANE_Status
usb_low_enable_motor (ma1017 * chip, SANE_Bool is_enable);
static SANE_Status usb_low_enable_motor (ma1017 * chip, SANE_Bool is_enable);
static SANE_Status
usb_low_set_motor_movement (ma1017 * chip, SANE_Bool is_full_step,
SANE_Bool is_double_phase, SANE_Bool is_two_step);
static SANE_Status
usb_low_set_motor_signal (ma1017 * chip, SANE_Byte signal);
static SANE_Status usb_low_set_motor_signal (ma1017 * chip, SANE_Byte signal);
static SANE_Status
usb_low_set_motor_direction (ma1017 * chip, SANE_Bool is_backward);
static SANE_Status
usb_low_move_motor_home (ma1017 * chip, SANE_Bool is_home,
usb_low_move_motor_home (ma1017 * chip, SANE_Bool is_home,
SANE_Bool is_backward);
/* A16 */
static SANE_Status
usb_low_get_a16 (ma1017 * chip, SANE_Byte *value);
static SANE_Status usb_low_get_a16 (ma1017 * chip, SANE_Byte * value);
static SANE_Status
usb_low_set_image_dpi (ma1017 * chip, SANE_Bool is_optical600,
usb_low_set_image_dpi (ma1017 * chip, SANE_Bool is_optical600,
Sampleway sampleway);
static SANE_Status
usb_low_set_pixel_depth (ma1017 * chip, Pixeldepth pixeldepth);
static SANE_Status
usb_low_invert_image (ma1017 * chip, SANE_Bool is_invert);
static SANE_Status usb_low_invert_image (ma1017 * chip, SANE_Bool is_invert);
/* A17 + A18 + A19 */
static SANE_Status
usb_low_get_a17 (ma1017 * chip, SANE_Byte *value);
static SANE_Status usb_low_get_a17 (ma1017 * chip, SANE_Byte * value);
static SANE_Status
usb_low_get_a18 (ma1017 * chip, SANE_Byte *value);
static SANE_Status usb_low_get_a18 (ma1017 * chip, SANE_Byte * value);
static SANE_Status
usb_low_get_a19 (ma1017 * chip, SANE_Byte *value);
static SANE_Status usb_low_get_a19 (ma1017 * chip, SANE_Byte * value);
static SANE_Status
usb_low_set_red_ref (ma1017 * chip, SANE_Byte red_ref);
static SANE_Status usb_low_set_red_ref (ma1017 * chip, SANE_Byte red_ref);
static SANE_Status
usb_low_set_green_ref (ma1017 * chip, SANE_Byte green_ref);
static SANE_Status usb_low_set_green_ref (ma1017 * chip, SANE_Byte green_ref);
static SANE_Status
usb_low_set_blue_ref (ma1017 * chip, SANE_Byte blue_ref);
static SANE_Status usb_low_set_blue_ref (ma1017 * chip, SANE_Byte blue_ref);
/* A20 + A21 + A22 */
static SANE_Status
usb_low_get_a20 (ma1017 * chip, SANE_Byte *value);
static SANE_Status usb_low_get_a20 (ma1017 * chip, SANE_Byte * value);
static SANE_Status
usb_low_get_a21 (ma1017 * chip, SANE_Byte *value);
static SANE_Status usb_low_get_a21 (ma1017 * chip, SANE_Byte * value);
static SANE_Status
usb_low_get_a22 (ma1017 * chip, SANE_Byte *value);
static SANE_Status usb_low_get_a22 (ma1017 * chip, SANE_Byte * value);
static SANE_Status
usb_low_set_red_pd (ma1017 * chip, SANE_Byte red_pd);
static SANE_Status usb_low_set_red_pd (ma1017 * chip, SANE_Byte red_pd);
static SANE_Status
usb_low_set_green_pd (ma1017 * chip, SANE_Byte green_pd);
static SANE_Status usb_low_set_green_pd (ma1017 * chip, SANE_Byte green_pd);
static SANE_Status
usb_low_set_blue_pd (ma1017 * chip, SANE_Byte blue_pd);
static SANE_Status usb_low_set_blue_pd (ma1017 * chip, SANE_Byte blue_pd);
/* A23 */
static SANE_Status
usb_low_get_a23 (ma1017 * chip, SANE_Byte *value);
static SANE_Status usb_low_get_a23 (ma1017 * chip, SANE_Byte * value);
static SANE_Status
usb_low_turn_peripheral_power (ma1017 * chip, SANE_Bool is_on);
static SANE_Status
usb_low_turn_lamp_power (ma1017 * chip, SANE_Bool is_on);
static SANE_Status usb_low_turn_lamp_power (ma1017 * chip, SANE_Bool is_on);
static SANE_Status
usb_low_set_io_3 (ma1017 * chip, SANE_Bool is_high);
static SANE_Status usb_low_set_io_3 (ma1017 * chip, SANE_Bool is_high);
static SANE_Status
usb_low_set_led_light_all (ma1017 * chip, SANE_Bool is_light_all);
/* A24 */
static SANE_Status
usb_low_get_a24 (ma1017 * chip, SANE_Byte *value);
static SANE_Status usb_low_get_a24 (ma1017 * chip, SANE_Byte * value);
static SANE_Status
usb_low_set_ad_timing (ma1017 * chip, SANE_Byte pattern);
static SANE_Status usb_low_set_ad_timing (ma1017 * chip, SANE_Byte pattern);
/* A25 + A26 */
static SANE_Status
usb_low_set_serial_byte1 (ma1017 * chip, SANE_Byte data);
static SANE_Status usb_low_set_serial_byte1 (ma1017 * chip, SANE_Byte data);
static SANE_Status
usb_low_set_serial_byte2 (ma1017 * chip, SANE_Byte data);
static SANE_Status usb_low_set_serial_byte2 (ma1017 * chip, SANE_Byte data);
/* A27 */
static SANE_Status
usb_low_get_a27 (ma1017 * chip, SANE_Byte *value);
static SANE_Status usb_low_get_a27 (ma1017 * chip, SANE_Byte * value);
static SANE_Status
usb_low_set_serial_format (ma1017 * chip, SANE_Byte data);
static SANE_Status usb_low_set_serial_format (ma1017 * chip, SANE_Byte data);
/* A31 */
static SANE_Status
usb_low_get_home_sensor (ma1017 * chip);
static SANE_Status usb_low_get_home_sensor (ma1017 * chip);
/* Special Mode */
static SANE_Status
usb_low_start_rowing (ma1017 * chip);
static SANE_Status usb_low_start_rowing (ma1017 * chip);
static SANE_Status
usb_low_stop_rowing (ma1017 * chip);
static SANE_Status usb_low_stop_rowing (ma1017 * chip);
static SANE_Status
usb_low_wait_rowing_stop (ma1017 * chip);
static SANE_Status usb_low_wait_rowing_stop (ma1017 * chip);
/* Global functions */
static SANE_Status
usb_low_read_all_registers (ma1017 * chip);
static SANE_Status usb_low_read_all_registers (ma1017 * chip);
static SANE_Status
usb_low_get_row (ma1017 * chip, SANE_Byte * data, SANE_Word *lines_left);
usb_low_get_row (ma1017 * chip, SANE_Byte * data, SANE_Word * lines_left);
static SANE_Status
usb_low_get_row_direct (ma1017 * chip, SANE_Byte * data,
SANE_Word *lines_left);
SANE_Word * lines_left);
static SANE_Status
usb_low_get_row_resample (ma1017 * chip, SANE_Byte * data,
SANE_Word *lines_left);
usb_low_get_row_resample (ma1017 * chip, SANE_Byte * data,
SANE_Word * lines_left);
/* Direct access */
static SANE_Status
usb_low_wait_rowing (ma1017 * chip);
static SANE_Status usb_low_wait_rowing (ma1017 * chip);
static SANE_Status
usb_low_read_rows (ma1017 * chip, SANE_Byte * data, SANE_Word byte_count);
@ -484,15 +429,13 @@ static SANE_Status
usb_low_write_reg (ma1017 * chip, SANE_Byte reg_no, SANE_Byte data);
static SANE_Status
usb_low_read_reg (ma1017 * chip, SANE_Byte reg_no, SANE_Byte *data);
usb_low_read_reg (ma1017 * chip, SANE_Byte reg_no, SANE_Byte * data);
static SANE_Status
usb_low_identify_scanner (SANE_Int fd, Mustek_Type *scanner_type);
usb_low_identify_scanner (SANE_Int fd, Mustek_Type * scanner_type);
static SANE_Status
usb_low_open (ma1017 * chip, const char * devname);
static SANE_Status usb_low_open (ma1017 * chip, const char *devname);
static SANE_Status
usb_low_close (ma1017 * chip);
static SANE_Status usb_low_close (ma1017 * chip);
#endif /* defined mustek_usb_low_h */

Plik diff jest za duży Load Diff

Wyświetl plik

@ -45,7 +45,7 @@
This file implements a SANE backend for Mustek 1200UB and similar
USB flatbed scanners. */
#ifndef mustek_usb_mid_h
#define mustek_usb_mid_h
@ -57,252 +57,175 @@
/* ---------------- sensor NEC 600 CCD function declarations -------------- */
static SANE_Status
usb_mid_n600_prepare_rgb (ma1017 * chip, SANE_Word dpi);
static SANE_Status usb_mid_n600_prepare_rgb (ma1017 * chip, SANE_Word dpi);
static SANE_Status
usb_mid_n600_prepare_mono (ma1017 * chip, SANE_Word dpi);
static SANE_Status usb_mid_n600_prepare_mono (ma1017 * chip, SANE_Word dpi);
static SANE_Status
usb_mid_n600_prepare_rgb_600_dpi (ma1017 * chip);
static SANE_Status usb_mid_n600_prepare_rgb_600_dpi (ma1017 * chip);
static SANE_Status
usb_mid_n600_prepare_rgb_400_dpi (ma1017 * chip);
static SANE_Status usb_mid_n600_prepare_rgb_400_dpi (ma1017 * chip);
static SANE_Status
usb_mid_n600_prepare_rgb_300_dpi (ma1017 * chip);
static SANE_Status usb_mid_n600_prepare_rgb_300_dpi (ma1017 * chip);
static SANE_Status
usb_mid_n600_prepare_rgb_200_dpi (ma1017 * chip);
static SANE_Status usb_mid_n600_prepare_rgb_200_dpi (ma1017 * chip);
static SANE_Status
usb_mid_n600_prepare_rgb_100_dpi (ma1017 * chip);
static SANE_Status usb_mid_n600_prepare_rgb_100_dpi (ma1017 * chip);
static SANE_Status
usb_mid_n600_prepare_rgb_50_dpi (ma1017 * chip);
static SANE_Status usb_mid_n600_prepare_rgb_50_dpi (ma1017 * chip);
static SANE_Status
usb_mid_n600_prepare_mono_600_dpi (ma1017 * chip);
static SANE_Status usb_mid_n600_prepare_mono_600_dpi (ma1017 * chip);
static SANE_Status
usb_mid_n600_prepare_mono_400_dpi (ma1017 * chip);
static SANE_Status usb_mid_n600_prepare_mono_400_dpi (ma1017 * chip);
static SANE_Status
usb_mid_n600_prepare_mono_300_dpi (ma1017 * chip);
static SANE_Status usb_mid_n600_prepare_mono_300_dpi (ma1017 * chip);
static SANE_Status
usb_mid_n600_prepare_mono_200_dpi (ma1017 * chip);
static SANE_Status usb_mid_n600_prepare_mono_200_dpi (ma1017 * chip);
static SANE_Status
usb_mid_n600_prepare_mono_100_dpi (ma1017 * chip);
static SANE_Status usb_mid_n600_prepare_mono_100_dpi (ma1017 * chip);
static SANE_Status
usb_mid_n600_prepare_mono_50_dpi (ma1017 * chip);
static SANE_Status usb_mid_n600_prepare_mono_50_dpi (ma1017 * chip);
/* ----------------- sensor 600 CIS function declarations ----------------- */
static SANE_Status
usb_mid_c600_prepare_rgb (ma1017 * chip, SANE_Word dpi);
static SANE_Status usb_mid_c600_prepare_rgb (ma1017 * chip, SANE_Word dpi);
static SANE_Status
usb_mid_c600_prepare_mono (ma1017 * chip, SANE_Word dpi);
static SANE_Status usb_mid_c600_prepare_mono (ma1017 * chip, SANE_Word dpi);
static SANE_Status
usb_mid_c600_prepare_rgb_600_dpi (ma1017 * chip);
static SANE_Status usb_mid_c600_prepare_rgb_600_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c600_prepare_rgb_400_dpi (ma1017 * chip);
static SANE_Status usb_mid_c600_prepare_rgb_400_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c600_prepare_rgb_300_dpi (ma1017 * chip);
static SANE_Status usb_mid_c600_prepare_rgb_300_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c600_prepare_rgb_200_dpi (ma1017 * chip);
static SANE_Status usb_mid_c600_prepare_rgb_200_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c600_prepare_rgb_150_dpi (ma1017 * chip);
static SANE_Status usb_mid_c600_prepare_rgb_150_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c600_prepare_rgb_100_dpi (ma1017 * chip);
static SANE_Status usb_mid_c600_prepare_rgb_100_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c600_prepare_rgb_50_dpi (ma1017 * chip);
static SANE_Status usb_mid_c600_prepare_rgb_50_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c600_prepare_mono_600_dpi (ma1017 * chip);
static SANE_Status usb_mid_c600_prepare_mono_600_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c600_prepare_mono_400_dpi (ma1017 * chip);
static SANE_Status usb_mid_c600_prepare_mono_400_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c600_prepare_mono_300_dpi (ma1017 * chip);
static SANE_Status usb_mid_c600_prepare_mono_300_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c600_prepare_mono_200_dpi (ma1017 * chip);
static SANE_Status usb_mid_c600_prepare_mono_200_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c600_prepare_mono_150_dpi (ma1017 * chip);
static SANE_Status usb_mid_c600_prepare_mono_150_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c600_prepare_mono_100_dpi (ma1017 * chip);
static SANE_Status usb_mid_c600_prepare_mono_100_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c600_prepare_mono_50_dpi (ma1017 * chip);
static SANE_Status usb_mid_c600_prepare_mono_50_dpi (ma1017 * chip);
/* -------------- sensor 300/600 CIS function declarations ---------------- */
static SANE_Status
usb_mid_c300600_prepare_rgb (ma1017 * chip, SANE_Word dpi);
static SANE_Status usb_mid_c300600_prepare_rgb (ma1017 * chip, SANE_Word dpi);
static SANE_Status
usb_mid_c300600_prepare_mono (ma1017 * chip, SANE_Word dpi);
static SANE_Status
usb_mid_c300600_prepare_rgb_600_dpi (ma1017 * chip);
static SANE_Status usb_mid_c300600_prepare_rgb_600_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c300600_prepare_rgb_400_dpi (ma1017 * chip);
static SANE_Status usb_mid_c300600_prepare_rgb_400_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c300600_prepare_rgb_300_dpi (ma1017 * chip);
static SANE_Status usb_mid_c300600_prepare_rgb_300_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c300600_prepare_rgb_200_dpi (ma1017 * chip);
static SANE_Status usb_mid_c300600_prepare_rgb_200_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c300600_prepare_rgb_150_dpi (ma1017 * chip);
static SANE_Status usb_mid_c300600_prepare_rgb_150_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c300600_prepare_rgb_100_dpi (ma1017 * chip);
static SANE_Status usb_mid_c300600_prepare_rgb_100_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c300600_prepare_rgb_50_dpi (ma1017 * chip);
static SANE_Status usb_mid_c300600_prepare_rgb_50_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c300600_prepare_mono_600_dpi (ma1017 * chip);
static SANE_Status usb_mid_c300600_prepare_mono_600_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c300600_prepare_mono_400_dpi (ma1017 * chip);
static SANE_Status usb_mid_c300600_prepare_mono_400_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c300600_prepare_mono_300_dpi (ma1017 * chip);
static SANE_Status usb_mid_c300600_prepare_mono_300_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c300600_prepare_mono_200_dpi (ma1017 * chip);
static SANE_Status usb_mid_c300600_prepare_mono_200_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c300600_prepare_mono_150_dpi (ma1017 * chip);
static SANE_Status usb_mid_c300600_prepare_mono_150_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c300600_prepare_mono_100_dpi (ma1017 * chip);
static SANE_Status usb_mid_c300600_prepare_mono_100_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c300600_prepare_mono_50_dpi (ma1017 * chip);
static SANE_Status usb_mid_c300600_prepare_mono_50_dpi (ma1017 * chip);
/* ----------------- sensor 300 CIS function declarations ----------------- */
static SANE_Status
usb_mid_c300_prepare_rgb (ma1017 * chip, SANE_Word dpi);
static SANE_Status usb_mid_c300_prepare_rgb (ma1017 * chip, SANE_Word dpi);
static SANE_Status
usb_mid_c300_prepare_mono (ma1017 * chip, SANE_Word dpi);
static SANE_Status usb_mid_c300_prepare_mono (ma1017 * chip, SANE_Word dpi);
static SANE_Status
usb_mid_c300_prepare_rgb_300_dpi (ma1017 * chip);
static SANE_Status usb_mid_c300_prepare_rgb_300_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c300_prepare_rgb_200_dpi (ma1017 * chip);
static SANE_Status usb_mid_c300_prepare_rgb_200_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c300_prepare_rgb_150_dpi (ma1017 * chip);
static SANE_Status usb_mid_c300_prepare_rgb_150_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c300_prepare_rgb_100_dpi (ma1017 * chip);
static SANE_Status usb_mid_c300_prepare_rgb_100_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c300_prepare_rgb_50_dpi (ma1017 * chip);
static SANE_Status usb_mid_c300_prepare_rgb_50_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c300_prepare_mono_300_dpi (ma1017 * chip);
static SANE_Status usb_mid_c300_prepare_mono_300_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c300_prepare_mono_200_dpi (ma1017 * chip);
static SANE_Status usb_mid_c300_prepare_mono_200_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c300_prepare_mono_150_dpi (ma1017 * chip);
static SANE_Status usb_mid_c300_prepare_mono_150_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c300_prepare_mono_100_dpi (ma1017 * chip);
static SANE_Status usb_mid_c300_prepare_mono_100_dpi (ma1017 * chip);
static SANE_Status
usb_mid_c300_prepare_mono_50_dpi (ma1017 * chip);
static SANE_Status usb_mid_c300_prepare_mono_50_dpi (ma1017 * chip);
/* --------------------- sensor function declarations -------------------- */
static SANE_Bool
usb_mid_sensor_is600_mode (ma1017 * chip, SANE_Word dpi);
static SANE_Bool usb_mid_sensor_is600_mode (ma1017 * chip, SANE_Word dpi);
static SANE_Status usb_mid_sensor_prepare_rgb (ma1017 * chip, SANE_Word dpi);
static SANE_Status usb_mid_sensor_prepare_mono (ma1017 * chip, SANE_Word dpi);
static SANE_Status
usb_mid_sensor_prepare_rgb (ma1017 * chip, SANE_Word dpi);
static SANE_Status
usb_mid_sensor_prepare_mono (ma1017 * chip, SANE_Word dpi);
static SANE_Status
usb_mid_sensor_get_dpi (ma1017 *chip, SANE_Word wanted_dpi, SANE_Word *dpi);
usb_mid_sensor_get_dpi (ma1017 * chip, SANE_Word wanted_dpi, SANE_Word * dpi);
/* ------------------- motor 1200 function declarations ------------------ */
static SANE_Status
usb_mid_motor1200_prepare_rgb_1200_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor1200_prepare_rgb_1200_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor1200_prepare_rgb_400_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor1200_prepare_rgb_400_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor1200_prepare_rgb_600_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor1200_prepare_rgb_600_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor1200_prepare_rgb_200_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor1200_prepare_rgb_200_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor1200_prepare_rgb_300_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor1200_prepare_rgb_300_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor1200_prepare_rgb_150_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor1200_prepare_rgb_150_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor1200_prepare_rgb_100_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor1200_prepare_rgb_100_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor1200_prepare_rgb_50_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor1200_prepare_rgb_50_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor1200_prepare_mono_1200_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor1200_prepare_mono_1200_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor1200_prepare_mono_400_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor1200_prepare_mono_400_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor1200_prepare_mono_600_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor1200_prepare_mono_600_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor1200_prepare_mono_200_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor1200_prepare_mono_200_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor1200_prepare_mono_300_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor1200_prepare_mono_300_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor1200_prepare_mono_150_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor1200_prepare_mono_150_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor1200_prepare_mono_100_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor1200_prepare_mono_100_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor1200_prepare_mono_50_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor1200_prepare_mono_50_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor1200_prepare_rgb_half_300_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor1200_prepare_rgb_half_300_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor1200_prepare_rgb_bi_full_300_dpi (ma1017 * chip);
@ -316,10 +239,10 @@ usb_mid_motor1200_prepare_mono_half_300_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor1200_prepare_mono_bi_full_300_dpi (ma1017 * chip);
static SANE_Status
static SANE_Status
usb_mid_motor1200_prepare_mono_bi_full_x2300_dpi (ma1017 * chip);
static SANE_Status
static SANE_Status
usb_mid_motor1200_prepare_rgb (ma1017 * chip, SANE_Word dpi);
static SANE_Status
@ -334,69 +257,52 @@ usb_mid_motor1200_prepare_calibrate_mono (ma1017 * chip, SANE_Word dpi);
static SANE_Status
usb_mid_motor1200_prepare_step (ma1017 * chip, SANE_Word step_count);
static SANE_Status
usb_mid_motor1200_prepare_home (ma1017 * chip);
static SANE_Status usb_mid_motor1200_prepare_home (ma1017 * chip);
static SANE_Status
usb_mid_motor1200_prepare_adjust (ma1017 * chip, Channel channel);
static SANE_Word
usb_mid_motor1200_rgb_capability (SANE_Word dpi);
static SANE_Word usb_mid_motor1200_rgb_capability (SANE_Word dpi);
static SANE_Word
usb_mid_motor1200_mono_capability (SANE_Word dpi);
static SANE_Word usb_mid_motor1200_mono_capability (SANE_Word dpi);
/* ---------------600 dpi motor function declarations --------------------- */
static SANE_Status
usb_mid_motor600_prepare_rgb_600_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor600_prepare_rgb_600_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor600_prepare_rgb_200_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor600_prepare_rgb_200_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor600_prepare_rgb_300_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor600_prepare_rgb_300_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor600_prepare_rgb_150_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor600_prepare_rgb_150_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor600_prepare_rgb_100_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor600_prepare_rgb_100_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor600_prepare_rgb_50_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor600_prepare_rgb_50_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor600_prepare_mono_600_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor600_prepare_mono_600_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor600_prepare_mono_200_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor600_prepare_mono_200_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor600_prepare_mono_300_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor600_prepare_mono_300_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor600_prepare_mono_150_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor600_prepare_mono_150_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor600_prepare_mono_100_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor600_prepare_mono_100_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor600_prepare_mono_50_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor600_prepare_mono_50_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor600_prepare_rgb_half_300_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor600_prepare_rgb_half_300_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor600_prepare_rgb_bi_full_300_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor600_prepare_mono_half_300_dpi (ma1017 * chip);
static SANE_Status usb_mid_motor600_prepare_mono_half_300_dpi (ma1017 * chip);
static SANE_Status
usb_mid_motor600_prepare_mono_bi_full_300_dpi (ma1017 * chip);
static SANE_Status
static SANE_Status
usb_mid_motor600_prepare_rgb (ma1017 * chip, SANE_Word dpi);
static SANE_Status
@ -411,28 +317,22 @@ usb_mid_motor600_prepare_calibrate_mono (ma1017 * chip, SANE_Word dpi);
static SANE_Status
usb_mid_motor600_prepare_step (ma1017 * chip, SANE_Word step_count);
static SANE_Status
usb_mid_motor600_prepare_home (ma1017 * chip);
static SANE_Status usb_mid_motor600_prepare_home (ma1017 * chip);
static SANE_Status
usb_mid_motor600_prepare_adjust (ma1017 * chip, Channel channel);
static SANE_Word
usb_mid_motor600_rgb_capability (SANE_Word dpi);
static SANE_Word usb_mid_motor600_rgb_capability (SANE_Word dpi);
static SANE_Word
usb_mid_motor600_mono_capability (SANE_Word dpi);
static SANE_Word usb_mid_motor600_mono_capability (SANE_Word dpi);
/* ------------------ motor function declarations ------------------------ */
static SANE_Status
usb_mid_motor_prepare_home (ma1017 * chip);
static SANE_Status usb_mid_motor_prepare_home (ma1017 * chip);
static SANE_Status
usb_mid_motor_prepare_rgb (ma1017 * chip, SANE_Word dpi);
static SANE_Status usb_mid_motor_prepare_rgb (ma1017 * chip, SANE_Word dpi);
static SANE_Status
usb_mid_motor_prepare_mono (ma1017 * chip, SANE_Word dpi);
static SANE_Status usb_mid_motor_prepare_mono (ma1017 * chip, SANE_Word dpi);
static SANE_Status
usb_mid_motor_prepare_adjust (ma1017 * chip, Channel channel);
@ -446,23 +346,20 @@ usb_mid_motor_prepare_calibrate_mono (ma1017 * chip, SANE_Word dpi);
static SANE_Status
usb_mid_motor_prepare_step (ma1017 * chip, SANE_Word step_count);
static SANE_Word
usb_mid_motor_rgb_capability (ma1017 * chip, SANE_Word dpi);
static SANE_Word usb_mid_motor_rgb_capability (ma1017 * chip, SANE_Word dpi);
static SANE_Word
usb_mid_motor_mono_capability (ma1017 * chip, SANE_Word dpi);
static SANE_Word usb_mid_motor_mono_capability (ma1017 * chip, SANE_Word dpi);
static SANE_Status
usb_mid_motor_get_dpi (ma1017 *chip, SANE_Word wanted_dpi, SANE_Word *dpi);
usb_mid_motor_get_dpi (ma1017 * chip, SANE_Word wanted_dpi, SANE_Word * dpi);
/* --------------------- frontend function declarations ------------------- */
static SANE_Status
static SANE_Status
usb_mid_front_set_front_end_mode (ma1017 * chip, SANE_Byte mode);
static SANE_Status
usb_mid_front_enable (ma1017 * chip, SANE_Bool is_enable);
static SANE_Status usb_mid_front_enable (ma1017 * chip, SANE_Bool is_enable);
static SANE_Status
usb_mid_front_set_top_reference (ma1017 * chip, SANE_Byte top);
@ -476,22 +373,17 @@ usb_mid_front_set_green_offset (ma1017 * chip, SANE_Byte offset);
static SANE_Status
usb_mid_front_set_blue_offset (ma1017 * chip, SANE_Byte offset);
static SANE_Status
usb_mid_front_set_red_pga (ma1017 * chip, SANE_Byte pga);
static SANE_Status usb_mid_front_set_red_pga (ma1017 * chip, SANE_Byte pga);
static SANE_Status
usb_mid_front_set_green_pga (ma1017 * chip, SANE_Byte pga);
static SANE_Status usb_mid_front_set_green_pga (ma1017 * chip, SANE_Byte pga);
static SANE_Status
usb_mid_front_set_blue_pga (ma1017 * chip, SANE_Byte pga);
static SANE_Status usb_mid_front_set_blue_pga (ma1017 * chip, SANE_Byte pga);
static SANE_Status
usb_mid_front_set_rgb_signal (ma1017 * chip);
static SANE_Status usb_mid_front_set_rgb_signal (ma1017 * chip);
#if 0
/* CCD */
static SANE_Word
usb_mid_frontend_max_offset_index (ma1017 * chip);
static SANE_Word usb_mid_frontend_max_offset_index (ma1017 * chip);
#define OFFSET_TABLE_SIZE 256
#endif