kopia lustrzana https://gitlab.com/sane-project/backends
Merge branch 'add_sg3100' into 'master'
Add support for Aficio SG3100SNw See merge request sane-project/backends!57merge-requests/65/head
commit
e13b80fa6f
|
@ -73,6 +73,7 @@ plustek
|
||||||
#pnm
|
#pnm
|
||||||
qcam
|
qcam
|
||||||
ricoh
|
ricoh
|
||||||
|
ricoh2
|
||||||
rts8891
|
rts8891
|
||||||
s9036
|
s9036
|
||||||
sceptre
|
sceptre
|
||||||
|
|
|
@ -106,6 +106,18 @@ typedef struct Ricoh2_Device {
|
||||||
}
|
}
|
||||||
Ricoh2_Device;
|
Ricoh2_Device;
|
||||||
|
|
||||||
|
typedef struct Ricoh2_device_info {
|
||||||
|
SANE_Int product_id;
|
||||||
|
SANE_String_Const device_name;
|
||||||
|
}
|
||||||
|
Ricoh2_device_info;
|
||||||
|
|
||||||
|
static Ricoh2_device_info supported_devices[] = {
|
||||||
|
{ 0x042c, "Aficio SP100SU" },
|
||||||
|
{ 0x0438, "Aficio SG3100SNw" },
|
||||||
|
{ 0x0448, "Aficio SP111SU" }
|
||||||
|
};
|
||||||
|
|
||||||
static SANE_String_Const mode_list[] = {
|
static SANE_String_Const mode_list[] = {
|
||||||
SANE_VALUE_SCAN_MODE_COLOR,
|
SANE_VALUE_SCAN_MODE_COLOR,
|
||||||
SANE_VALUE_SCAN_MODE_GRAY,
|
SANE_VALUE_SCAN_MODE_GRAY,
|
||||||
|
@ -137,14 +149,18 @@ lookup_handle(SANE_Handle handle)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char* get_model_by_productid(SANE_Int id)
|
static SANE_String_Const get_model_by_productid(SANE_Int id)
|
||||||
{
|
{
|
||||||
switch (id)
|
size_t i = 0;
|
||||||
|
for (; i < sizeof (supported_devices) / sizeof (supported_devices[0]); ++i)
|
||||||
{
|
{
|
||||||
case 0x0448: return "Aficio SP111SU";
|
if (supported_devices[i].product_id == id)
|
||||||
case 0x042c: return "Aficio SP100SU";
|
{
|
||||||
default: return "Unidentified device";
|
return supported_devices[i].device_name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return "Unidentified device";
|
||||||
}
|
}
|
||||||
|
|
||||||
static SANE_Status
|
static SANE_Status
|
||||||
|
@ -261,6 +277,8 @@ init_options(Ricoh2_Device *dev)
|
||||||
SANE_Status
|
SANE_Status
|
||||||
sane_init (SANE_Int *vc, SANE_Auth_Callback __sane_unused__ cb)
|
sane_init (SANE_Int *vc, SANE_Auth_Callback __sane_unused__ cb)
|
||||||
{
|
{
|
||||||
|
size_t i = 0;
|
||||||
|
|
||||||
DBG_INIT ();
|
DBG_INIT ();
|
||||||
|
|
||||||
DBG(2, "sane_init\n");
|
DBG(2, "sane_init\n");
|
||||||
|
@ -269,8 +287,11 @@ sane_init (SANE_Int *vc, SANE_Auth_Callback __sane_unused__ cb)
|
||||||
sanei_usb_set_timeout (USB_TIMEOUT_MS);
|
sanei_usb_set_timeout (USB_TIMEOUT_MS);
|
||||||
|
|
||||||
num_devices = 0;
|
num_devices = 0;
|
||||||
sanei_usb_find_devices (0x5ca, 0x042c, attach);
|
|
||||||
sanei_usb_find_devices (0x5ca, 0x0448, attach);
|
for (; i < sizeof (supported_devices) / sizeof (supported_devices[0]); ++i)
|
||||||
|
{
|
||||||
|
sanei_usb_find_devices (0x5ca, supported_devices[i].product_id, attach);
|
||||||
|
}
|
||||||
|
|
||||||
if (vc)
|
if (vc)
|
||||||
*vc = SANE_VERSION_CODE (SANE_CURRENT_MAJOR, V_MINOR, 0);
|
*vc = SANE_VERSION_CODE (SANE_CURRENT_MAJOR, V_MINOR, 0);
|
||||||
|
|
|
@ -416,7 +416,7 @@ BACKEND_5MANS = sane-abaton.5 sane-agfafocus.5 sane-apple.5 sane-as6e.5 \
|
||||||
sane-nec.5 sane-net.5 sane-pie.5 sane-pieusb.5 sane-pint.5 sane-pnm.5 \
|
sane-nec.5 sane-net.5 sane-pie.5 sane-pieusb.5 sane-pint.5 sane-pnm.5 \
|
||||||
sane-umax.5 sane-qcam.5 sane-scsi.5 sane-artec.5 sane-kodak.5 sane-kodakaio.5 \
|
sane-umax.5 sane-qcam.5 sane-scsi.5 sane-artec.5 sane-kodak.5 sane-kodakaio.5 \
|
||||||
sane-fujitsu.5 sane-sharp.5 sane-s9036.5 sane-tamarack.5 \
|
sane-fujitsu.5 sane-sharp.5 sane-s9036.5 sane-tamarack.5 \
|
||||||
sane-ricoh.5 sane-ricoh.5 sane-avision.5 sane-plustek.5 sane-st400.5 \
|
sane-ricoh.5 sane-ricoh2.5 sane-avision.5 sane-plustek.5 sane-st400.5 \
|
||||||
sane-mustek_pp.5 sane-dc210.5 sane-v4l.5 sane-snapscan.5 \
|
sane-mustek_pp.5 sane-dc210.5 sane-v4l.5 sane-snapscan.5 \
|
||||||
sane-canon.5 sane-coolscan.5 sane-bh.5 sane-dc240.5 \
|
sane-canon.5 sane-coolscan.5 sane-bh.5 sane-dc240.5 \
|
||||||
sane-umax_pp.5 sane-umax1220u.5 sane-sm3600.5 sane-usb.5 \
|
sane-umax_pp.5 sane-umax1220u.5 sane-sm3600.5 sane-usb.5 \
|
||||||
|
|
|
@ -24,17 +24,17 @@
|
||||||
:mfg "Ricoh" ; name a manufacturer
|
:mfg "Ricoh" ; name a manufacturer
|
||||||
:url "http://www.ricoh.com/" ; manufacturer's URL
|
:url "http://www.ricoh.com/" ; manufacturer's URL
|
||||||
|
|
||||||
:model "SP-111SU" ; name models for above-specified mfg.
|
:model "SG-3100SNw"
|
||||||
:status :basic ; :minimal, :basic, :good, :complete
|
:status :basic
|
||||||
; :untested, or :unsupported
|
:interface "USB"
|
||||||
:interface "USB" ; interface type of the device:
|
:usbid "0x05ca" "0x0438"
|
||||||
; "SCSI", "USB", "Parport (EPP)",
|
|
||||||
; "Parport (SPP)", "Parport (ECP)",
|
|
||||||
; "Serial port", "IEEE-1394", "JetDirect",
|
|
||||||
; or "Proprietary".
|
|
||||||
:usbid "0x05ca" "0x0448" ; Vendor and product ids of an USB device
|
|
||||||
|
|
||||||
:model "SP-100SU"
|
:model "SP-100SU"
|
||||||
:status :untested
|
:status :untested
|
||||||
:interface "USB"
|
:interface "USB"
|
||||||
:usbid "0x05ca" "0x042c"
|
:usbid "0x05ca" "0x042c"
|
||||||
|
|
||||||
|
:model "SP-111SU"
|
||||||
|
:status :basic
|
||||||
|
:interface "USB"
|
||||||
|
:usbid "0x05ca" "0x0448"
|
||||||
|
|
|
@ -9,10 +9,11 @@ library implements a SANE (Scanner Access Now Easy) backend that
|
||||||
provides access to the following Ricoh flatbed scanners:
|
provides access to the following Ricoh flatbed scanners:
|
||||||
.PP
|
.PP
|
||||||
.RS
|
.RS
|
||||||
|
SG-3100SNw
|
||||||
|
.br
|
||||||
SP-100SU
|
SP-100SU
|
||||||
.br
|
.br
|
||||||
SP-111SU
|
SP-111SU
|
||||||
.br
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
.SH FILES
|
.SH FILES
|
||||||
|
@ -51,6 +52,6 @@ environment variable controls the debug level for this backend. Higher
|
||||||
debug levels increase the verbosity of the output.
|
debug levels increase the verbosity of the output.
|
||||||
|
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
sane(7), sane\-scsi(5)
|
sane(7), sane\-usb(5)
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
Stanislav Yuzvinsky
|
Stanislav Yuzvinsky
|
||||||
|
|
|
@ -450,7 +450,7 @@ for details.
|
||||||
.TP
|
.TP
|
||||||
.B ricoh2
|
.B ricoh2
|
||||||
The ricoh2 backend provides access to the following Ricoh flatbed
|
The ricoh2 backend provides access to the following Ricoh flatbed
|
||||||
scanners: SP-100SU and SP-111SU. See
|
scanners: SG-3100SNw, SP-100SU, and SP-111SU. See
|
||||||
.BR sane\-ricoh2 (5)
|
.BR sane\-ricoh2 (5)
|
||||||
for details.
|
for details.
|
||||||
.TP
|
.TP
|
||||||
|
|
Ładowanie…
Reference in New Issue