Go to the source code of this file.
Functions | |
| SANE_Status | sanei_ab306_open (const char *dev, int *fd) |
| Open the connection to an AB306 device. | |
| void | sanei_ab306_close (int fd) |
| Close the connection to an AB306 device. | |
| void | sanei_ab306_exit (void) |
| Exit ab306. | |
| SANE_Status | sanei_ab306_get_io_privilege (int fd) |
| Get the permission for direct access to the ports. | |
| SANE_Status | sanei_ab306_test_ready (int fd) |
| Find out if the device is ready to accept new commands. | |
| SANE_Status | sanei_ab306_cmd (int fd, const void *src, size_t src_size, void *dst, size_t *dst_size) |
| Send a command to the AB306 device. | |
| SANE_Status | sanei_ab306_rdata (int fd, int planes, SANE_Byte *buf, int lines, int bpl) |
| Read scanned image data. | |
This chip is used by the Mustek Paragon 600 II N. It's similar to a parport but has it's own ISA card and cable.
/dev/port access is used where available. If this doesn't work, inb/outb functions or inb/outb assembler code is used.
Depending on the operating system it may be necessary to run this code as root.
| SANE_Status sanei_ab306_open | ( | const char * | dev, | |
| int * | fd | |||
| ) |
Open the connection to an AB306 device.
The scanner is also turned on.
| dev | Port address as text. | |
| fd | Information about port address and I/O method. fd is not a file descriptor. The name and type are used for compatibility reasons. |
| void sanei_ab306_close | ( | int | fd | ) |
Close the connection to an AB306 device.
| fd | Information about port address and I/O method. |
| void sanei_ab306_exit | ( | void | ) |
Exit ab306.
Also powers down all devices.
| SANE_Status sanei_ab306_get_io_privilege | ( | int | fd | ) |
Get the permission for direct access to the ports.
The only occasion this function must be called, is when the I/O privilege was lost, e.g. after forking. Otherwise, it's called automatically by sanei_ab306_open().
| fd | Information about port address and I/O method. |
| SANE_Status sanei_ab306_test_ready | ( | int | fd | ) |
Find out if the device is ready to accept new commands.
| fd | Information about port address and I/O method. |
| SANE_Status sanei_ab306_cmd | ( | int | fd, | |
| const void * | src, | |||
| size_t | src_size, | |||
| void * | dst, | |||
| size_t * | dst_size | |||
| ) |
Send a command to the AB306 device.
| fd | Information about port address and I/O method. | |
| src | Data to be sent to the device. | |
| src_size | Size of data to be sent to the device. | |
| dst | Data to be received from the device. | |
| dst_size | Size of data to be received from the device |
| SANE_Status sanei_ab306_rdata | ( | int | fd, | |
| int | planes, | |||
| SANE_Byte * | buf, | |||
| int | lines, | |||
| int | bpl | |||
| ) |
Read scanned image data.
| fd | Information about port address and I/O method. | |
| planes | Bytes per pixel (3 for color, 1 for all other modes) | |
| buf | Buffer for image data. | |
| lines | Number of lines | |
| bpl | Bytes per line |
1.5.1