kopia lustrzana https://gitlab.com/sane-project/backends
Merge branch 'genesys-canoscan-8600f' into 'master'
genesys: Preparation for infrared channel support on 8600F See merge request sane-project/backends!82merge-requests/83/head
commit
ec1a614d6b
Plik diff jest za duży
Load Diff
|
@ -52,6 +52,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "genesys_low.h"
|
#include "genesys_low.h"
|
||||||
|
#include <queue>
|
||||||
|
|
||||||
#ifndef PATH_MAX
|
#ifndef PATH_MAX
|
||||||
# define PATH_MAX 1024
|
# define PATH_MAX 1024
|
||||||
|
@ -73,8 +74,9 @@
|
||||||
/* Maximum time for lamp warm-up */
|
/* Maximum time for lamp warm-up */
|
||||||
#define WARMUP_TIME 65
|
#define WARMUP_TIME 65
|
||||||
|
|
||||||
#define FLATBED "Flatbed"
|
#define STR_FLATBED "Flatbed"
|
||||||
#define TRANSPARENCY_ADAPTER "Transparency Adapter"
|
#define STR_TRANSPARENCY_ADAPTER "Transparency Adapter"
|
||||||
|
#define STR_TRANSPARENCY_ADAPTER_INFRARED "Transparency Adapter Infrared"
|
||||||
|
|
||||||
#ifndef SANE_I18N
|
#ifndef SANE_I18N
|
||||||
#define SANE_I18N(text) text
|
#define SANE_I18N(text) text
|
||||||
|
@ -145,6 +147,45 @@ enum Genesys_Option
|
||||||
NUM_OPTIONS
|
NUM_OPTIONS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum GenesysButtonName : unsigned {
|
||||||
|
BUTTON_SCAN_SW = 0,
|
||||||
|
BUTTON_FILE_SW,
|
||||||
|
BUTTON_EMAIL_SW,
|
||||||
|
BUTTON_COPY_SW,
|
||||||
|
BUTTON_PAGE_LOADED_SW,
|
||||||
|
BUTTON_OCR_SW,
|
||||||
|
BUTTON_POWER_SW,
|
||||||
|
BUTTON_EXTRA_SW,
|
||||||
|
NUM_BUTTONS
|
||||||
|
};
|
||||||
|
|
||||||
|
GenesysButtonName genesys_option_to_button(int option);
|
||||||
|
|
||||||
|
class GenesysButton {
|
||||||
|
public:
|
||||||
|
void write(bool value)
|
||||||
|
{
|
||||||
|
if (value == value_) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
values_to_read_.push(value);
|
||||||
|
value_ = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool read()
|
||||||
|
{
|
||||||
|
if (values_to_read_.empty()) {
|
||||||
|
return value_;
|
||||||
|
}
|
||||||
|
bool ret = values_to_read_.front();
|
||||||
|
values_to_read_.pop();
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool value_ = false;
|
||||||
|
std::queue<bool> values_to_read_;
|
||||||
|
};
|
||||||
|
|
||||||
/** Scanner object. Should have better be called Session than Scanner
|
/** Scanner object. Should have better be called Session than Scanner
|
||||||
*/
|
*/
|
||||||
|
@ -164,10 +205,39 @@ struct Genesys_Scanner
|
||||||
SANE_Bool scanning;
|
SANE_Bool scanning;
|
||||||
// Option descriptors
|
// Option descriptors
|
||||||
SANE_Option_Descriptor opt[NUM_OPTIONS];
|
SANE_Option_Descriptor opt[NUM_OPTIONS];
|
||||||
|
|
||||||
// Option values
|
// Option values
|
||||||
Option_Value val[NUM_OPTIONS];
|
SANE_Word bit_depth = 0;
|
||||||
// Option values as read by the frontend. used for sensors.
|
SANE_Word resolution = 0;
|
||||||
Option_Value last_val[NUM_OPTIONS];
|
bool preview = false;
|
||||||
|
SANE_Word threshold = 0;
|
||||||
|
SANE_Word threshold_curve = 0;
|
||||||
|
bool disable_dynamic_lineart = false;
|
||||||
|
bool disable_interpolation = false;
|
||||||
|
bool lamp_off = false;
|
||||||
|
SANE_Word lamp_off_time = 0;
|
||||||
|
bool swdeskew = false;
|
||||||
|
bool swcrop = false;
|
||||||
|
bool swdespeck = false;
|
||||||
|
bool swderotate = false;
|
||||||
|
SANE_Word swskip = 0;
|
||||||
|
SANE_Word despeck = 0;
|
||||||
|
SANE_Word contrast = 0;
|
||||||
|
SANE_Word brightness = 0;
|
||||||
|
SANE_Word expiration_time = 0;
|
||||||
|
bool custom_gamma = false;
|
||||||
|
|
||||||
|
SANE_Word pos_top_left_y = 0;
|
||||||
|
SANE_Word pos_top_left_x = 0;
|
||||||
|
SANE_Word pos_bottom_right_y = 0;
|
||||||
|
SANE_Word pos_bottom_right_x = 0;
|
||||||
|
|
||||||
|
std::string mode, source, color_filter;
|
||||||
|
|
||||||
|
std::string calibration_file;
|
||||||
|
// Button states
|
||||||
|
GenesysButton buttons[NUM_BUTTONS];
|
||||||
|
|
||||||
// SANE Parameters
|
// SANE Parameters
|
||||||
SANE_Parameters params = {};
|
SANE_Parameters params = {};
|
||||||
SANE_Int bpp_list[5] = {};
|
SANE_Int bpp_list[5] = {};
|
||||||
|
|
|
@ -428,7 +428,7 @@ genesys_despeck(Genesys_Scanner *s)
|
||||||
{
|
{
|
||||||
if(sanei_magic_despeck(&s->params,
|
if(sanei_magic_despeck(&s->params,
|
||||||
s->dev->img_buffer.data(),
|
s->dev->img_buffer.data(),
|
||||||
s->val[OPT_DESPECK].w)!=SANE_STATUS_GOOD)
|
s->despeck)!=SANE_STATUS_GOOD)
|
||||||
{
|
{
|
||||||
DBG (DBG_error, "%s: bad despeck, bailing\n",__func__);
|
DBG (DBG_error, "%s: bad despeck, bailing\n",__func__);
|
||||||
}
|
}
|
||||||
|
@ -443,13 +443,12 @@ genesys_derotate (Genesys_Scanner * s)
|
||||||
{
|
{
|
||||||
SANE_Status status;
|
SANE_Status status;
|
||||||
int angle = 0;
|
int angle = 0;
|
||||||
int resolution = s->val[OPT_RESOLUTION].w;
|
|
||||||
|
|
||||||
DBGSTART;
|
DBGSTART;
|
||||||
status = sanei_magic_findTurn (&s->params,
|
status = sanei_magic_findTurn (&s->params,
|
||||||
s->dev->img_buffer.data(),
|
s->dev->img_buffer.data(),
|
||||||
resolution,
|
s->resolution,
|
||||||
resolution,
|
s->resolution,
|
||||||
&angle);
|
&angle);
|
||||||
|
|
||||||
if (status)
|
if (status)
|
||||||
|
|
|
@ -1357,12 +1357,12 @@ void genesys_init_sensor_tables()
|
||||||
int min_resolution;
|
int min_resolution;
|
||||||
int max_resolution;
|
int max_resolution;
|
||||||
int exposure;
|
int exposure;
|
||||||
int is_transparency;
|
ScanMethod method;
|
||||||
GenesysRegisterSettingSet extra_custom_regs;
|
GenesysRegisterSettingSet extra_custom_regs;
|
||||||
};
|
};
|
||||||
|
|
||||||
CustomSensorSettings custom_settings[] = {
|
CustomSensorSettings custom_settings[] = {
|
||||||
{ -1, 600, 8016, false, {
|
{ -1, 600, 8016, ScanMethod::FLATBED, {
|
||||||
{ 0x74, 0x00 }, { 0x75, 0x01 }, { 0x76, 0xff },
|
{ 0x74, 0x00 }, { 0x75, 0x01 }, { 0x76, 0xff },
|
||||||
{ 0x77, 0x03 }, { 0x78, 0xff }, { 0x79, 0xff },
|
{ 0x77, 0x03 }, { 0x78, 0xff }, { 0x79, 0xff },
|
||||||
{ 0x7a, 0x03 }, { 0x7b, 0xff }, { 0x7c, 0xff },
|
{ 0x7a, 0x03 }, { 0x7b, 0xff }, { 0x7c, 0xff },
|
||||||
|
@ -1390,7 +1390,7 @@ void genesys_init_sensor_tables()
|
||||||
{ 0x5a, 0x40 },
|
{ 0x5a, 0x40 },
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ 1200, 1200, 56064, false, {
|
{ 1200, 1200, 56064, ScanMethod::FLATBED, {
|
||||||
{ 0x74, 0x0f }, { 0x75, 0xff }, { 0x76, 0xff },
|
{ 0x74, 0x0f }, { 0x75, 0xff }, { 0x76, 0xff },
|
||||||
{ 0x77, 0x00 }, { 0x78, 0x01 }, { 0x79, 0xff },
|
{ 0x77, 0x00 }, { 0x78, 0x01 }, { 0x79, 0xff },
|
||||||
{ 0x7a, 0x00 }, { 0x7b, 0x01 }, { 0x7c, 0xff },
|
{ 0x7a, 0x00 }, { 0x7b, 0x01 }, { 0x7c, 0xff },
|
||||||
|
@ -1418,7 +1418,7 @@ void genesys_init_sensor_tables()
|
||||||
{ 0x5a, 0x40 },
|
{ 0x5a, 0x40 },
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ 2400, 2400, 56064, false, {
|
{ 2400, 2400, 56064, ScanMethod::FLATBED, {
|
||||||
{ 0x74, 0x0f }, { 0x75, 0xff }, { 0x76, 0xff },
|
{ 0x74, 0x0f }, { 0x75, 0xff }, { 0x76, 0xff },
|
||||||
{ 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 },
|
{ 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 },
|
||||||
{ 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x00 },
|
{ 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x00 },
|
||||||
|
@ -1446,7 +1446,7 @@ void genesys_init_sensor_tables()
|
||||||
{ 0x5a, 0x40 },
|
{ 0x5a, 0x40 },
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ 4800, 4800, 42752, false, {
|
{ 4800, 4800, 42752, ScanMethod::FLATBED, {
|
||||||
{ 0x74, 0x0f }, { 0x75, 0xff }, { 0x76, 0xff },
|
{ 0x74, 0x0f }, { 0x75, 0xff }, { 0x76, 0xff },
|
||||||
{ 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 },
|
{ 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x00 },
|
||||||
{ 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x00 },
|
{ 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x00 },
|
||||||
|
@ -1474,7 +1474,7 @@ void genesys_init_sensor_tables()
|
||||||
{ 0x5a, 0x40 },
|
{ 0x5a, 0x40 },
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ -1, -1, 15624, true, {
|
{ -1, -1, 15624, ScanMethod::TRANSPARENCY, {
|
||||||
{ 0x74, 0x00 }, { 0x75, 0x1c }, { 0x76, 0x7f },
|
{ 0x74, 0x00 }, { 0x75, 0x1c }, { 0x76, 0x7f },
|
||||||
{ 0x77, 0x03 }, { 0x78, 0xff }, { 0x79, 0xff },
|
{ 0x77, 0x03 }, { 0x78, 0xff }, { 0x79, 0xff },
|
||||||
{ 0x7a, 0x03 }, { 0x7b, 0xff }, { 0x7c, 0xff },
|
{ 0x7a, 0x03 }, { 0x7b, 0xff }, { 0x7c, 0xff },
|
||||||
|
@ -1510,7 +1510,7 @@ void genesys_init_sensor_tables()
|
||||||
sensor.min_resolution = setting.min_resolution;
|
sensor.min_resolution = setting.min_resolution;
|
||||||
sensor.max_resolution = setting.max_resolution;
|
sensor.max_resolution = setting.max_resolution;
|
||||||
sensor.exposure_lperiod = setting.exposure;
|
sensor.exposure_lperiod = setting.exposure;
|
||||||
sensor.is_transparency = setting.is_transparency;
|
sensor.method = setting.method;
|
||||||
sensor.custom_regs = base_custom_regs;
|
sensor.custom_regs = base_custom_regs;
|
||||||
sensor.custom_regs.merge(setting.extra_custom_regs);
|
sensor.custom_regs.merge(setting.extra_custom_regs);
|
||||||
s_sensors->push_back(sensor);
|
s_sensors->push_back(sensor);
|
||||||
|
@ -1626,13 +1626,13 @@ void genesys_init_sensor_tables()
|
||||||
int min_resolution;
|
int min_resolution;
|
||||||
int max_resolution;
|
int max_resolution;
|
||||||
int exposure;
|
int exposure;
|
||||||
int is_transparency;
|
ScanMethod method;
|
||||||
GenesysRegisterSettingSet extra_custom_regs;
|
GenesysRegisterSettingSet extra_custom_regs;
|
||||||
GenesysRegisterSettingSet custom_fe_regs;
|
GenesysRegisterSettingSet custom_fe_regs;
|
||||||
};
|
};
|
||||||
|
|
||||||
CustomSensorSettings custom_settings[] = {
|
CustomSensorSettings custom_settings[] = {
|
||||||
{ -1, 1200, 0x5dc0, false, {
|
{ -1, 1200, 0x5dc0, ScanMethod::FLATBED, {
|
||||||
{ 0x74, 0x03 }, { 0x75, 0xf0 }, { 0x76, 0xf0 },
|
{ 0x74, 0x03 }, { 0x75, 0xf0 }, { 0x76, 0xf0 },
|
||||||
{ 0x77, 0x03 }, { 0x78, 0xfe }, { 0x79, 0x00 },
|
{ 0x77, 0x03 }, { 0x78, 0xfe }, { 0x79, 0x00 },
|
||||||
{ 0x7a, 0x00 }, { 0x7b, 0x92 }, { 0x7c, 0x49 },
|
{ 0x7a, 0x00 }, { 0x7b, 0x92 }, { 0x7c, 0x49 },
|
||||||
|
@ -1661,7 +1661,7 @@ void genesys_init_sensor_tables()
|
||||||
},
|
},
|
||||||
{},
|
{},
|
||||||
},
|
},
|
||||||
{ -1, 1200, 0x5dc0, true, {
|
{ -1, 1200, 0x5dc0, ScanMethod::TRANSPARENCY, {
|
||||||
{ 0x74, 0x03 }, { 0x75, 0xf0 }, { 0x76, 0xf0 },
|
{ 0x74, 0x03 }, { 0x75, 0xf0 }, { 0x76, 0xf0 },
|
||||||
{ 0x77, 0x03 }, { 0x78, 0xfe }, { 0x79, 0x00 },
|
{ 0x77, 0x03 }, { 0x78, 0xfe }, { 0x79, 0x00 },
|
||||||
{ 0x7a, 0x00 }, { 0x7b, 0x92 }, { 0x7c, 0x49 },
|
{ 0x7a, 0x00 }, { 0x7b, 0x92 }, { 0x7c, 0x49 },
|
||||||
|
@ -1690,7 +1690,7 @@ void genesys_init_sensor_tables()
|
||||||
},
|
},
|
||||||
{},
|
{},
|
||||||
},
|
},
|
||||||
{ 2400, 2400, 0x5dc0, true, {
|
{ 2400, 2400, 0x5dc0, ScanMethod::TRANSPARENCY, {
|
||||||
{ 0x74, 0x03 }, { 0x75, 0xfe }, { 0x76, 0x00 },
|
{ 0x74, 0x03 }, { 0x75, 0xfe }, { 0x76, 0x00 },
|
||||||
{ 0x77, 0x03 }, { 0x78, 0xfe }, { 0x79, 0x00 },
|
{ 0x77, 0x03 }, { 0x78, 0xfe }, { 0x79, 0x00 },
|
||||||
{ 0x7a, 0x00 }, { 0x7b, 0x92 }, { 0x7c, 0x49 },
|
{ 0x7a, 0x00 }, { 0x7b, 0x92 }, { 0x7c, 0x49 },
|
||||||
|
@ -1719,7 +1719,7 @@ void genesys_init_sensor_tables()
|
||||||
},
|
},
|
||||||
{},
|
{},
|
||||||
},
|
},
|
||||||
{ 4800, 4800, 0x5dc0, true, {
|
{ 4800, 4800, 0x5dc0, ScanMethod::TRANSPARENCY, {
|
||||||
{ 0x74, 0x03 }, { 0x75, 0xff }, { 0x76, 0xff },
|
{ 0x74, 0x03 }, { 0x75, 0xff }, { 0x76, 0xff },
|
||||||
{ 0x77, 0x03 }, { 0x78, 0xff }, { 0x79, 0xff },
|
{ 0x77, 0x03 }, { 0x78, 0xff }, { 0x79, 0xff },
|
||||||
{ 0x7a, 0x00 }, { 0x7b, 0x92 }, { 0x7c, 0x49 },
|
{ 0x7a, 0x00 }, { 0x7b, 0x92 }, { 0x7c, 0x49 },
|
||||||
|
@ -1758,7 +1758,7 @@ void genesys_init_sensor_tables()
|
||||||
{
|
{
|
||||||
sensor.min_resolution = setting.min_resolution;
|
sensor.min_resolution = setting.min_resolution;
|
||||||
sensor.max_resolution = setting.max_resolution;
|
sensor.max_resolution = setting.max_resolution;
|
||||||
sensor.is_transparency = setting.is_transparency;
|
sensor.method = setting.method;
|
||||||
sensor.exposure_lperiod = setting.exposure;
|
sensor.exposure_lperiod = setting.exposure;
|
||||||
sensor.custom_regs = base_custom_regs;
|
sensor.custom_regs = base_custom_regs;
|
||||||
sensor.custom_regs.merge(setting.extra_custom_regs);
|
sensor.custom_regs.merge(setting.extra_custom_regs);
|
||||||
|
|
Plik diff jest za duży
Load Diff
|
@ -463,20 +463,8 @@ static Motor_Profile motors[]={
|
||||||
};
|
};
|
||||||
|
|
||||||
static
|
static
|
||||||
SANE_Status gl124_init_scan_regs (Genesys_Device * dev, const Genesys_Sensor& sensor,
|
SANE_Status gl124_init_scan_regs(Genesys_Device * dev, const Genesys_Sensor& sensor,
|
||||||
Genesys_Register_Set * reg,
|
Genesys_Register_Set * reg, SetupParams& params);
|
||||||
float xres, /*dpi */
|
|
||||||
float yres, /*dpi */
|
|
||||||
float startx, /*optical_res, from dummy_pixel+1 */
|
|
||||||
float starty, /*base_ydpi, from home! */
|
|
||||||
float pixels,
|
|
||||||
float lines,
|
|
||||||
unsigned int depth,
|
|
||||||
unsigned int channels,
|
|
||||||
int scan_method,
|
|
||||||
int scan_mode,
|
|
||||||
int color_filter,
|
|
||||||
unsigned int flags);
|
|
||||||
|
|
||||||
static SANE_Status gl124_start_action (Genesys_Device * dev);
|
static SANE_Status gl124_start_action (Genesys_Device * dev);
|
||||||
static SANE_Status
|
static SANE_Status
|
||||||
|
|
Plik diff jest za duży
Load Diff
|
@ -212,15 +212,10 @@ setup_for_scan (Genesys_Device *device,
|
||||||
static SANE_Status
|
static SANE_Status
|
||||||
gl646_setup_registers (Genesys_Device * dev,
|
gl646_setup_registers (Genesys_Device * dev,
|
||||||
const Genesys_Sensor& sensor,
|
const Genesys_Sensor& sensor,
|
||||||
Genesys_Register_Set * regs,
|
Genesys_Register_Set * regs, SetupParams& params,
|
||||||
Genesys_Settings scan_settings,
|
uint16_t * slope_table1,
|
||||||
uint16_t * slope_table1,
|
uint16_t * slope_table2,
|
||||||
uint16_t * slope_table2,
|
bool xcorrection);
|
||||||
SANE_Int resolution,
|
|
||||||
uint32_t move,
|
|
||||||
uint32_t linecnt,
|
|
||||||
uint16_t startx,
|
|
||||||
uint16_t endx, SANE_Bool color, SANE_Int depth);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Does a simple move of the given distance by doing a scan at lowest resolution
|
* Does a simple move of the given distance by doing a scan at lowest resolution
|
||||||
|
@ -286,7 +281,7 @@ typedef struct
|
||||||
/* key */
|
/* key */
|
||||||
SANE_Int motor;
|
SANE_Int motor;
|
||||||
SANE_Int dpi;
|
SANE_Int dpi;
|
||||||
SANE_Bool color;
|
unsigned channels;
|
||||||
|
|
||||||
/* settings */
|
/* settings */
|
||||||
SANE_Int ydpi; /* real motor dpi, may be different from the resolution */
|
SANE_Int ydpi; /* real motor dpi, may be different from the resolution */
|
||||||
|
@ -313,7 +308,7 @@ typedef struct
|
||||||
/* key */
|
/* key */
|
||||||
SANE_Int sensor; /**< sensor identifier */
|
SANE_Int sensor; /**< sensor identifier */
|
||||||
SANE_Int dpi; /**< required dpi */
|
SANE_Int dpi; /**< required dpi */
|
||||||
SANE_Bool color; /**< SANE_TRUE if color scan */
|
unsigned channels; // 3 channels if color scan, 1 channel for gray scan
|
||||||
|
|
||||||
/* settings */
|
/* settings */
|
||||||
SANE_Int xdpi; /**< real sensor dpi, may be different from the required resolution */
|
SANE_Int xdpi; /**< real sensor dpi, may be different from the required resolution */
|
||||||
|
@ -355,85 +350,85 @@ static uint8_t xp200_gray[6]={0x05, 0x0a, 0x0f, 0xa0, 0x10, 0x10};
|
||||||
*/
|
*/
|
||||||
static Sensor_Master sensor_master[] = {
|
static Sensor_Master sensor_master[] = {
|
||||||
/* HP3670 master settings */
|
/* HP3670 master settings */
|
||||||
{CCD_HP3670, 75, SANE_TRUE , 75, 4879, 300, 4, 42, NULL, SANE_FALSE, 0x33, 0x43},
|
{CCD_HP3670, 75, 3, 75, 4879, 300, 4, 42, NULL, SANE_FALSE, 0x33, 0x43},
|
||||||
{CCD_HP3670, 100, SANE_TRUE , 100, 4487, 400, 4, 42, NULL, SANE_FALSE, 0x33, 0x43},
|
{CCD_HP3670, 100, 3, 100, 4487, 400, 4, 42, NULL, SANE_FALSE, 0x33, 0x43},
|
||||||
{CCD_HP3670, 150, SANE_TRUE , 150, 4879, 600, 4, 42, NULL, SANE_FALSE, 0x33, 0x43},
|
{CCD_HP3670, 150, 3, 150, 4879, 600, 4, 42, NULL, SANE_FALSE, 0x33, 0x43},
|
||||||
{CCD_HP3670, 300, SANE_TRUE , 300, 4503, 1200, 4, 42, NULL, SANE_FALSE, 0x33, 0x43},
|
{CCD_HP3670, 300, 3, 300, 4503, 1200, 4, 42, NULL, SANE_FALSE, 0x33, 0x43},
|
||||||
{CCD_HP3670, 600, SANE_TRUE , 600, 10251, 1200, 2, 42, NULL, SANE_FALSE, 0x31, 0x43},
|
{CCD_HP3670, 600, 3, 600, 10251, 1200, 2, 42, NULL, SANE_FALSE, 0x31, 0x43},
|
||||||
{CCD_HP3670,1200, SANE_TRUE , 1200, 12750, 1200, 1, 42, NULL, SANE_FALSE, 0x30, 0x43},
|
{CCD_HP3670,1200, 3, 1200, 12750, 1200, 1, 42, NULL, SANE_FALSE, 0x30, 0x43},
|
||||||
{CCD_HP3670,2400, SANE_TRUE , 1200, 12750, 1200, 1, 42, NULL, SANE_FALSE, 0x30, 0x43},
|
{CCD_HP3670,2400, 3, 1200, 12750, 1200, 1, 42, NULL, SANE_FALSE, 0x30, 0x43},
|
||||||
{CCD_HP3670, 75, SANE_FALSE, 75, 4879, 300, 4, 42, NULL, SANE_FALSE, 0x33, 0x43},
|
{CCD_HP3670, 75, 1, 75, 4879, 300, 4, 42, NULL, SANE_FALSE, 0x33, 0x43},
|
||||||
{CCD_HP3670, 100, SANE_FALSE, 100, 4487, 400, 4, 42, NULL, SANE_FALSE, 0x33, 0x43},
|
{CCD_HP3670, 100, 1, 100, 4487, 400, 4, 42, NULL, SANE_FALSE, 0x33, 0x43},
|
||||||
{CCD_HP3670, 150, SANE_FALSE, 150, 4879, 600, 4, 42, NULL, SANE_FALSE, 0x33, 0x43},
|
{CCD_HP3670, 150, 1, 150, 4879, 600, 4, 42, NULL, SANE_FALSE, 0x33, 0x43},
|
||||||
{CCD_HP3670, 300, SANE_FALSE, 300, 4503, 1200, 4, 42, NULL, SANE_FALSE, 0x33, 0x43},
|
{CCD_HP3670, 300, 1, 300, 4503, 1200, 4, 42, NULL, SANE_FALSE, 0x33, 0x43},
|
||||||
{CCD_HP3670, 600, SANE_FALSE, 600, 10251, 1200, 2, 42, NULL, SANE_FALSE, 0x31, 0x43},
|
{CCD_HP3670, 600, 1, 600, 10251, 1200, 2, 42, NULL, SANE_FALSE, 0x31, 0x43},
|
||||||
{CCD_HP3670,1200, SANE_FALSE, 1200, 12750, 1200, 1, 42, NULL, SANE_FALSE, 0x30, 0x43},
|
{CCD_HP3670,1200, 1, 1200, 12750, 1200, 1, 42, NULL, SANE_FALSE, 0x30, 0x43},
|
||||||
{CCD_HP3670,2400, SANE_FALSE, 1200, 12750, 1200, 1, 42, NULL, SANE_FALSE, 0x30, 0x43},
|
{CCD_HP3670,2400, 1, 1200, 12750, 1200, 1, 42, NULL, SANE_FALSE, 0x30, 0x43},
|
||||||
|
|
||||||
/* HP 2400 master settings */
|
/* HP 2400 master settings */
|
||||||
{CCD_HP2400, 50, SANE_TRUE , 50, 7211, 200, 4, 42, NULL, SANE_FALSE, 0x3f, 0x02},
|
{CCD_HP2400, 50, 3, 50, 7211, 200, 4, 42, NULL, SANE_FALSE, 0x3f, 0x02},
|
||||||
{CCD_HP2400, 100, SANE_TRUE , 100, 7211, 400, 4, 42, NULL, SANE_FALSE, 0x3f, 0x02},
|
{CCD_HP2400, 100, 3, 100, 7211, 400, 4, 42, NULL, SANE_FALSE, 0x3f, 0x02},
|
||||||
{CCD_HP2400, 150, SANE_TRUE , 150, 7211, 600, 4, 42, NULL, SANE_FALSE, 0x3f, 0x02},
|
{CCD_HP2400, 150, 3, 150, 7211, 600, 4, 42, NULL, SANE_FALSE, 0x3f, 0x02},
|
||||||
{CCD_HP2400, 300, SANE_TRUE , 300, 8751, 1200, 4, 42, NULL, SANE_FALSE, 0x3f, 0x02},
|
{CCD_HP2400, 300, 3, 300, 8751, 1200, 4, 42, NULL, SANE_FALSE, 0x3f, 0x02},
|
||||||
{CCD_HP2400, 600, SANE_TRUE , 600, 18760, 1200, 2, 42, NULL, SANE_FALSE, 0x31, 0x02},
|
{CCD_HP2400, 600, 3, 600, 18760, 1200, 2, 42, NULL, SANE_FALSE, 0x31, 0x02},
|
||||||
{CCD_HP2400,1200, SANE_TRUE , 1200, 21749, 1200, 1, 42, NULL, SANE_FALSE, 0x30, 0x42},
|
{CCD_HP2400,1200, 3, 1200, 21749, 1200, 1, 42, NULL, SANE_FALSE, 0x30, 0x42},
|
||||||
{CCD_HP2400, 50, SANE_FALSE, 50, 7211, 200, 4, 42, NULL, SANE_FALSE, 0x3f, 0x02},
|
{CCD_HP2400, 50, 1, 50, 7211, 200, 4, 42, NULL, SANE_FALSE, 0x3f, 0x02},
|
||||||
{CCD_HP2400, 100, SANE_FALSE, 100, 7211, 400, 4, 42, NULL, SANE_FALSE, 0x3f, 0x02},
|
{CCD_HP2400, 100, 1, 100, 7211, 400, 4, 42, NULL, SANE_FALSE, 0x3f, 0x02},
|
||||||
{CCD_HP2400, 150, SANE_FALSE, 150, 7211, 600, 4, 42, NULL, SANE_FALSE, 0x3f, 0x02},
|
{CCD_HP2400, 150, 1, 150, 7211, 600, 4, 42, NULL, SANE_FALSE, 0x3f, 0x02},
|
||||||
{CCD_HP2400, 300, SANE_FALSE, 300, 8751, 1200, 4, 42, NULL, SANE_FALSE, 0x3f, 0x02},
|
{CCD_HP2400, 300, 1, 300, 8751, 1200, 4, 42, NULL, SANE_FALSE, 0x3f, 0x02},
|
||||||
{CCD_HP2400, 600, SANE_FALSE, 600, 18760, 1200, 2, 42, NULL, SANE_FALSE, 0x31, 0x02},
|
{CCD_HP2400, 600, 1, 600, 18760, 1200, 2, 42, NULL, SANE_FALSE, 0x31, 0x02},
|
||||||
{CCD_HP2400,1200, SANE_FALSE, 1200, 21749, 1200, 1, 42, NULL, SANE_FALSE, 0x30, 0x42},
|
{CCD_HP2400,1200, 1, 1200, 21749, 1200, 1, 42, NULL, SANE_FALSE, 0x30, 0x42},
|
||||||
|
|
||||||
/* XP 200 master settings */
|
/* XP 200 master settings */
|
||||||
{CIS_XP200 , 75, SANE_TRUE , 75, 5700, 75, 1, 42, xp200_color, SANE_FALSE, 0x00, 0x11},
|
{CIS_XP200 , 75, 3, 75, 5700, 75, 1, 42, xp200_color, SANE_FALSE, 0x00, 0x11},
|
||||||
{CIS_XP200 , 100, SANE_TRUE , 100, 5700, 100, 1, 42, xp200_color, SANE_FALSE, 0x00, 0x11},
|
{CIS_XP200 , 100, 3, 100, 5700, 100, 1, 42, xp200_color, SANE_FALSE, 0x00, 0x11},
|
||||||
{CIS_XP200 , 200, SANE_TRUE , 200, 5700, 200, 1, 42, xp200_color, SANE_FALSE, 0x00, 0x11},
|
{CIS_XP200 , 200, 3, 200, 5700, 200, 1, 42, xp200_color, SANE_FALSE, 0x00, 0x11},
|
||||||
{CIS_XP200 , 300, SANE_TRUE , 300, 9000, 300, 1, 42, xp200_color, SANE_FALSE, 0x00, 0x11},
|
{CIS_XP200 , 300, 3, 300, 9000, 300, 1, 42, xp200_color, SANE_FALSE, 0x00, 0x11},
|
||||||
{CIS_XP200 , 600, SANE_TRUE , 600, 16000, 600, 1, 42, xp200_color, SANE_FALSE, 0x00, 0x11},
|
{CIS_XP200 , 600, 3, 600, 16000, 600, 1, 42, xp200_color, SANE_FALSE, 0x00, 0x11},
|
||||||
|
|
||||||
{CIS_XP200 , 75, SANE_FALSE, 75, 16000, 75, 1, 42, xp200_gray, SANE_FALSE, 0x00, 0x11},
|
{CIS_XP200 , 75, 1, 75, 16000, 75, 1, 42, xp200_gray, SANE_FALSE, 0x00, 0x11},
|
||||||
{CIS_XP200 , 100, SANE_FALSE, 100, 7800, 100, 1, 42, xp200_gray, SANE_FALSE, 0x00, 0x11},
|
{CIS_XP200 , 100, 1, 100, 7800, 100, 1, 42, xp200_gray, SANE_FALSE, 0x00, 0x11},
|
||||||
{CIS_XP200 , 200, SANE_FALSE, 200, 11000, 200, 1, 42, xp200_gray, SANE_FALSE, 0x00, 0x11},
|
{CIS_XP200 , 200, 1, 200, 11000, 200, 1, 42, xp200_gray, SANE_FALSE, 0x00, 0x11},
|
||||||
{CIS_XP200 , 300, SANE_FALSE, 300, 13000, 300, 1, 42, xp200_gray, SANE_FALSE, 0x00, 0x11},
|
{CIS_XP200 , 300, 1, 300, 13000, 300, 1, 42, xp200_gray, SANE_FALSE, 0x00, 0x11},
|
||||||
{CIS_XP200 , 600, SANE_FALSE, 600, 24000, 600, 1, 42, xp200_gray, SANE_FALSE, 0x00, 0x11},
|
{CIS_XP200 , 600, 1, 600, 24000, 600, 1, 42, xp200_gray, SANE_FALSE, 0x00, 0x11},
|
||||||
|
|
||||||
/* HP 2300 master settings */
|
/* HP 2300 master settings */
|
||||||
{CCD_HP2300, 75, SANE_TRUE , 75, 4480, 150, 1, 42, NULL, SANE_TRUE , 0x20, 0x85},
|
{CCD_HP2300, 75, 3, 75, 4480, 150, 1, 42, NULL, SANE_TRUE , 0x20, 0x85},
|
||||||
{CCD_HP2300, 150, SANE_TRUE , 150, 4350, 300, 1, 42, NULL, SANE_TRUE , 0x20, 0x85},
|
{CCD_HP2300, 150, 3, 150, 4350, 300, 1, 42, NULL, SANE_TRUE , 0x20, 0x85},
|
||||||
{CCD_HP2300, 300, SANE_TRUE, 300, 4350, 600, 1, 42, NULL, SANE_TRUE , 0x20, 0x85},
|
{CCD_HP2300, 300, 3, 300, 4350, 600, 1, 42, NULL, SANE_TRUE , 0x20, 0x85},
|
||||||
{CCD_HP2300, 600, SANE_TRUE , 600, 8700, 600, 1, 42, NULL, SANE_FALSE, 0x20, 0x05},
|
{CCD_HP2300, 600, 3, 600, 8700, 600, 1, 42, NULL, SANE_FALSE, 0x20, 0x05},
|
||||||
{CCD_HP2300,1200, SANE_TRUE , 600, 8700, 600, 1, 42, NULL, SANE_FALSE, 0x20, 0x05},
|
{CCD_HP2300,1200, 3, 600, 8700, 600, 1, 42, NULL, SANE_FALSE, 0x20, 0x05},
|
||||||
{CCD_HP2300, 75, SANE_FALSE, 75, 4480, 150, 1, 42, NULL, SANE_TRUE , 0x20, 0x85},
|
{CCD_HP2300, 75, 1, 75, 4480, 150, 1, 42, NULL, SANE_TRUE , 0x20, 0x85},
|
||||||
{CCD_HP2300, 150, SANE_FALSE, 150, 4350, 300, 1, 42, NULL, SANE_TRUE , 0x20, 0x85},
|
{CCD_HP2300, 150, 1, 150, 4350, 300, 1, 42, NULL, SANE_TRUE , 0x20, 0x85},
|
||||||
{CCD_HP2300, 300, SANE_FALSE, 300, 4350, 600, 1, 42, NULL, SANE_TRUE , 0x20, 0x85},
|
{CCD_HP2300, 300, 1, 300, 4350, 600, 1, 42, NULL, SANE_TRUE , 0x20, 0x85},
|
||||||
{CCD_HP2300, 600, SANE_FALSE, 600, 8700, 600, 1, 42, NULL, SANE_FALSE, 0x20, 0x05},
|
{CCD_HP2300, 600, 1, 600, 8700, 600, 1, 42, NULL, SANE_FALSE, 0x20, 0x05},
|
||||||
{CCD_HP2300,1200, SANE_FALSE, 600, 8700, 600, 1, 42, NULL, SANE_FALSE, 0x20, 0x05},
|
{CCD_HP2300,1200, 1, 600, 8700, 600, 1, 42, NULL, SANE_FALSE, 0x20, 0x05},
|
||||||
/* non half ccd 300 dpi settings
|
/* non half ccd 300 dpi settings
|
||||||
{CCD_HP2300, 300, SANE_TRUE , 300, 8700, 300, 1, 42, NULL, SANE_FALSE, 0x20, 0x05},
|
{CCD_HP2300, 300, 3, 300, 8700, 300, 1, 42, NULL, SANE_FALSE, 0x20, 0x05},
|
||||||
{CCD_HP2300, 300, SANE_FALSE, 300, 8700, 300, 1, 42, NULL, SANE_FALSE, 0x20, 0x05},
|
{CCD_HP2300, 300, 1, 300, 8700, 300, 1, 42, NULL, SANE_FALSE, 0x20, 0x05},
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* MD5345/6471 master settings */
|
/* MD5345/6471 master settings */
|
||||||
{CCD_5345 , 50, SANE_TRUE , 50, 12000, 100, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
{CCD_5345 , 50, 3, 50, 12000, 100, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
||||||
{CCD_5345 , 75, SANE_TRUE , 75, 11000, 150, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
{CCD_5345 , 75, 3, 75, 11000, 150, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
||||||
{CCD_5345 , 100, SANE_TRUE , 100, 11000, 200, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
{CCD_5345 , 100, 3, 100, 11000, 200, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
||||||
{CCD_5345 , 150, SANE_TRUE , 150, 11000, 300, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
{CCD_5345 , 150, 3, 150, 11000, 300, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
||||||
{CCD_5345 , 200, SANE_TRUE , 200, 11000, 400, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
{CCD_5345 , 200, 3, 200, 11000, 400, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
||||||
{CCD_5345 , 300, SANE_TRUE , 300, 11000, 600, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
{CCD_5345 , 300, 3, 300, 11000, 600, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
||||||
{CCD_5345 , 400, SANE_TRUE , 400, 11000, 800, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
{CCD_5345 , 400, 3, 400, 11000, 800, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
||||||
{CCD_5345 , 600, SANE_TRUE , 600, 11000,1200, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
{CCD_5345 , 600, 3, 600, 11000,1200, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
||||||
{CCD_5345 ,1200, SANE_TRUE ,1200, 11000,1200, 1, 42, NULL, SANE_FALSE, 0x30, 0x03},
|
{CCD_5345 ,1200, 3, 1200, 11000,1200, 1, 42, NULL, SANE_FALSE, 0x30, 0x03},
|
||||||
{CCD_5345 ,2400, SANE_TRUE ,1200, 11000,1200, 1, 42, NULL, SANE_FALSE, 0x30, 0x03},
|
{CCD_5345 ,2400, 3, 1200, 11000,1200, 1, 42, NULL, SANE_FALSE, 0x30, 0x03},
|
||||||
{CCD_5345 , 50, SANE_FALSE, 50, 12000, 100, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
{CCD_5345 , 50, 1, 50, 12000, 100, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
||||||
{CCD_5345 , 75, SANE_FALSE, 75, 11000, 150, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
{CCD_5345 , 75, 1, 75, 11000, 150, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
||||||
{CCD_5345 , 100, SANE_FALSE, 100, 11000, 200, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
{CCD_5345 , 100, 1, 100, 11000, 200, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
||||||
{CCD_5345 , 150, SANE_FALSE, 150, 11000, 300, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
{CCD_5345 , 150, 1, 150, 11000, 300, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
||||||
{CCD_5345 , 200, SANE_FALSE, 200, 11000, 400, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
{CCD_5345 , 200, 1, 200, 11000, 400, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
||||||
{CCD_5345 , 300, SANE_FALSE, 300, 11000, 600, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
{CCD_5345 , 300, 1, 300, 11000, 600, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
||||||
{CCD_5345 , 400, SANE_FALSE, 400, 11000, 800, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
{CCD_5345 , 400, 1, 400, 11000, 800, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
||||||
{CCD_5345 , 600, SANE_FALSE, 600, 11000,1200, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
{CCD_5345 , 600, 1, 600, 11000,1200, 1, 42, NULL, SANE_TRUE , 0x28, 0x03},
|
||||||
{CCD_5345 ,1200, SANE_FALSE,1200, 11000,1200, 1, 42, NULL, SANE_FALSE, 0x30, 0x03},
|
{CCD_5345 ,1200, 1, 1200, 11000,1200, 1, 42, NULL, SANE_FALSE, 0x30, 0x03},
|
||||||
{CCD_5345 ,2400, SANE_FALSE,1200, 11000,1200, 1, 42, NULL, SANE_FALSE, 0x30, 0x03},
|
{CCD_5345 ,2400, 1, 1200, 11000,1200, 1, 42, NULL, SANE_FALSE, 0x30, 0x03},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -443,88 +438,88 @@ static Sensor_Master sensor_master[] = {
|
||||||
*/
|
*/
|
||||||
static Motor_Master motor_master[] = {
|
static Motor_Master motor_master[] = {
|
||||||
/* HP3670 motor settings */
|
/* HP3670 motor settings */
|
||||||
{MOTOR_HP3670, 75, SANE_TRUE , 75, FULL_STEP, SANE_FALSE, SANE_TRUE , 1, 200, 3429, 305, 192, 3399, 337, 0.3, 0.4, 192},
|
{MOTOR_HP3670, 75, 3, 75, FULL_STEP, SANE_FALSE, SANE_TRUE , 1, 200, 3429, 305, 192, 3399, 337, 0.3, 0.4, 192},
|
||||||
{MOTOR_HP3670, 100, SANE_TRUE , 100, HALF_STEP, SANE_FALSE, SANE_TRUE , 1, 143, 2905, 187, 192, 3399, 337, 0.3, 0.4, 192},
|
{MOTOR_HP3670, 100, 3, 100, HALF_STEP, SANE_FALSE, SANE_TRUE , 1, 143, 2905, 187, 192, 3399, 337, 0.3, 0.4, 192},
|
||||||
{MOTOR_HP3670, 150, SANE_TRUE , 150, HALF_STEP, SANE_FALSE, SANE_TRUE , 1, 73, 3429, 305, 192, 3399, 337, 0.3, 0.4, 192},
|
{MOTOR_HP3670, 150, 3, 150, HALF_STEP, SANE_FALSE, SANE_TRUE , 1, 73, 3429, 305, 192, 3399, 337, 0.3, 0.4, 192},
|
||||||
{MOTOR_HP3670, 300, SANE_TRUE , 300, HALF_STEP, SANE_FALSE, SANE_TRUE , 1, 11, 1055, 563, 192, 3399, 337, 0.3, 0.4, 192},
|
{MOTOR_HP3670, 300, 3, 300, HALF_STEP, SANE_FALSE, SANE_TRUE , 1, 11, 1055, 563, 192, 3399, 337, 0.3, 0.4, 192},
|
||||||
{MOTOR_HP3670, 600, SANE_TRUE , 600, FULL_STEP, SANE_FALSE, SANE_TRUE , 0, 3, 10687, 5126, 192, 3399, 337, 0.3, 0.4, 192},
|
{MOTOR_HP3670, 600, 3, 600, FULL_STEP, SANE_FALSE, SANE_TRUE , 0, 3, 10687, 5126, 192, 3399, 337, 0.3, 0.4, 192},
|
||||||
{MOTOR_HP3670,1200, SANE_TRUE ,1200, HALF_STEP, SANE_FALSE, SANE_TRUE , 0, 3, 15937, 6375, 192, 3399, 337, 0.3, 0.4, 192},
|
{MOTOR_HP3670,1200, 3,1200, HALF_STEP, SANE_FALSE, SANE_TRUE , 0, 3, 15937, 6375, 192, 3399, 337, 0.3, 0.4, 192},
|
||||||
{MOTOR_HP3670,2400, SANE_TRUE ,2400, HALF_STEP, SANE_FALSE, SANE_TRUE , 0, 3, 15937, 12750, 192, 3399, 337, 0.3, 0.4, 192},
|
{MOTOR_HP3670,2400, 3,2400, HALF_STEP, SANE_FALSE, SANE_TRUE , 0, 3, 15937, 12750, 192, 3399, 337, 0.3, 0.4, 192},
|
||||||
{MOTOR_HP3670, 75, SANE_FALSE, 75, FULL_STEP, SANE_FALSE, SANE_TRUE , 1, 200, 3429, 305, 192, 3399, 337, 0.3, 0.4, 192},
|
{MOTOR_HP3670, 75, 1, 75, FULL_STEP, SANE_FALSE, SANE_TRUE , 1, 200, 3429, 305, 192, 3399, 337, 0.3, 0.4, 192},
|
||||||
{MOTOR_HP3670, 100, SANE_FALSE, 100, HALF_STEP, SANE_FALSE, SANE_TRUE , 1, 143, 2905, 187, 192, 3399, 337, 0.3, 0.4, 192},
|
{MOTOR_HP3670, 100, 1, 100, HALF_STEP, SANE_FALSE, SANE_TRUE , 1, 143, 2905, 187, 192, 3399, 337, 0.3, 0.4, 192},
|
||||||
{MOTOR_HP3670, 150, SANE_FALSE, 150, HALF_STEP, SANE_FALSE, SANE_TRUE , 1, 73, 3429, 305, 192, 3399, 337, 0.3, 0.4, 192},
|
{MOTOR_HP3670, 150, 1, 150, HALF_STEP, SANE_FALSE, SANE_TRUE , 1, 73, 3429, 305, 192, 3399, 337, 0.3, 0.4, 192},
|
||||||
{MOTOR_HP3670, 300, SANE_FALSE, 300, HALF_STEP, SANE_FALSE, SANE_TRUE , 1, 11, 1055, 563, 192, 3399, 337, 0.3, 0.4, 192},
|
{MOTOR_HP3670, 300, 1, 300, HALF_STEP, SANE_FALSE, SANE_TRUE , 1, 11, 1055, 563, 192, 3399, 337, 0.3, 0.4, 192},
|
||||||
{MOTOR_HP3670, 600, SANE_FALSE, 600, FULL_STEP, SANE_FALSE, SANE_TRUE , 0, 3, 10687, 5126, 192, 3399, 337, 0.3, 0.4, 192},
|
{MOTOR_HP3670, 600, 1, 600, FULL_STEP, SANE_FALSE, SANE_TRUE , 0, 3, 10687, 5126, 192, 3399, 337, 0.3, 0.4, 192},
|
||||||
{MOTOR_HP3670,1200, SANE_FALSE,1200, HALF_STEP, SANE_FALSE, SANE_TRUE , 0, 3, 15937, 6375, 192, 3399, 337, 0.3, 0.4, 192},
|
{MOTOR_HP3670,1200, 1,1200, HALF_STEP, SANE_FALSE, SANE_TRUE , 0, 3, 15937, 6375, 192, 3399, 337, 0.3, 0.4, 192},
|
||||||
{MOTOR_HP3670,2400, SANE_TRUE ,2400, HALF_STEP, SANE_FALSE, SANE_TRUE , 0, 3, 15937, 12750, 192, 3399, 337, 0.3, 0.4, 192},
|
{MOTOR_HP3670,2400, 3,2400, HALF_STEP, SANE_FALSE, SANE_TRUE , 0, 3, 15937, 12750, 192, 3399, 337, 0.3, 0.4, 192},
|
||||||
|
|
||||||
/* HP2400/G2410 motor settings base motor dpi = 600 */
|
/* HP2400/G2410 motor settings base motor dpi = 600 */
|
||||||
{MOTOR_HP2400, 50, SANE_TRUE , 50, FULL_STEP, SANE_FALSE, SANE_TRUE , 63, 120, 8736, 601, 192, 4905, 337, 0.30, 0.4, 192},
|
{MOTOR_HP2400, 50, 3, 50, FULL_STEP, SANE_FALSE, SANE_TRUE , 63, 120, 8736, 601, 192, 4905, 337, 0.30, 0.4, 192},
|
||||||
{MOTOR_HP2400, 100, SANE_TRUE , 100, HALF_STEP, SANE_FALSE, SANE_TRUE, 63, 120, 8736, 601, 192, 4905, 337, 0.30, 0.4, 192},
|
{MOTOR_HP2400, 100, 3, 100, HALF_STEP, SANE_FALSE, SANE_TRUE, 63, 120, 8736, 601, 192, 4905, 337, 0.30, 0.4, 192},
|
||||||
{MOTOR_HP2400, 150, SANE_TRUE , 150, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 67, 15902, 902, 192, 4905, 337, 0.30, 0.4, 192},
|
{MOTOR_HP2400, 150, 3, 150, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 67, 15902, 902, 192, 4905, 337, 0.30, 0.4, 192},
|
||||||
{MOTOR_HP2400, 300, SANE_TRUE , 300, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 32, 16703, 2188, 192, 4905, 337, 0.30, 0.4, 192},
|
{MOTOR_HP2400, 300, 3, 300, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 32, 16703, 2188, 192, 4905, 337, 0.30, 0.4, 192},
|
||||||
{MOTOR_HP2400, 600, SANE_TRUE , 600, FULL_STEP, SANE_FALSE, SANE_TRUE , 63, 3, 18761, 18761, 192, 4905, 627, 0.30, 0.4, 192},
|
{MOTOR_HP2400, 600, 3, 600, FULL_STEP, SANE_FALSE, SANE_TRUE , 63, 3, 18761, 18761, 192, 4905, 627, 0.30, 0.4, 192},
|
||||||
{MOTOR_HP2400,1200, SANE_TRUE ,1200, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 3, 43501, 43501, 192, 4905, 627, 0.30, 0.4, 192},
|
{MOTOR_HP2400,1200, 3,1200, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 3, 43501, 43501, 192, 4905, 627, 0.30, 0.4, 192},
|
||||||
{MOTOR_HP2400, 50, SANE_FALSE, 50, FULL_STEP, SANE_FALSE, SANE_TRUE , 63, 120, 8736, 601, 192, 4905, 337, 0.30, 0.4, 192},
|
{MOTOR_HP2400, 50, 1, 50, FULL_STEP, SANE_FALSE, SANE_TRUE , 63, 120, 8736, 601, 192, 4905, 337, 0.30, 0.4, 192},
|
||||||
{MOTOR_HP2400, 100, SANE_FALSE, 100, HALF_STEP, SANE_FALSE, SANE_TRUE, 63, 120, 8736, 601, 192, 4905, 337, 0.30, 0.4, 192},
|
{MOTOR_HP2400, 100, 1, 100, HALF_STEP, SANE_FALSE, SANE_TRUE, 63, 120, 8736, 601, 192, 4905, 337, 0.30, 0.4, 192},
|
||||||
{MOTOR_HP2400, 150, SANE_FALSE, 150, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 67, 15902, 902, 192, 4905, 337, 0.30, 0.4, 192},
|
{MOTOR_HP2400, 150, 1, 150, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 67, 15902, 902, 192, 4905, 337, 0.30, 0.4, 192},
|
||||||
{MOTOR_HP2400, 300, SANE_FALSE, 300, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 32, 16703, 2188, 192, 4905, 337, 0.30, 0.4, 192},
|
{MOTOR_HP2400, 300, 1, 300, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 32, 16703, 2188, 192, 4905, 337, 0.30, 0.4, 192},
|
||||||
{MOTOR_HP2400, 600, SANE_FALSE, 600, FULL_STEP, SANE_FALSE, SANE_TRUE , 63, 3, 18761, 18761, 192, 4905, 337, 0.30, 0.4, 192},
|
{MOTOR_HP2400, 600, 1, 600, FULL_STEP, SANE_FALSE, SANE_TRUE , 63, 3, 18761, 18761, 192, 4905, 337, 0.30, 0.4, 192},
|
||||||
{MOTOR_HP2400,1200, SANE_FALSE,1200, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 3, 43501, 43501, 192, 4905, 337, 0.30, 0.4, 192},
|
{MOTOR_HP2400,1200, 1,1200, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 3, 43501, 43501, 192, 4905, 337, 0.30, 0.4, 192},
|
||||||
|
|
||||||
/* XP 200 motor settings */
|
/* XP 200 motor settings */
|
||||||
{MOTOR_XP200, 75, SANE_TRUE, 75, HALF_STEP, SANE_TRUE , SANE_FALSE, 0, 4, 6000, 2136, 8, 12000, 1200, 0.3, 0.5, 1},
|
{MOTOR_XP200, 75, 3, 75, HALF_STEP, SANE_TRUE , SANE_FALSE, 0, 4, 6000, 2136, 8, 12000, 1200, 0.3, 0.5, 1},
|
||||||
{MOTOR_XP200, 100, SANE_TRUE, 100, HALF_STEP, SANE_TRUE , SANE_FALSE, 0, 4, 6000, 2850, 8, 12000, 1200, 0.3, 0.5, 1},
|
{MOTOR_XP200, 100, 3, 100, HALF_STEP, SANE_TRUE , SANE_FALSE, 0, 4, 6000, 2850, 8, 12000, 1200, 0.3, 0.5, 1},
|
||||||
{MOTOR_XP200, 200, SANE_TRUE, 200, HALF_STEP, SANE_TRUE , SANE_FALSE, 0, 4, 6999, 5700, 8, 12000, 1200, 0.3, 0.5, 1},
|
{MOTOR_XP200, 200, 3, 200, HALF_STEP, SANE_TRUE , SANE_FALSE, 0, 4, 6999, 5700, 8, 12000, 1200, 0.3, 0.5, 1},
|
||||||
{MOTOR_XP200, 250, SANE_TRUE, 250, HALF_STEP, SANE_TRUE , SANE_FALSE, 0, 4, 6999, 6999, 8, 12000, 1200, 0.3, 0.5, 1},
|
{MOTOR_XP200, 250, 3, 250, HALF_STEP, SANE_TRUE , SANE_FALSE, 0, 4, 6999, 6999, 8, 12000, 1200, 0.3, 0.5, 1},
|
||||||
{MOTOR_XP200, 300, SANE_TRUE, 300, HALF_STEP, SANE_TRUE , SANE_FALSE, 0, 4, 13500, 13500, 8, 12000, 1200, 0.3, 0.5, 1},
|
{MOTOR_XP200, 300, 3, 300, HALF_STEP, SANE_TRUE , SANE_FALSE, 0, 4, 13500, 13500, 8, 12000, 1200, 0.3, 0.5, 1},
|
||||||
{MOTOR_XP200, 600, SANE_TRUE, 600, HALF_STEP, SANE_TRUE , SANE_TRUE, 0, 4, 31998, 31998, 2, 12000, 1200, 0.3, 0.5, 1},
|
{MOTOR_XP200, 600, 3, 600, HALF_STEP, SANE_TRUE , SANE_TRUE, 0, 4, 31998, 31998, 2, 12000, 1200, 0.3, 0.5, 1},
|
||||||
{MOTOR_XP200, 75, SANE_FALSE, 75, HALF_STEP, SANE_TRUE , SANE_FALSE, 0, 4, 6000, 2000, 8, 12000, 1200, 0.3, 0.5, 1},
|
{MOTOR_XP200, 75, 1, 75, HALF_STEP, SANE_TRUE , SANE_FALSE, 0, 4, 6000, 2000, 8, 12000, 1200, 0.3, 0.5, 1},
|
||||||
{MOTOR_XP200, 100, SANE_FALSE, 100, HALF_STEP, SANE_TRUE , SANE_FALSE, 0, 4, 6000, 1300, 8, 12000, 1200, 0.3, 0.5, 1},
|
{MOTOR_XP200, 100, 1, 100, HALF_STEP, SANE_TRUE , SANE_FALSE, 0, 4, 6000, 1300, 8, 12000, 1200, 0.3, 0.5, 1},
|
||||||
{MOTOR_XP200, 200, SANE_FALSE, 200, HALF_STEP, SANE_TRUE , SANE_TRUE, 0, 4, 6000, 3666, 8, 12000, 1200, 0.3, 0.5, 1},
|
{MOTOR_XP200, 200, 1, 200, HALF_STEP, SANE_TRUE , SANE_TRUE, 0, 4, 6000, 3666, 8, 12000, 1200, 0.3, 0.5, 1},
|
||||||
{MOTOR_XP200, 300, SANE_FALSE, 300, HALF_STEP, SANE_TRUE , SANE_FALSE, 0, 4, 6500, 6500, 8, 12000, 1200, 0.3, 0.5, 1},
|
{MOTOR_XP200, 300, 1, 300, HALF_STEP, SANE_TRUE , SANE_FALSE, 0, 4, 6500, 6500, 8, 12000, 1200, 0.3, 0.5, 1},
|
||||||
{MOTOR_XP200, 600, SANE_FALSE, 600, HALF_STEP, SANE_TRUE , SANE_TRUE, 0, 4, 24000, 24000, 2, 12000, 1200, 0.3, 0.5, 1},
|
{MOTOR_XP200, 600, 1, 600, HALF_STEP, SANE_TRUE , SANE_TRUE, 0, 4, 24000, 24000, 2, 12000, 1200, 0.3, 0.5, 1},
|
||||||
|
|
||||||
/* HP scanjet 2300c */
|
/* HP scanjet 2300c */
|
||||||
{MOTOR_HP2300, 75, SANE_TRUE, 75, FULL_STEP, SANE_FALSE, SANE_TRUE , 63, 120, 8139, 560, 120, 4905, 337, 0.3, 0.4, 16},
|
{MOTOR_HP2300, 75, 3, 75, FULL_STEP, SANE_FALSE, SANE_TRUE , 63, 120, 8139, 560, 120, 4905, 337, 0.3, 0.4, 16},
|
||||||
{MOTOR_HP2300, 150, SANE_TRUE, 150, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 67, 7903, 543, 120, 4905, 337, 0.3, 0.4, 16},
|
{MOTOR_HP2300, 150, 3, 150, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 67, 7903, 543, 120, 4905, 337, 0.3, 0.4, 16},
|
||||||
{MOTOR_HP2300, 300, SANE_TRUE, 300, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 3, 2175, 1087, 120, 4905, 337, 0.3, 0.4, 16},
|
{MOTOR_HP2300, 300, 3, 300, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 3, 2175, 1087, 120, 4905, 337, 0.3, 0.4, 16},
|
||||||
{MOTOR_HP2300, 600, SANE_TRUE, 600, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 3, 8700, 4350, 120, 4905, 337, 0.3, 0.4, 16},
|
{MOTOR_HP2300, 600, 3, 600, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 3, 8700, 4350, 120, 4905, 337, 0.3, 0.4, 16},
|
||||||
{MOTOR_HP2300,1200, SANE_TRUE,1200, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 3, 17400, 8700, 120, 4905, 337, 0.3, 0.4, 16},
|
{MOTOR_HP2300,1200, 3,1200, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 3, 17400, 8700, 120, 4905, 337, 0.3, 0.4, 16},
|
||||||
{MOTOR_HP2300, 75, SANE_FALSE, 75, FULL_STEP, SANE_FALSE, SANE_TRUE , 63, 120, 8139, 560, 120, 4905, 337, 0.3, 0.4, 16},
|
{MOTOR_HP2300, 75, 1, 75, FULL_STEP, SANE_FALSE, SANE_TRUE , 63, 120, 8139, 560, 120, 4905, 337, 0.3, 0.4, 16},
|
||||||
{MOTOR_HP2300, 150, SANE_FALSE, 150, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 67, 7903, 543, 120, 4905, 337, 0.3, 0.4, 16},
|
{MOTOR_HP2300, 150, 1, 150, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 67, 7903, 543, 120, 4905, 337, 0.3, 0.4, 16},
|
||||||
{MOTOR_HP2300, 300, SANE_FALSE, 300, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 3, 2175, 1087, 120, 4905, 337, 0.3, 0.4, 16},
|
{MOTOR_HP2300, 300, 1, 300, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 3, 2175, 1087, 120, 4905, 337, 0.3, 0.4, 16},
|
||||||
{MOTOR_HP2300, 600, SANE_FALSE, 600, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 3, 8700, 4350, 120, 4905, 337, 0.3, 0.4, 16},
|
{MOTOR_HP2300, 600, 1, 600, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 3, 8700, 4350, 120, 4905, 337, 0.3, 0.4, 16},
|
||||||
{MOTOR_HP2300,1200, SANE_FALSE,1200, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 3, 17400, 8700, 120, 4905, 337, 0.3, 0.4, 16},
|
{MOTOR_HP2300,1200, 1,1200, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 3, 17400, 8700, 120, 4905, 337, 0.3, 0.4, 16},
|
||||||
/* non half ccd settings for 300 dpi
|
/* non half ccd settings for 300 dpi
|
||||||
{MOTOR_HP2300, 300, SANE_TRUE, 300, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 44, 5386, 2175, 120, 4905, 337, 0.3, 0.4, 16},
|
{MOTOR_HP2300, 300, 3, 300, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 44, 5386, 2175, 120, 4905, 337, 0.3, 0.4, 16},
|
||||||
{MOTOR_HP2300, 300, SANE_FALSE, 300, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 44, 5386, 2175, 120, 4905, 337, 0.3, 0.4, 16},
|
{MOTOR_HP2300, 300, 1, 300, HALF_STEP, SANE_FALSE, SANE_TRUE , 63, 44, 5386, 2175, 120, 4905, 337, 0.3, 0.4, 16},
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* MD5345/6471 motor settings */
|
/* MD5345/6471 motor settings */
|
||||||
/* vfinal=(exposure/(1200/dpi))/step_type */
|
/* vfinal=(exposure/(1200/dpi))/step_type */
|
||||||
{MOTOR_5345, 50, SANE_TRUE , 50, HALF_STEP , SANE_FALSE, SANE_TRUE , 2, 255, 2500, 250, 255, 2000, 300, 0.3, 0.4, 64},
|
{MOTOR_5345, 50, 3, 50, HALF_STEP , SANE_FALSE, SANE_TRUE , 2, 255, 2500, 250, 255, 2000, 300, 0.3, 0.4, 64},
|
||||||
{MOTOR_5345, 75, SANE_TRUE , 75, HALF_STEP , SANE_FALSE, SANE_TRUE , 2, 255, 2500, 343, 255, 2000, 300, 0.3, 0.4, 64},
|
{MOTOR_5345, 75, 3, 75, HALF_STEP , SANE_FALSE, SANE_TRUE , 2, 255, 2500, 343, 255, 2000, 300, 0.3, 0.4, 64},
|
||||||
{MOTOR_5345, 100, SANE_TRUE , 100, HALF_STEP , SANE_FALSE, SANE_TRUE , 2, 255, 2500, 458, 255, 2000, 300, 0.3, 0.4, 64},
|
{MOTOR_5345, 100, 3, 100, HALF_STEP , SANE_FALSE, SANE_TRUE , 2, 255, 2500, 458, 255, 2000, 300, 0.3, 0.4, 64},
|
||||||
{MOTOR_5345, 150, SANE_TRUE , 150, HALF_STEP , SANE_FALSE, SANE_TRUE , 2, 255, 2500, 687, 255, 2000, 300, 0.3, 0.4, 64},
|
{MOTOR_5345, 150, 3, 150, HALF_STEP , SANE_FALSE, SANE_TRUE , 2, 255, 2500, 687, 255, 2000, 300, 0.3, 0.4, 64},
|
||||||
{MOTOR_5345, 200, SANE_TRUE , 200, HALF_STEP , SANE_FALSE, SANE_TRUE , 2, 255, 2500, 916, 255, 2000, 300, 0.3, 0.4, 64},
|
{MOTOR_5345, 200, 3, 200, HALF_STEP , SANE_FALSE, SANE_TRUE , 2, 255, 2500, 916, 255, 2000, 300, 0.3, 0.4, 64},
|
||||||
{MOTOR_5345, 300, SANE_TRUE, 300, HALF_STEP , SANE_FALSE, SANE_TRUE , 2, 255, 2500, 1375, 255, 2000, 300, 0.3, 0.4, 64},
|
{MOTOR_5345, 300, 3, 300, HALF_STEP , SANE_FALSE, SANE_TRUE , 2, 255, 2500, 1375, 255, 2000, 300, 0.3, 0.4, 64},
|
||||||
{MOTOR_5345, 400, SANE_TRUE, 400, HALF_STEP , SANE_FALSE, SANE_TRUE , 0, 32, 2000, 1833, 255, 2000, 300, 0.3, 0.4, 32},
|
{MOTOR_5345, 400, 3, 400, HALF_STEP , SANE_FALSE, SANE_TRUE , 0, 32, 2000, 1833, 255, 2000, 300, 0.3, 0.4, 32},
|
||||||
{MOTOR_5345, 500, SANE_TRUE, 500, HALF_STEP , SANE_FALSE, SANE_TRUE , 0, 32, 2291, 2291, 255, 2000, 300, 0.3, 0.4, 32},
|
{MOTOR_5345, 500, 3, 500, HALF_STEP , SANE_FALSE, SANE_TRUE , 0, 32, 2291, 2291, 255, 2000, 300, 0.3, 0.4, 32},
|
||||||
{MOTOR_5345, 600, SANE_TRUE, 600, HALF_STEP , SANE_FALSE, SANE_TRUE , 0, 32, 2750, 2750, 255, 2000, 300, 0.3, 0.4, 32},
|
{MOTOR_5345, 600, 3, 600, HALF_STEP , SANE_FALSE, SANE_TRUE , 0, 32, 2750, 2750, 255, 2000, 300, 0.3, 0.4, 32},
|
||||||
{MOTOR_5345, 1200, SANE_TRUE ,1200, QUATER_STEP, SANE_FALSE, SANE_TRUE , 0, 16, 2750, 2750, 255, 2000, 300, 0.3, 0.4, 146},
|
{MOTOR_5345, 1200, 3,1200, QUATER_STEP, SANE_FALSE, SANE_TRUE , 0, 16, 2750, 2750, 255, 2000, 300, 0.3, 0.4, 146},
|
||||||
{MOTOR_5345, 2400, SANE_TRUE ,2400, QUATER_STEP, SANE_FALSE, SANE_TRUE , 0, 16, 5500, 5500, 255, 2000, 300, 0.3, 0.4, 146},
|
{MOTOR_5345, 2400, 3,2400, QUATER_STEP, SANE_FALSE, SANE_TRUE , 0, 16, 5500, 5500, 255, 2000, 300, 0.3, 0.4, 146},
|
||||||
{MOTOR_5345, 50, SANE_FALSE, 50, HALF_STEP , SANE_FALSE, SANE_TRUE , 2, 255, 2500, 250, 255, 2000, 300, 0.3, 0.4, 64},
|
{MOTOR_5345, 50, 1, 50, HALF_STEP , SANE_FALSE, SANE_TRUE , 2, 255, 2500, 250, 255, 2000, 300, 0.3, 0.4, 64},
|
||||||
{MOTOR_5345, 75, SANE_FALSE, 75, HALF_STEP , SANE_FALSE, SANE_TRUE , 2, 255, 2500, 343, 255, 2000, 300, 0.3, 0.4, 64},
|
{MOTOR_5345, 75, 1, 75, HALF_STEP , SANE_FALSE, SANE_TRUE , 2, 255, 2500, 343, 255, 2000, 300, 0.3, 0.4, 64},
|
||||||
{MOTOR_5345, 100, SANE_FALSE, 100, HALF_STEP , SANE_FALSE, SANE_TRUE , 2, 255, 2500, 458, 255, 2000, 300, 0.3, 0.4, 64},
|
{MOTOR_5345, 100, 1, 100, HALF_STEP , SANE_FALSE, SANE_TRUE , 2, 255, 2500, 458, 255, 2000, 300, 0.3, 0.4, 64},
|
||||||
{MOTOR_5345, 150, SANE_FALSE, 150, HALF_STEP , SANE_FALSE, SANE_TRUE , 2, 255, 2500, 687, 255, 2000, 300, 0.3, 0.4, 64},
|
{MOTOR_5345, 150, 1, 150, HALF_STEP , SANE_FALSE, SANE_TRUE , 2, 255, 2500, 687, 255, 2000, 300, 0.3, 0.4, 64},
|
||||||
{MOTOR_5345, 200, SANE_FALSE, 200, HALF_STEP , SANE_FALSE, SANE_TRUE , 2, 255, 2500, 916, 255, 2000, 300, 0.3, 0.4, 64},
|
{MOTOR_5345, 200, 1, 200, HALF_STEP , SANE_FALSE, SANE_TRUE , 2, 255, 2500, 916, 255, 2000, 300, 0.3, 0.4, 64},
|
||||||
{MOTOR_5345, 300, SANE_FALSE, 300, HALF_STEP , SANE_FALSE, SANE_TRUE , 2, 255, 2500, 1375, 255, 2000, 300, 0.3, 0.4, 64},
|
{MOTOR_5345, 300, 1, 300, HALF_STEP , SANE_FALSE, SANE_TRUE , 2, 255, 2500, 1375, 255, 2000, 300, 0.3, 0.4, 64},
|
||||||
{MOTOR_5345, 400, SANE_FALSE, 400, HALF_STEP , SANE_FALSE, SANE_TRUE , 0, 32, 2000, 1833, 255, 2000, 300, 0.3, 0.4, 32},
|
{MOTOR_5345, 400, 1, 400, HALF_STEP , SANE_FALSE, SANE_TRUE , 0, 32, 2000, 1833, 255, 2000, 300, 0.3, 0.4, 32},
|
||||||
{MOTOR_5345, 500, SANE_FALSE, 500, HALF_STEP , SANE_FALSE, SANE_TRUE , 0, 32, 2291, 2291, 255, 2000, 300, 0.3, 0.4, 32},
|
{MOTOR_5345, 500, 1, 500, HALF_STEP , SANE_FALSE, SANE_TRUE , 0, 32, 2291, 2291, 255, 2000, 300, 0.3, 0.4, 32},
|
||||||
{MOTOR_5345, 600, SANE_FALSE, 600, HALF_STEP , SANE_FALSE, SANE_TRUE , 0, 32, 2750, 2750, 255, 2000, 300, 0.3, 0.4, 32},
|
{MOTOR_5345, 600, 1, 600, HALF_STEP , SANE_FALSE, SANE_TRUE , 0, 32, 2750, 2750, 255, 2000, 300, 0.3, 0.4, 32},
|
||||||
{MOTOR_5345, 1200, SANE_FALSE,1200, QUATER_STEP, SANE_FALSE, SANE_TRUE , 0, 16, 2750, 2750, 255, 2000, 300, 0.3, 0.4, 146},
|
{MOTOR_5345, 1200, 1,1200, QUATER_STEP, SANE_FALSE, SANE_TRUE , 0, 16, 2750, 2750, 255, 2000, 300, 0.3, 0.4, 146},
|
||||||
{MOTOR_5345, 2400, SANE_FALSE,2400, QUATER_STEP, SANE_FALSE, SANE_TRUE , 0, 16, 5500, 5500, 255, 2000, 300, 0.3, 0.4, 146}, /* 5500 guessed */
|
{MOTOR_5345, 2400, 1,2400, QUATER_STEP, SANE_FALSE, SANE_TRUE , 0, 16, 5500, 5500, 255, 2000, 300, 0.3, 0.4, 146}, /* 5500 guessed */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Plik diff jest za duży
Load Diff
Plik diff jest za duży
Load Diff
Plik diff jest za duży
Load Diff
|
@ -342,18 +342,8 @@
|
||||||
*
|
*
|
||||||
* this function sets up the scanner to scan in normal or single line mode
|
* this function sets up the scanner to scan in normal or single line mode
|
||||||
*/
|
*/
|
||||||
static SANE_Status gl846_init_scan_regs (Genesys_Device * dev, const Genesys_Sensor& sensor,
|
static SANE_Status gl846_init_scan_regs(Genesys_Device * dev, const Genesys_Sensor& sensor,
|
||||||
Genesys_Register_Set * reg,
|
Genesys_Register_Set * reg, SetupParams& params);
|
||||||
float xres, /*dpi */
|
|
||||||
float yres, /*dpi */
|
|
||||||
float startx, /*optical_res, from dummy_pixel+1 */
|
|
||||||
float starty, /*base_ydpi, from home! */
|
|
||||||
float pixels,
|
|
||||||
float lines,
|
|
||||||
unsigned int depth,
|
|
||||||
unsigned int channels,
|
|
||||||
int color_filter,
|
|
||||||
unsigned int flags);
|
|
||||||
|
|
||||||
/* Send the low-level scan command */
|
/* Send the low-level scan command */
|
||||||
static SANE_Status gl846_begin_scan (Genesys_Device * dev, const Genesys_Sensor& sensor,
|
static SANE_Status gl846_begin_scan (Genesys_Device * dev, const Genesys_Sensor& sensor,
|
||||||
|
|
Plik diff jest za duży
Load Diff
|
@ -326,19 +326,8 @@
|
||||||
*
|
*
|
||||||
* this function sets up the scanner to scan in normal or single line mode
|
* this function sets up the scanner to scan in normal or single line mode
|
||||||
*/
|
*/
|
||||||
static SANE_Status gl847_init_scan_regs (Genesys_Device * dev,
|
static SANE_Status gl847_init_scan_regs(Genesys_Device * dev, const Genesys_Sensor& sensor,
|
||||||
const Genesys_Sensor& sensor,
|
Genesys_Register_Set * reg, SetupParams& params);
|
||||||
Genesys_Register_Set * reg,
|
|
||||||
float xres, /*dpi */
|
|
||||||
float yres, /*dpi */
|
|
||||||
float startx, /*optical_res, from dummy_pixel+1 */
|
|
||||||
float starty, /*base_ydpi, from home! */
|
|
||||||
float pixels,
|
|
||||||
float lines,
|
|
||||||
unsigned int depth,
|
|
||||||
unsigned int channels,
|
|
||||||
int color_filter,
|
|
||||||
unsigned int flags);
|
|
||||||
|
|
||||||
/* Send the low-level scan command */
|
/* Send the low-level scan command */
|
||||||
static SANE_Status gl847_begin_scan (Genesys_Device * dev, const Genesys_Sensor& sensor,
|
static SANE_Status gl847_begin_scan (Genesys_Device * dev, const Genesys_Sensor& sensor,
|
||||||
|
|
|
@ -1070,6 +1070,50 @@ sanei_genesys_read_feed_steps (Genesys_Device * dev, unsigned int *steps)
|
||||||
return SANE_STATUS_GOOD;
|
return SANE_STATUS_GOOD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void sanei_genesys_set_lamp_power(Genesys_Device* dev, const Genesys_Sensor& sensor,
|
||||||
|
Genesys_Register_Set& regs, bool set)
|
||||||
|
{
|
||||||
|
static const uint8_t REG03_LAMPPWR = 0x10;
|
||||||
|
|
||||||
|
if (set) {
|
||||||
|
regs.find_reg(0x03).value |= REG03_LAMPPWR;
|
||||||
|
|
||||||
|
if (dev->model->asic_type == GENESYS_GL841) {
|
||||||
|
sanei_genesys_set_exposure(regs, sanei_genesys_fixup_exposure(sensor.exposure));
|
||||||
|
regs.set8(0x19, 0x50);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dev->model->asic_type == GENESYS_GL843) {
|
||||||
|
sanei_genesys_set_exposure(regs, sensor.exposure);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
regs.find_reg(0x03).value &= ~REG03_LAMPPWR;
|
||||||
|
|
||||||
|
if (dev->model->asic_type == GENESYS_GL841) {
|
||||||
|
sanei_genesys_set_exposure(regs, {0x0101, 0x0101, 0x0101});
|
||||||
|
regs.set8(0x19, 0xff);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dev->model->asic_type == GENESYS_GL843) {
|
||||||
|
if (dev->model->model_id != MODEL_CANON_CANOSCAN_8600F) {
|
||||||
|
// BUG: datasheet says we shouldn't set exposure to zero
|
||||||
|
sanei_genesys_set_exposure(regs, {0, 0, 0});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
regs.state.is_lamp_on = set;
|
||||||
|
}
|
||||||
|
|
||||||
|
void sanei_genesys_set_motor_power(Genesys_Register_Set& regs, bool set)
|
||||||
|
{
|
||||||
|
static const uint8_t REG02_MTRPWR = 0x10;
|
||||||
|
|
||||||
|
if (set) {
|
||||||
|
regs.find_reg(0x02).value |= REG02_MTRPWR;
|
||||||
|
} else {
|
||||||
|
regs.find_reg(0x02).value &= ~REG02_MTRPWR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write to many registers at once
|
* Write to many registers at once
|
||||||
|
@ -1440,7 +1484,7 @@ sanei_genesys_asic_init(Genesys_Device* dev, int /*max_regs*/)
|
||||||
dev->white_average_data.clear();
|
dev->white_average_data.clear();
|
||||||
dev->dark_average_data.clear();
|
dev->dark_average_data.clear();
|
||||||
|
|
||||||
dev->settings.color_filter = 0;
|
dev->settings.color_filter = ColorFilter::RED;
|
||||||
|
|
||||||
/* duplicate initial values into calibration registers */
|
/* duplicate initial values into calibration registers */
|
||||||
dev->calib_reg = dev->reg;
|
dev->calib_reg = dev->reg;
|
||||||
|
@ -1853,7 +1897,6 @@ sanei_genesys_is_compatible_calibration (Genesys_Device * dev,
|
||||||
sane_strstatus (status));
|
sane_strstatus (status));
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
dev->current_setup.scan_method = dev->settings.scan_method;
|
|
||||||
|
|
||||||
DBG (DBG_proc, "%s: checking\n", __func__);
|
DBG (DBG_proc, "%s: checking\n", __func__);
|
||||||
|
|
||||||
|
@ -1880,10 +1923,11 @@ sanei_genesys_is_compatible_calibration (Genesys_Device * dev,
|
||||||
dev->current_setup.ccd_size_divisor, cache->used_setup.ccd_size_divisor);
|
dev->current_setup.ccd_size_divisor, cache->used_setup.ccd_size_divisor);
|
||||||
compatible = 0;
|
compatible = 0;
|
||||||
}
|
}
|
||||||
if (dev->current_setup.scan_method != cache->used_setup.scan_method)
|
if (dev->current_setup.params.scan_method != cache->used_setup.params.scan_method)
|
||||||
{
|
{
|
||||||
DBG (DBG_io, "%s: current method=%d, used=%d\n", __func__,
|
DBG (DBG_io, "%s: current method=%d, used=%d\n", __func__,
|
||||||
dev->current_setup.scan_method, cache->used_setup.scan_method);
|
static_cast<unsigned>(dev->current_setup.params.scan_method),
|
||||||
|
static_cast<unsigned>(cache->used_setup.params.scan_method));
|
||||||
compatible = 0;
|
compatible = 0;
|
||||||
}
|
}
|
||||||
if (!compatible)
|
if (!compatible)
|
||||||
|
@ -1900,7 +1944,7 @@ sanei_genesys_is_compatible_calibration (Genesys_Device * dev,
|
||||||
gettimeofday (&time, NULL);
|
gettimeofday (&time, NULL);
|
||||||
if ((time.tv_sec - cache->last_calibration > dev->settings.expiration_time*60)
|
if ((time.tv_sec - cache->last_calibration > dev->settings.expiration_time*60)
|
||||||
&& (dev->model->is_sheetfed == SANE_FALSE)
|
&& (dev->model->is_sheetfed == SANE_FALSE)
|
||||||
&& (dev->settings.scan_method == SCAN_METHOD_FLATBED))
|
&& (dev->settings.scan_method == ScanMethod::FLATBED))
|
||||||
{
|
{
|
||||||
DBG (DBG_proc, "%s: expired entry, non compatible cache\n", __func__);
|
DBG (DBG_proc, "%s: expired entry, non compatible cache\n", __func__);
|
||||||
return SANE_STATUS_UNSUPPORTED;
|
return SANE_STATUS_UNSUPPORTED;
|
||||||
|
@ -2080,3 +2124,39 @@ void run_functions_at_backend_exit()
|
||||||
}
|
}
|
||||||
s_functions_run_at_backend_exit.release();
|
s_functions_run_at_backend_exit.release();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void debug_dump(unsigned level, const Genesys_Settings& settings)
|
||||||
|
{
|
||||||
|
DBG(level, "settings:\n"
|
||||||
|
"Resolution X/Y : %u / %u dpi\n"
|
||||||
|
"Lines : %u\n"
|
||||||
|
"Pixels per line : %u\n"
|
||||||
|
"Depth : %u\n"
|
||||||
|
"Start position X/Y : %.3f/%.3f\n"
|
||||||
|
"Scan mode : %d\n\n",
|
||||||
|
settings.xres, settings.yres,
|
||||||
|
settings.lines, settings.pixels, settings.depth,
|
||||||
|
settings.tl_x, settings.tl_y,
|
||||||
|
static_cast<unsigned>(settings.scan_mode));
|
||||||
|
}
|
||||||
|
|
||||||
|
void debug_dump(unsigned level, const SetupParams& params)
|
||||||
|
{
|
||||||
|
DBG(level, "settings:\n"
|
||||||
|
"Resolution X/Y : %u / %u dpi\n"
|
||||||
|
"Lines : %u\n"
|
||||||
|
"Pixels per line : %u\n"
|
||||||
|
"Depth : %u\n"
|
||||||
|
"Channels : %u\n"
|
||||||
|
"Start position X/Y : %g / %g\n"
|
||||||
|
"Scan mode : %d\n"
|
||||||
|
"Color filter : %d\n"
|
||||||
|
"Flags : %x\n",
|
||||||
|
params.xres, params.yres,
|
||||||
|
params.lines, params.pixels,
|
||||||
|
params.depth, params.channels,
|
||||||
|
params.startx, params.starty,
|
||||||
|
static_cast<unsigned>(params.scan_mode),
|
||||||
|
static_cast<unsigned>(params.color_filter),
|
||||||
|
params.flags);
|
||||||
|
}
|
||||||
|
|
|
@ -85,6 +85,7 @@
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
#include <limits>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
@ -151,6 +152,8 @@
|
||||||
#define GENESYS_FLAG_SHADING_NO_MOVE (1 << 17) /**< scanner doesn't move sensor during shading calibration */
|
#define GENESYS_FLAG_SHADING_NO_MOVE (1 << 17) /**< scanner doesn't move sensor during shading calibration */
|
||||||
#define GENESYS_FLAG_SHADING_REPARK (1 << 18) /**< repark head between shading scans */
|
#define GENESYS_FLAG_SHADING_REPARK (1 << 18) /**< repark head between shading scans */
|
||||||
#define GENESYS_FLAG_FULL_HWDPI_MODE (1 << 19) /**< scanner always use maximum hw dpi to setup the sensor */
|
#define GENESYS_FLAG_FULL_HWDPI_MODE (1 << 19) /**< scanner always use maximum hw dpi to setup the sensor */
|
||||||
|
// scanner has infrared transparency scanning capability
|
||||||
|
#define GENESYS_FLAG_HAS_UTA_INFRARED (1 << 20)
|
||||||
|
|
||||||
#define GENESYS_HAS_NO_BUTTONS 0 /**< scanner has no supported button */
|
#define GENESYS_HAS_NO_BUTTONS 0 /**< scanner has no supported button */
|
||||||
#define GENESYS_HAS_SCAN_SW (1 << 0) /**< scanner has SCAN button */
|
#define GENESYS_HAS_SCAN_SW (1 << 0) /**< scanner has SCAN button */
|
||||||
|
@ -218,6 +221,29 @@
|
||||||
|
|
||||||
#define GENESYS_MAX_REGS 256
|
#define GENESYS_MAX_REGS 256
|
||||||
|
|
||||||
|
enum class ScanMethod : unsigned {
|
||||||
|
// normal scan method
|
||||||
|
FLATBED = 0,
|
||||||
|
// scan using transparency adaptor
|
||||||
|
TRANSPARENCY = 1,
|
||||||
|
// scan using transparency adaptor via infrared channel
|
||||||
|
TRANSPARENCY_INFRARED = 2
|
||||||
|
};
|
||||||
|
|
||||||
|
enum class ScanColorMode : unsigned {
|
||||||
|
LINEART = 0,
|
||||||
|
HALFTONE,
|
||||||
|
GRAY,
|
||||||
|
COLOR_SINGLE_PASS
|
||||||
|
};
|
||||||
|
|
||||||
|
enum class ColorFilter : unsigned {
|
||||||
|
RED = 0,
|
||||||
|
GREEN,
|
||||||
|
BLUE,
|
||||||
|
NONE
|
||||||
|
};
|
||||||
|
|
||||||
struct GenesysRegister {
|
struct GenesysRegister {
|
||||||
uint16_t address = 0;
|
uint16_t address = 0;
|
||||||
uint8_t value = 0;
|
uint8_t value = 0;
|
||||||
|
@ -228,12 +254,20 @@ inline bool operator<(const GenesysRegister& lhs, const GenesysRegister& rhs)
|
||||||
return lhs.address < rhs.address;
|
return lhs.address < rhs.address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct GenesysRegisterSetState {
|
||||||
|
bool is_lamp_on = false;
|
||||||
|
bool is_xpa_on = false;
|
||||||
|
};
|
||||||
|
|
||||||
class Genesys_Register_Set {
|
class Genesys_Register_Set {
|
||||||
public:
|
public:
|
||||||
using container = std::vector<GenesysRegister>;
|
using container = std::vector<GenesysRegister>;
|
||||||
using iterator = typename container::iterator;
|
using iterator = typename container::iterator;
|
||||||
using const_iterator = typename container::const_iterator;
|
using const_iterator = typename container::const_iterator;
|
||||||
|
|
||||||
|
// FIXME: this shouldn't live here, but in a separate struct that contains Genesys_Register_Set
|
||||||
|
GenesysRegisterSetState state;
|
||||||
|
|
||||||
enum Options {
|
enum Options {
|
||||||
SEQUENTIAL = 1
|
SEQUENTIAL = 1
|
||||||
};
|
};
|
||||||
|
@ -559,8 +593,8 @@ struct Genesys_Sensor {
|
||||||
int min_resolution = -1;
|
int min_resolution = -1;
|
||||||
int max_resolution = -1;
|
int max_resolution = -1;
|
||||||
|
|
||||||
// whether the sensor is transparency sensor.
|
// the scan method used with the sensor
|
||||||
bool is_transparency = false;
|
ScanMethod method = ScanMethod::FLATBED;
|
||||||
|
|
||||||
// CCD may present itself as half or quarter-size CCD on certain resolutions
|
// CCD may present itself as half or quarter-size CCD on certain resolutions
|
||||||
int ccd_size_divisor = 1;
|
int ccd_size_divisor = 1;
|
||||||
|
@ -930,8 +964,10 @@ typedef struct Genesys_Command_Set
|
||||||
Genesys_Register_Set * regs,
|
Genesys_Register_Set * regs,
|
||||||
int *channels, int *total_size);
|
int *channels, int *total_size);
|
||||||
SANE_Status (*init_regs_for_coarse_calibration) (Genesys_Device * dev,
|
SANE_Status (*init_regs_for_coarse_calibration) (Genesys_Device * dev,
|
||||||
const Genesys_Sensor& sensor);
|
const Genesys_Sensor& sensor,
|
||||||
SANE_Status (*init_regs_for_shading) (Genesys_Device * dev, const Genesys_Sensor& sensor);
|
Genesys_Register_Set& regs);
|
||||||
|
SANE_Status (*init_regs_for_shading) (Genesys_Device * dev, const Genesys_Sensor& sensor,
|
||||||
|
Genesys_Register_Set& regs);
|
||||||
SANE_Status (*init_regs_for_scan) (Genesys_Device * dev, const Genesys_Sensor& sensor);
|
SANE_Status (*init_regs_for_scan) (Genesys_Device * dev, const Genesys_Sensor& sensor);
|
||||||
|
|
||||||
SANE_Bool (*get_filter_bit) (Genesys_Register_Set * reg);
|
SANE_Bool (*get_filter_bit) (Genesys_Register_Set * reg);
|
||||||
|
@ -947,11 +983,6 @@ typedef struct Genesys_Command_Set
|
||||||
SANE_Status (*set_powersaving) (Genesys_Device * dev, int delay);
|
SANE_Status (*set_powersaving) (Genesys_Device * dev, int delay);
|
||||||
SANE_Status (*save_power) (Genesys_Device * dev, SANE_Bool enable);
|
SANE_Status (*save_power) (Genesys_Device * dev, SANE_Bool enable);
|
||||||
|
|
||||||
void (*set_motor_power) (Genesys_Register_Set * regs, SANE_Bool set);
|
|
||||||
void (*set_lamp_power) (Genesys_Device * dev, const Genesys_Sensor& sensor,
|
|
||||||
Genesys_Register_Set * regs,
|
|
||||||
SANE_Bool set);
|
|
||||||
|
|
||||||
SANE_Status (*begin_scan) (Genesys_Device * dev,
|
SANE_Status (*begin_scan) (Genesys_Device * dev,
|
||||||
const Genesys_Sensor& sensor,
|
const Genesys_Sensor& sensor,
|
||||||
Genesys_Register_Set * regs,
|
Genesys_Register_Set * regs,
|
||||||
|
@ -966,16 +997,19 @@ typedef struct Genesys_Command_Set
|
||||||
SANE_Status (*send_gamma_table) (Genesys_Device * dev, const Genesys_Sensor& sensor);
|
SANE_Status (*send_gamma_table) (Genesys_Device * dev, const Genesys_Sensor& sensor);
|
||||||
|
|
||||||
SANE_Status (*search_start_position) (Genesys_Device * dev);
|
SANE_Status (*search_start_position) (Genesys_Device * dev);
|
||||||
SANE_Status (*offset_calibration) (Genesys_Device * dev, const Genesys_Sensor& sensor);
|
SANE_Status (*offset_calibration) (Genesys_Device * dev, const Genesys_Sensor& sensor,
|
||||||
|
Genesys_Register_Set& regs);
|
||||||
SANE_Status (*coarse_gain_calibration) (Genesys_Device * dev,
|
SANE_Status (*coarse_gain_calibration) (Genesys_Device * dev,
|
||||||
const Genesys_Sensor& sensor, int dpi);
|
const Genesys_Sensor& sensor,
|
||||||
SANE_Status (*led_calibration) (Genesys_Device * dev, Genesys_Sensor& sensor);
|
Genesys_Register_Set& regs, int dpi);
|
||||||
|
SANE_Status (*led_calibration) (Genesys_Device * dev, Genesys_Sensor& sensor,
|
||||||
|
Genesys_Register_Set& regs);
|
||||||
|
|
||||||
SANE_Status (*slow_back_home) (Genesys_Device * dev, SANE_Bool wait_until_home);
|
SANE_Status (*slow_back_home) (Genesys_Device * dev, SANE_Bool wait_until_home);
|
||||||
SANE_Status (*rewind) (Genesys_Device * dev);
|
SANE_Status (*rewind) (Genesys_Device * dev);
|
||||||
|
|
||||||
SANE_Status (*bulk_write_register) (Genesys_Device * dev,
|
SANE_Status (*bulk_write_register) (Genesys_Device * dev,
|
||||||
Genesys_Register_Set& reg);
|
Genesys_Register_Set& regs);
|
||||||
|
|
||||||
SANE_Status (*bulk_write_data) (Genesys_Device * dev, uint8_t addr,
|
SANE_Status (*bulk_write_data) (Genesys_Device * dev, uint8_t addr,
|
||||||
uint8_t * data, size_t len);
|
uint8_t * data, size_t len);
|
||||||
|
@ -983,13 +1017,7 @@ typedef struct Genesys_Command_Set
|
||||||
SANE_Status (*bulk_read_data) (Genesys_Device * dev, uint8_t addr,
|
SANE_Status (*bulk_read_data) (Genesys_Device * dev, uint8_t addr,
|
||||||
uint8_t * data, size_t len);
|
uint8_t * data, size_t len);
|
||||||
|
|
||||||
/* Updates hardware sensor information in Genesys_Scanner.val[].
|
// Updates hardware sensor information in Genesys_Scanner.val[].
|
||||||
If possible, just get information for given option.
|
|
||||||
The sensor state in Genesys_Scanner.val[] should be merged with the
|
|
||||||
new sensor state, using the information that was last read by the frontend
|
|
||||||
in Genesys_Scanner.last_val[], in such a way that a button up/down
|
|
||||||
relative to Genesys_Scanner.last_val[] is not lost.
|
|
||||||
*/
|
|
||||||
SANE_Status (*update_hardware_sensors) (struct Genesys_Scanner * s);
|
SANE_Status (*update_hardware_sensors) (struct Genesys_Scanner * s);
|
||||||
|
|
||||||
/* functions for sheetfed scanners */
|
/* functions for sheetfed scanners */
|
||||||
|
@ -1041,25 +1069,6 @@ typedef struct Genesys_Command_Set
|
||||||
*/
|
*/
|
||||||
SANE_Status (*asic_boot) (Genesys_Device * dev, SANE_Bool cold);
|
SANE_Status (*asic_boot) (Genesys_Device * dev, SANE_Bool cold);
|
||||||
|
|
||||||
/**
|
|
||||||
* Scan register setting interface
|
|
||||||
*/
|
|
||||||
SANE_Status (*init_scan_regs) (Genesys_Device * dev,
|
|
||||||
const Genesys_Sensor& sensor,
|
|
||||||
Genesys_Register_Set * reg,
|
|
||||||
float xres,
|
|
||||||
float yres,
|
|
||||||
float startx,
|
|
||||||
float starty,
|
|
||||||
float pixels,
|
|
||||||
float lines,
|
|
||||||
unsigned int depth,
|
|
||||||
unsigned int channels,
|
|
||||||
int scan_method,
|
|
||||||
int scan_mode,
|
|
||||||
int color_filter,
|
|
||||||
unsigned int flags);
|
|
||||||
|
|
||||||
} Genesys_Command_Set;
|
} Genesys_Command_Set;
|
||||||
|
|
||||||
/** @brief structure to describe a scanner model
|
/** @brief structure to describe a scanner model
|
||||||
|
@ -1124,21 +1133,11 @@ typedef struct Genesys_Model
|
||||||
SANE_Int search_lines; /* how many lines are used to search start position */
|
SANE_Int search_lines; /* how many lines are used to search start position */
|
||||||
} Genesys_Model;
|
} Genesys_Model;
|
||||||
|
|
||||||
#define SCAN_METHOD_FLATBED 0 /**< normal scan method */
|
|
||||||
#define SCAN_METHOD_TRANSPARENCY 2 /**< scan using transparency adaptor */
|
|
||||||
#define SCAN_METHOD_NEGATIVE 0x88 /**< scan using negative adaptor */
|
|
||||||
|
|
||||||
#define SCAN_MODE_LINEART 0 /**< lineart scan mode */
|
|
||||||
#define SCAN_MODE_HALFTONE 1 /**< halftone scan mode */
|
|
||||||
#define SCAN_MODE_GRAY 2 /**< gray scan mode */
|
|
||||||
#define SCAN_MODE_COLOR 4 /**< color scan mode */
|
|
||||||
|
|
||||||
struct Genesys_Settings
|
struct Genesys_Settings
|
||||||
{
|
{
|
||||||
// TODO: change >=2: Transparency, 0x88: negative film
|
ScanMethod scan_method = ScanMethod::FLATBED;
|
||||||
int scan_method = 0;
|
ScanColorMode scan_mode = ScanColorMode::LINEART;
|
||||||
// TODO: change 0,1 = lineart, halftone; 2 = gray, 3 = 3pass color, 4=single pass color
|
|
||||||
int scan_mode = 0;
|
|
||||||
// horizontal dpi
|
// horizontal dpi
|
||||||
int xres = 0;
|
int xres = 0;
|
||||||
// vertical dpi
|
// vertical dpi
|
||||||
|
@ -1157,10 +1156,7 @@ struct Genesys_Settings
|
||||||
// bit depth of the scan
|
// bit depth of the scan
|
||||||
unsigned int depth = 0;
|
unsigned int depth = 0;
|
||||||
|
|
||||||
/* todo : remove these fields ? */
|
ColorFilter color_filter = ColorFilter::NONE;
|
||||||
int exposure_time = 0;
|
|
||||||
|
|
||||||
unsigned int color_filter = 0;
|
|
||||||
|
|
||||||
// true if scan is true gray, false if monochrome scan
|
// true if scan is true gray, false if monochrome scan
|
||||||
int true_gray = 0;
|
int true_gray = 0;
|
||||||
|
@ -1174,9 +1170,6 @@ struct Genesys_Settings
|
||||||
// Disable interpolation for xres<yres
|
// Disable interpolation for xres<yres
|
||||||
int disable_interpolation = 0;
|
int disable_interpolation = 0;
|
||||||
|
|
||||||
// Use double x resolution internally to provide better quality
|
|
||||||
int double_xres = 0;
|
|
||||||
|
|
||||||
// true is lineart is generated from gray data by the dynamic rasterization algoright
|
// true is lineart is generated from gray data by the dynamic rasterization algoright
|
||||||
int dynamic_lineart = 0;
|
int dynamic_lineart = 0;
|
||||||
|
|
||||||
|
@ -1190,8 +1183,54 @@ struct Genesys_Settings
|
||||||
int expiration_time = 0;
|
int expiration_time = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct SetupParams {
|
||||||
|
|
||||||
|
static constexpr unsigned NOT_SET = std::numeric_limits<unsigned>::max();
|
||||||
|
|
||||||
|
// resolution in x direction
|
||||||
|
unsigned xres = NOT_SET;
|
||||||
|
// resolution in y direction
|
||||||
|
unsigned yres = NOT_SET;
|
||||||
|
// start pixel in X direction, from dummy_pixel + 1
|
||||||
|
float startx = -1;
|
||||||
|
// start pixel in Y direction, counted according to base_ydpi
|
||||||
|
float starty = -1;
|
||||||
|
// the number of pixels in X direction
|
||||||
|
unsigned pixels = NOT_SET;
|
||||||
|
// the number of pixels in Y direction
|
||||||
|
unsigned lines = NOT_SET;
|
||||||
|
// the depth of the scan in bits. Allowed are 1, 8, 16
|
||||||
|
unsigned depth = NOT_SET;
|
||||||
|
// the number of channels
|
||||||
|
unsigned channels = NOT_SET;
|
||||||
|
|
||||||
|
ScanMethod scan_method = static_cast<ScanMethod>(NOT_SET);
|
||||||
|
|
||||||
|
ScanColorMode scan_mode = static_cast<ScanColorMode>(NOT_SET);
|
||||||
|
|
||||||
|
ColorFilter color_filter = static_cast<ColorFilter>(NOT_SET);
|
||||||
|
|
||||||
|
unsigned flags = NOT_SET;
|
||||||
|
|
||||||
|
void assert_valid() const
|
||||||
|
{
|
||||||
|
if (xres == NOT_SET || yres == NOT_SET || startx < 0 || starty < 0 ||
|
||||||
|
pixels == NOT_SET || lines == NOT_SET ||depth == NOT_SET || channels == NOT_SET ||
|
||||||
|
scan_method == static_cast<ScanMethod>(NOT_SET) ||
|
||||||
|
scan_mode == static_cast<ScanColorMode>(NOT_SET) ||
|
||||||
|
color_filter == static_cast<ColorFilter>(NOT_SET) ||
|
||||||
|
flags == NOT_SET)
|
||||||
|
{
|
||||||
|
throw std::runtime_error("SetupParams are not valid");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
struct Genesys_Current_Setup
|
struct Genesys_Current_Setup
|
||||||
{
|
{
|
||||||
|
// params used for this setup
|
||||||
|
SetupParams params;
|
||||||
|
|
||||||
// pixel count expected from scanner
|
// pixel count expected from scanner
|
||||||
int pixels = 0;
|
int pixels = 0;
|
||||||
// line count expected from scanner
|
// line count expected from scanner
|
||||||
|
@ -1200,8 +1239,7 @@ struct Genesys_Current_Setup
|
||||||
int depth = 0;
|
int depth = 0;
|
||||||
// channel count expected from scanner
|
// channel count expected from scanner
|
||||||
int channels = 0;
|
int channels = 0;
|
||||||
// scanning method: flatbed or XPA
|
|
||||||
int scan_method = 0;
|
|
||||||
// used exposure time
|
// used exposure time
|
||||||
int exposure_time = 0;
|
int exposure_time = 0;
|
||||||
// used xres
|
// used xres
|
||||||
|
@ -1300,8 +1338,6 @@ struct Genesys_Device
|
||||||
Genesys_Frontend frontend, frontend_initial;
|
Genesys_Frontend frontend, frontend_initial;
|
||||||
Genesys_Gpo gpo;
|
Genesys_Gpo gpo;
|
||||||
Genesys_Motor motor;
|
Genesys_Motor motor;
|
||||||
uint16_t slope_table0[256] = {};
|
|
||||||
uint16_t slope_table1[256] = {};
|
|
||||||
uint8_t control[6] = {};
|
uint8_t control[6] = {};
|
||||||
time_t init_date = 0;
|
time_t init_date = 0;
|
||||||
|
|
||||||
|
@ -1508,7 +1544,7 @@ sanei_genesys_write_hregister (Genesys_Device * dev, uint16_t reg, uint8_t val);
|
||||||
|
|
||||||
extern SANE_Status
|
extern SANE_Status
|
||||||
sanei_genesys_bulk_write_register(Genesys_Device * dev,
|
sanei_genesys_bulk_write_register(Genesys_Device * dev,
|
||||||
Genesys_Register_Set& reg);
|
Genesys_Register_Set& regs);
|
||||||
|
|
||||||
extern SANE_Status sanei_genesys_write_0x8c (Genesys_Device * dev, uint8_t index, uint8_t val);
|
extern SANE_Status sanei_genesys_write_0x8c (Genesys_Device * dev, uint8_t index, uint8_t val);
|
||||||
|
|
||||||
|
@ -1532,9 +1568,9 @@ extern void sanei_genesys_init_structs (Genesys_Device * dev);
|
||||||
const Genesys_Sensor& sanei_genesys_find_sensor_any(Genesys_Device* dev);
|
const Genesys_Sensor& sanei_genesys_find_sensor_any(Genesys_Device* dev);
|
||||||
Genesys_Sensor& sanei_genesys_find_sensor_any_for_write(Genesys_Device* dev);
|
Genesys_Sensor& sanei_genesys_find_sensor_any_for_write(Genesys_Device* dev);
|
||||||
const Genesys_Sensor& sanei_genesys_find_sensor(Genesys_Device* dev, int dpi,
|
const Genesys_Sensor& sanei_genesys_find_sensor(Genesys_Device* dev, int dpi,
|
||||||
int scan_method = SCAN_METHOD_FLATBED);
|
ScanMethod scan_method = ScanMethod::FLATBED);
|
||||||
Genesys_Sensor& sanei_genesys_find_sensor_for_write(Genesys_Device* dev, int dpi,
|
Genesys_Sensor& sanei_genesys_find_sensor_for_write(Genesys_Device* dev, int dpi,
|
||||||
int scan_method = SCAN_METHOD_FLATBED);
|
ScanMethod scan_method = ScanMethod::FLATBED);
|
||||||
|
|
||||||
extern SANE_Status
|
extern SANE_Status
|
||||||
sanei_genesys_init_shading_data (Genesys_Device * dev, const Genesys_Sensor& sensor,
|
sanei_genesys_init_shading_data (Genesys_Device * dev, const Genesys_Sensor& sensor,
|
||||||
|
@ -1549,6 +1585,11 @@ extern SANE_Status sanei_genesys_read_scancnt (Genesys_Device * dev,
|
||||||
extern SANE_Status sanei_genesys_read_feed_steps (Genesys_Device * dev,
|
extern SANE_Status sanei_genesys_read_feed_steps (Genesys_Device * dev,
|
||||||
unsigned int *steps);
|
unsigned int *steps);
|
||||||
|
|
||||||
|
void sanei_genesys_set_lamp_power(Genesys_Device* dev, const Genesys_Sensor& sensor,
|
||||||
|
Genesys_Register_Set& regs, bool set);
|
||||||
|
|
||||||
|
void sanei_genesys_set_motor_power(Genesys_Register_Set& regs, bool set);
|
||||||
|
|
||||||
extern void
|
extern void
|
||||||
sanei_genesys_calculate_zmode2 (SANE_Bool two_table,
|
sanei_genesys_calculate_zmode2 (SANE_Bool two_table,
|
||||||
uint32_t exposure_time,
|
uint32_t exposure_time,
|
||||||
|
@ -1885,4 +1926,7 @@ extern StaticInit<std::vector<Genesys_Sensor>> s_sensors;
|
||||||
void genesys_init_sensor_tables();
|
void genesys_init_sensor_tables();
|
||||||
void genesys_init_frontend_tables();
|
void genesys_init_frontend_tables();
|
||||||
|
|
||||||
|
void debug_dump(unsigned level, const Genesys_Settings& settings);
|
||||||
|
void debug_dump(unsigned level, const SetupParams& params);
|
||||||
|
|
||||||
#endif /* not GENESYS_LOW_H */
|
#endif /* not GENESYS_LOW_H */
|
||||||
|
|
Ładowanie…
Reference in New Issue