kopia lustrzana https://gitlab.com/sane-project/backends
Added Mustek BearPaw 2448 TA Plus. Added special command set for Plustek
U16B. Added Plug-n-Scan 2400 M(T) to list of devices. No positive report yet. Used request for memory writes and reads instead of a fixed value of 0x04. Set Genius Vivid4x to GT6816. Untested. All changes have not been tested on their respective scanners yet. New version: 1.0.50.merge-requests/1/head
rodzic
b72bac1dd7
commit
0ed2b19fd7
10
ChangeLog
10
ChangeLog
|
@ -4,5 +4,15 @@
|
|||
version.
|
||||
* doc/releases.txt: Updated information about diffs.
|
||||
* doc/descriptions/unsupported.desc: Added HP and Mustek scanners.
|
||||
* backend/gt68xx.c backend/gt68xx.conf backend/gt68xx_devices.c
|
||||
backend/gt68xx_gt6801.c backend/gt68xx_gt6801.h backend/gt68xx_low.c
|
||||
backend/gt68xx_low.h doc/descriptions/gt68xx.desc
|
||||
doc/gt68xx/gt68xx.CHANGES: Added Mustek BearPaw 2448 TA
|
||||
Plus. Added special command set for Plustek U16B. Added
|
||||
Plug-n-Scan 2400 M(T) to list of devices. No positive report yet.
|
||||
Used request for memory writes and reads instead of a fixed
|
||||
value of 0x04. Set Genius Vivid4x to GT6816. Untested. All
|
||||
changes have not been tested on their respective scanners yet.
|
||||
New version: 1.0.50.
|
||||
|
||||
Older entries can be found in ChangeLog-1.0.13.
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
#include "../include/sane/config.h"
|
||||
|
||||
#define BUILD 49
|
||||
#define BUILD 50
|
||||
#define MAX_DEBUG
|
||||
#define WARMUP_TIME 30
|
||||
#define CALIBRATION_HEIGHT 2.5
|
||||
|
@ -1200,7 +1200,7 @@ sane_open (SANE_String_Const devicename, SANE_Handle * handle)
|
|||
GT68xx_Device *dev;
|
||||
SANE_Status status;
|
||||
GT68xx_Scanner *s;
|
||||
SANE_Bool firmware_loaded, power_ok;
|
||||
SANE_Bool power_ok;
|
||||
|
||||
DBG (5, "sane_open: start (devicename = `%s')\n", devicename);
|
||||
|
||||
|
@ -1245,7 +1245,11 @@ sane_open (SANE_String_Const devicename, SANE_Handle * handle)
|
|||
DBG (0, " details as possible, e.g. the exact name of your\n");
|
||||
DBG (0, " scanner and what does (not) work.\n");
|
||||
}
|
||||
/* RIE (gt68xx_device_check_firmware (dev, &firmware_loaded));*/
|
||||
|
||||
/* The firmware check is disabled by default because it may confuse
|
||||
some scanners: So the firmware is loaded everytime. */
|
||||
#if 0
|
||||
RIE (gt68xx_device_check_firmware (dev, &firmware_loaded));
|
||||
firmware_loaded = SANE_FALSE;
|
||||
if (firmware_loaded)
|
||||
DBG (3, "sane_open: firmware already loaded, skipping load\n");
|
||||
|
@ -1257,6 +1261,9 @@ sane_open (SANE_String_Const devicename, SANE_Handle * handle)
|
|||
DBG (1, "sane_open: firmware still not loaded? Proceeding anyway\n");
|
||||
/* return SANE_STATUS_IO_ERROR; */
|
||||
}
|
||||
#else
|
||||
RIE (download_firmware_file (dev));
|
||||
#endif
|
||||
|
||||
RIE (gt68xx_device_get_id (dev));
|
||||
|
||||
|
|
|
@ -84,6 +84,10 @@ usb 0x055f 0x0218
|
|||
# Autodetect Mustek BearPaw 2400 TA Plus
|
||||
usb 0x055f 0x0219
|
||||
|
||||
##############################################################################
|
||||
# Autodetect Mustek BearPaw 2448 TA Plus
|
||||
usb 0x055f 0x021a
|
||||
|
||||
##############################################################################
|
||||
# Autodetect Mustek BearPaw 2400 CU Plus
|
||||
usb 0x055f 0x021d
|
||||
|
|
|
@ -164,6 +164,44 @@ static GT68xx_Command_Set plustek_gt6801_command_set = {
|
|||
gt68xx_generic_get_id
|
||||
};
|
||||
|
||||
static GT68xx_Command_Set plustek_u16b_command_set = {
|
||||
"plustek-u16b",
|
||||
|
||||
0x40, /* Request type */
|
||||
0x04, /* Request */
|
||||
|
||||
0x200a, /* Memory read - wValue */
|
||||
0x2009, /* Memory write - wValue */
|
||||
|
||||
0x2010, /* Send normal command - wValue */
|
||||
0x3f40, /* Send normal command - wIndex */
|
||||
0x2011, /* Receive normal result - wValue */
|
||||
0x3f00, /* Receive normal result - wIndex */
|
||||
|
||||
0x2012, /* Send small command - wValue */
|
||||
0x3f40, /* Send small command - wIndex */
|
||||
0x2013, /* Receive small result - wValue */
|
||||
0x3f00, /* Receive small result - wIndex */
|
||||
|
||||
/* activate */ NULL,
|
||||
/* deactivate */ NULL,
|
||||
gt6801_check_plustek_firmware, /* not tested */
|
||||
gt6801_u16b_download_firmware, /* ok? */
|
||||
gt6801_get_power_status, /* not tested */
|
||||
/* get_ta_status (FIXME: implement this) */ NULL,
|
||||
gt6801_lamp_control, /* ok */
|
||||
gt6816_is_moving, /* ok */
|
||||
/* gt68xx_generic_move_relative *** to be tested */ NULL,
|
||||
gt6801_carriage_home, /* ok */
|
||||
gt68xx_generic_start_scan, /* ok */
|
||||
gt68xx_generic_read_scanned_data, /* ok */
|
||||
gt6801_u16b_stop_scan, /* ok */
|
||||
gt6801_setup_scan, /* not tested */
|
||||
gt68xx_generic_set_afe, /* not tested */
|
||||
/* set_exposure_time */ NULL,
|
||||
gt68xx_generic_get_id /* not tested */
|
||||
};
|
||||
|
||||
static GT68xx_Model mustek_2400ta_model = {
|
||||
"mustek-bearpaw-2400-ta", /* Name */
|
||||
"Mustek", /* Device vendor string */
|
||||
|
@ -261,6 +299,54 @@ static GT68xx_Model mustek_2400taplus_model = {
|
|||
/* Setup and tested */
|
||||
};
|
||||
|
||||
static GT68xx_Model mustek_2448taplus_model = {
|
||||
"mustek-bearpaw-2448-ta-plus", /* Name */
|
||||
"Mustek", /* Device vendor string */
|
||||
"BearPaw 2448 TA Plus", /* Device model name */
|
||||
"A2Nfw.usb", /* Name of the firmware file */
|
||||
SANE_FALSE, /* Dynamic allocation flag */
|
||||
|
||||
&mustek_gt6816_command_set, /* Command set used by this scanner */
|
||||
|
||||
1200, /* maximum optical sensor resolution */
|
||||
2400, /* maximum motor resolution */
|
||||
600, /* base x-res used to calculate geometry */
|
||||
1200, /* base y-res used to calculate geometry */
|
||||
1200, /* if ydpi is equal or higher, use linemode */
|
||||
SANE_FALSE, /* Use base_ydpi for all resolutions */
|
||||
|
||||
{1200, 600, 300, 100, 50, 0}, /* possible x-resolutions */
|
||||
{2400, 1200, 600, 300, 100, 50, 0}, /* possible y-resolutions */
|
||||
{16, 12, 8, 0}, /* possible depths in gray mode */
|
||||
{16, 12, 8, 0}, /* possible depths in color mode */
|
||||
|
||||
SANE_FIX (7.41), /* Start of scan area in mm (x) */
|
||||
SANE_FIX (7.4), /* Start of scan area in mm (y) */
|
||||
SANE_FIX (217.5), /* Size of scan area in mm (x) */
|
||||
SANE_FIX (298.0), /* Size of scan area in mm (y) */
|
||||
|
||||
SANE_FIX (0.0), /* Start of white strip in mm (y) */
|
||||
SANE_FIX (5.0), /* Start of black mark in mm (x) */
|
||||
|
||||
SANE_FIX (94.0), /* Start of scan area in TA mode in mm (x) */
|
||||
SANE_FIX (107.0) /* Start of scan area in TA mode in mm (y) */ ,
|
||||
SANE_FIX (37.0), /* Size of scan area in TA mode in mm (x) */
|
||||
SANE_FIX (165.0), /* Size of scan area in TA mode in mm (y) */
|
||||
|
||||
SANE_FIX (95.0), /* Start of white strip in TA mode in mm (y) */
|
||||
|
||||
0, 48, 96, /* RGB CCD Line-distance correction in pixel */
|
||||
8, /* CCD distcance for CCD with 6 lines) */
|
||||
|
||||
COLOR_ORDER_RGB, /* Order of the CCD/CIS colors */
|
||||
{0x2a, 0x0c, 0x2e, 0x06, 0x2d, 0x07}, /* Default offset/gain */
|
||||
{0x157, 0x157, 0x157}, /* Default exposure parameters */
|
||||
SANE_FIX (2.0), /* Default gamma value */
|
||||
|
||||
SANE_FALSE, /* Is this a CIS scanner? */
|
||||
GT68XX_FLAG_UNTESTED /* Which flags are needed for this scanner? */
|
||||
/* Completely untested. Based on 2400 TA Plus. Maybe use 2400 TA entry? */
|
||||
};
|
||||
|
||||
static GT68xx_Model mustek_1200ta_model = {
|
||||
"mustek-bearpaw-1200-ta", /* Name */
|
||||
|
@ -704,7 +790,7 @@ static GT68xx_Model mustek_a3usb_model = {
|
|||
SANE_FALSE, /* Is this a CIS scanner? */
|
||||
0 /* Which flags are needed for this scanner? */
|
||||
/* Tested by Pedro Morais <morais@inocam.com>, changes to CCD by hmg, white
|
||||
strip/black mark untested */
|
||||
strip/black mark untested, line distance must be set up */
|
||||
};
|
||||
|
||||
static GT68xx_Model lexmark_x73_model = {
|
||||
|
@ -815,7 +901,7 @@ static GT68xx_Model plustek_u16b_model = {
|
|||
"ccd68861.fw", /* Name of the firmware file */
|
||||
SANE_FALSE, /* Dynamic allocation flag */
|
||||
|
||||
&plustek_gt6801_command_set, /* Command set used by this scanner */
|
||||
&plustek_u16b_command_set, /* Command set used by this scanner */
|
||||
|
||||
600, /* maximum optical sensor resolution */
|
||||
1200, /* maximum motor resolution */
|
||||
|
@ -913,7 +999,7 @@ static GT68xx_Model genius_vivid4x_model = {
|
|||
"ccd548.fw", /* Name of the firmware file */
|
||||
SANE_FALSE, /* Dynamic allocation flag */
|
||||
|
||||
&plustek_gt6801_command_set, /* Command set used by this scanner */
|
||||
&mustek_gt6816_command_set, /* Command set used by this scanner */
|
||||
|
||||
600, /* maximum optical sensor resolution */
|
||||
600, /* maximum motor resolution */
|
||||
|
@ -1064,6 +1150,7 @@ static GT68xx_USB_Device_Entry gt68xx_usb_device_list[] = {
|
|||
{0x05d8, 0x4002, &mustek_2400cu_model}, /* manual override */
|
||||
{0x05d8, 0x4002, &mustek_scanexpress2400usb_model}, /* manual override */
|
||||
{0x055f, 0x0210, &mustek_a3usb_model},
|
||||
{0x05d8, 0x021a, &mustek_2448taplus_model},
|
||||
{0x043d, 0x002d, &lexmark_x73_model},
|
||||
{0x07b3, 0x0400, &plustek_op1248u_model},
|
||||
{0x07b3, 0x0401, &plustek_op1248u_model}, /* Same scanner, different id? */
|
||||
|
|
|
@ -172,6 +172,44 @@ gt6801_download_firmware (GT68xx_Device * dev,
|
|||
return SANE_STATUS_GOOD;
|
||||
}
|
||||
|
||||
SANE_Status
|
||||
gt6801_u16b_download_firmware (GT68xx_Device * dev,
|
||||
SANE_Byte * data, SANE_Word size)
|
||||
{
|
||||
DECLARE_FUNCTION_NAME ("gt6801_download_firmware") SANE_Status status;
|
||||
SANE_Byte download_buf[MAX_DOWNLOAD_BLOCK_SIZE];
|
||||
SANE_Byte *block;
|
||||
SANE_Word addr, bytes_left;
|
||||
GT68xx_Packet boot_req;
|
||||
SANE_Word block_size = MAX_DOWNLOAD_BLOCK_SIZE;
|
||||
|
||||
CHECK_DEV_ACTIVE (dev, function_name);
|
||||
|
||||
for (addr = 0; addr < size; addr += block_size)
|
||||
{
|
||||
bytes_left = size - addr;
|
||||
if (bytes_left > block_size)
|
||||
block = data + addr;
|
||||
else
|
||||
{
|
||||
memset (download_buf, 0, block_size);
|
||||
memcpy (download_buf, data + addr, bytes_left);
|
||||
block = download_buf;
|
||||
}
|
||||
RIE (gt68xx_device_memory_write (dev, addr, block_size, block));
|
||||
}
|
||||
|
||||
/* not tested: */
|
||||
memset (boot_req, 0, sizeof (boot_req));
|
||||
boot_req[0] = 0x69;
|
||||
boot_req[1] = 0x01;
|
||||
boot_req[2] = 0xc0;
|
||||
boot_req[3] = 0x1c;
|
||||
RIE (gt68xx_device_req (dev, boot_req, boot_req));
|
||||
|
||||
return SANE_STATUS_GOOD;
|
||||
}
|
||||
|
||||
|
||||
SANE_Status
|
||||
gt6801_get_power_status (GT68xx_Device * dev, SANE_Bool * power_ok)
|
||||
|
@ -277,6 +315,41 @@ gt6801_stop_scan (GT68xx_Device * dev)
|
|||
return SANE_STATUS_GOOD;
|
||||
}
|
||||
|
||||
SANE_Status
|
||||
gt6801_u16b_stop_scan (GT68xx_Device * dev)
|
||||
{
|
||||
GT68xx_Packet req;
|
||||
SANE_Status status;
|
||||
SANE_Int count = 0;
|
||||
|
||||
/* For some reason, the Plustek U16B needs both stop commands. */
|
||||
memset (req, 0, sizeof (req));
|
||||
req[0] = 0x42;
|
||||
req[1] = 0x01;
|
||||
|
||||
DBG (5, "gt6801_u16b_stop_scan: stopping scan\n");
|
||||
for (count = 0; count < 20; count++)
|
||||
{
|
||||
memset (req, 0, sizeof (req));
|
||||
req[0] = 0x42;
|
||||
req[1] = 0x01;
|
||||
RIE (gt68xx_device_req (dev, req, req));
|
||||
if (gt68xx_device_check_result (req, 0x42))
|
||||
break;
|
||||
DBG (7, "gt6801_u16b_stop_scan: failed, count = %d\n", count);
|
||||
}
|
||||
if (count <= 20)
|
||||
{
|
||||
DBG (7, "gt6801_u16b_stop_scan: succeeded\n");
|
||||
memset (req, 0, sizeof (req));
|
||||
req[0] = 0x41;
|
||||
req[1] = 0x01;
|
||||
return gt68xx_device_small_req (dev, req, req);
|
||||
}
|
||||
|
||||
return SANE_STATUS_IO_ERROR;
|
||||
}
|
||||
|
||||
SANE_Status
|
||||
gt6801_setup_scan (GT68xx_Device * dev,
|
||||
GT68xx_Scan_Request * request,
|
||||
|
|
|
@ -55,6 +55,10 @@ static SANE_Status
|
|||
gt6801_download_firmware (GT68xx_Device * dev,
|
||||
SANE_Byte * data, SANE_Word size);
|
||||
|
||||
SANE_Status
|
||||
gt6801_u16b_download_firmware (GT68xx_Device * dev,
|
||||
SANE_Byte * data, SANE_Word size);
|
||||
|
||||
static SANE_Status
|
||||
gt6801_get_power_status (GT68xx_Device * dev, SANE_Bool * power_ok);
|
||||
|
||||
|
@ -66,10 +70,10 @@ static SANE_Status gt6801_is_moving (GT68xx_Device * dev, SANE_Bool * moving);
|
|||
|
||||
static SANE_Status gt6801_carriage_home (GT68xx_Device * dev);
|
||||
|
||||
static SANE_Status gt6801_carriage_home (GT68xx_Device * dev);
|
||||
|
||||
static SANE_Status gt6801_stop_scan (GT68xx_Device * dev);
|
||||
|
||||
static SANE_Status gt6801_u16b_stop_scan (GT68xx_Device * dev);
|
||||
|
||||
static SANE_Status
|
||||
gt6801_setup_scan (GT68xx_Device * dev,
|
||||
GT68xx_Scan_Request * request,
|
||||
|
|
|
@ -467,7 +467,8 @@ gt68xx_device_memory_write (GT68xx_Device * dev,
|
|||
(void *) dev, addr, size, data);
|
||||
CHECK_DEV_ACTIVE (dev, "gt68xx_device_memory_write");
|
||||
|
||||
status = sanei_usb_control_msg (dev->fd, 0x40, 0x01,
|
||||
status = sanei_usb_control_msg (dev->fd, 0x40,
|
||||
dev->model->command_set->request,
|
||||
dev->model->command_set->memory_write_value,
|
||||
addr, size, data);
|
||||
|
||||
|
@ -490,7 +491,8 @@ gt68xx_device_memory_read (GT68xx_Device * dev,
|
|||
(void *) dev, addr, size, data);
|
||||
CHECK_DEV_ACTIVE (dev, "gt68xx_device_memory_read");
|
||||
|
||||
status = sanei_usb_control_msg (dev->fd, 0xc0, 0x01,
|
||||
status = sanei_usb_control_msg (dev->fd, 0xc0,
|
||||
dev->model->command_set->request,
|
||||
dev->model->command_set->memory_read_value,
|
||||
addr, size, data);
|
||||
|
||||
|
@ -577,6 +579,9 @@ gt68xx_device_small_req (GT68xx_Device * dev, GT68xx_Packet cmd,
|
|||
fixed_cmd, res, 0x08);
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
/* currently not used */
|
||||
SANE_Status
|
||||
gt68xx_device_check_firmware (GT68xx_Device * dev, SANE_Bool * loaded)
|
||||
{
|
||||
|
@ -587,6 +592,7 @@ gt68xx_device_check_firmware (GT68xx_Device * dev, SANE_Bool * loaded)
|
|||
else
|
||||
return SANE_STATUS_UNSUPPORTED;
|
||||
}
|
||||
#endif
|
||||
|
||||
SANE_Status
|
||||
gt68xx_device_download_firmware (GT68xx_Device * dev,
|
||||
|
|
|
@ -807,6 +807,7 @@ static SANE_Status
|
|||
gt68xx_device_small_req (GT68xx_Device * dev, GT68xx_Packet cmd,
|
||||
GT68xx_Packet res);
|
||||
|
||||
#if 0
|
||||
/** Check whether the firmware is downloaded into the scanner.
|
||||
*
|
||||
* @param dev Device object.
|
||||
|
@ -820,6 +821,7 @@ gt68xx_device_small_req (GT68xx_Device * dev, GT68xx_Packet cmd,
|
|||
*/
|
||||
static SANE_Status
|
||||
gt68xx_device_check_firmware (GT68xx_Device * dev, SANE_Bool * loaded);
|
||||
#endif
|
||||
|
||||
static SANE_Status
|
||||
gt68xx_device_download_firmware (GT68xx_Device * dev,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
:backend "gt68xx"
|
||||
:version "1.0-49"
|
||||
:version "1.0-50"
|
||||
:manpage "sane-gt68xx"
|
||||
:url "http://www.meier-geinitz.de/sane/gt68xx-backend/"
|
||||
:comment "Only the USB scanners mentioned below are supported. For other Mustek BearPaws, look at the Plustek and the MA-1509 backend."
|
||||
|
@ -156,6 +156,21 @@
|
|||
:status :good
|
||||
:comment "Transparency adapter supported"
|
||||
|
||||
:model "BearPaw 2448 TA Plus"
|
||||
:interface "USB"
|
||||
:status :untested
|
||||
:comment "Untested. Please test and report success or failure to me."
|
||||
|
||||
:model "Plug-n-Scan 2400 MT"
|
||||
:interface "USB"
|
||||
:status :untested
|
||||
:comment "Same as BearPaw 2400 TA Plus? May work. Please test and tell me the result."
|
||||
|
||||
:model "Plug-n-Scan 2400 M"
|
||||
:interface "USB"
|
||||
:status :untested
|
||||
:comment "Same as BearPaw 2400 TA Plus? May work. Please test and tell me the result."
|
||||
|
||||
:model "ScanExpress 1200 UB Plus"
|
||||
:interface "USB"
|
||||
:status :good
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
gt68xx.CHANGES -*-text-*-
|
||||
|
||||
V 1.0-50 (2003-11-23)
|
||||
|
||||
* Added Mustek BearPaw 2448 TA Plus. It's completely untested.
|
||||
* Added special command set for Plustek U16B. Changed stop scan command and
|
||||
download_firmware. Everything is untested.
|
||||
* Added Plug-n-Scan 2400 M(T) to list of devices. No positive report yet.
|
||||
* Used request for memory writes and reads instead of a fixed value of 0x04.
|
||||
* Set Genius Vivid4x to GT6816. Untested.
|
||||
|
||||
V 1.0-49 (2003-09-30)
|
||||
|
||||
* Fixed wrong test for allocation in gt68xx.c.
|
||||
|
|
Ładowanie…
Reference in New Issue