SANEI 1.3.1.76-0750
|
This file implements an interface for the Mustek PP chipset A4S2. More...
Go to the source code of this file.
Options to control interface operations | |
#define | SANEI_PA4S2_OPT_DEFAULT 0 /* normal mode */ |
Get list of possibly available devices. More... | |
#define | SANEI_PA4S2_OPT_TRY_MODE_UNI 1 /* enable UNI protocol */ |
Get list of possibly available devices. More... | |
#define | SANEI_PA4S2_OPT_ALT_LOCK 2 /* use alternative lock cmd */ |
Get list of possibly available devices. More... | |
#define | SANEI_PA4S2_OPT_NO_EPP 4 /* do not try to use EPP */ |
Get list of possibly available devices. More... | |
const char ** | sanei_pa4s2_devices (void) |
Get list of possibly available devices. More... | |
SANE_Status | sanei_pa4s2_open (const char *dev, int *fd) |
Open pa4s2 device. More... | |
SANE_Status | sanei_pa4s2_scsi_pp_open (const char *dev, int *fd) |
Open pa4s2 SCSI-over-parallel device. More... | |
void | sanei_pa4s2_close (int fd) |
Close pa4s2 device. More... | |
SANE_Status | sanei_pa4s2_options (u_int *options, int set) |
Set/get options. More... | |
SANE_Status | sanei_pa4s2_enable (int fd, int enable) |
Enables/disable device. More... | |
SANE_Status | sanei_pa4s2_readbegin (int fd, u_char reg) |
Select a register. More... | |
SANE_Status | sanei_pa4s2_scsi_pp_get_status (int fd, u_char *status) |
Return port status information. More... | |
SANE_Status | sanei_pa4s2_scsi_pp_reg_select (int fd, int reg) |
Selects a register number on a SCSI-over-parallel scanner. More... | |
SANE_Status | sanei_pa4s2_readbyte (int fd, u_char *val) |
Read a register. More... | |
SANE_Status | sanei_pa4s2_readend (int fd) |
Terminate reading sequence. More... | |
SANE_Status | sanei_pa4s2_writebyte (int fd, u_char reg, u_char val) |
Write a register. More... | |
This file implements an interface for the Mustek PP chipset A4S2.
#define SANEI_PA4S2_OPT_DEFAULT 0 /* normal mode */ |
Get list of possibly available devices.
Returns a list of arguments accepted as *dev by sanei_pa4s2_open
#define SANEI_PA4S2_OPT_TRY_MODE_UNI 1 /* enable UNI protocol */ |
Get list of possibly available devices.
Returns a list of arguments accepted as *dev by sanei_pa4s2_open
#define SANEI_PA4S2_OPT_ALT_LOCK 2 /* use alternative lock cmd */ |
Get list of possibly available devices.
Returns a list of arguments accepted as *dev by sanei_pa4s2_open
#define SANEI_PA4S2_OPT_NO_EPP 4 /* do not try to use EPP */ |
Get list of possibly available devices.
Returns a list of arguments accepted as *dev by sanei_pa4s2_open
const char ** sanei_pa4s2_devices | ( | void | ) |
Get list of possibly available devices.
Returns a list of arguments accepted as *dev by sanei_pa4s2_open
SANE_Status sanei_pa4s2_open | ( | const char * | dev, |
int * | fd | ||
) |
Open pa4s2 device.
Opens *dev as pa4s2 device.
dev | IO port address ("0x378", "0x278", or "0x3BC") |
fd | file descriptor |
SANE_Status sanei_pa4s2_scsi_pp_open | ( | const char * | dev, |
int * | fd | ||
) |
Open pa4s2 SCSI-over-parallel device.
Opens *dev as pa4s2 SCSI-over-parallel device.
dev | IO port address ("0x378", "0x278", or "0x3BC") |
fd | file descriptor |
void sanei_pa4s2_close | ( | int | fd | ) |
Close pa4s2 device.
fd | file descriptor |
SANE_Status sanei_pa4s2_options | ( | u_int * | options, |
int | set | ||
) |
Set/get options.
Sets/gets interface options. Options will be taken over, when set is SANE_TRUE. These options should be set before the first device is opened
options | pointer to options |
set | set (SANE_TRUE) or get (SANE_FALSE) options |
SANE_Status sanei_pa4s2_enable | ( | int | fd, |
int | enable | ||
) |
Enables/disable device.
When the device is disabled, the printer can be accessed, when it's enabled data can be read/written.
fd | file descriptor |
enable | enable (SANE_TRUE) or disable (SANE_FALSE) device |
SANE_Status sanei_pa4s2_readbegin | ( | int | fd, |
u_char | reg | ||
) |
Select a register.
The function to read a register is split up in three parts, so a register can be read more than once.
fd | file descriptor |
reg | register |
SANE_Status sanei_pa4s2_scsi_pp_get_status | ( | int | fd, |
u_char * | status | ||
) |
Return port status information.
fd | file descriptor |
status | variable to receive status |
SANE_Status sanei_pa4s2_scsi_pp_reg_select | ( | int | fd, |
int | reg | ||
) |
Selects a register number on a SCSI-over-parallel scanner.
fd | file descriptor |
reg | register number |
SANE_Status sanei_pa4s2_readbyte | ( | int | fd, |
u_char * | val | ||
) |
Read a register.
The function to read a register is split up in three parts, so a register can be read more than once.
fd | file descriptor |
val | pointer to value |
SANE_Status sanei_pa4s2_readend | ( | int | fd | ) |
Terminate reading sequence.
The function to read a register is split up in three parts, so a register can be read more than once.
fd | file descriptor |
SANE_Status sanei_pa4s2_writebyte | ( | int | fd, |
u_char | reg, | ||
u_char | val | ||
) |
Write a register.
fd | file descriptor |
reg | register |
val | value to be written |