00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050 #ifndef sanei_pv8630_h
00051 #define sanei_pv8630_h
00052
00053 #include "../include/sane/config.h"
00054 #include "../include/sane/sane.h"
00055
00056 typedef enum
00057 {
00058 PV8630_REQ_READBYTE = 0x00,
00059 PV8630_REQ_WRITEBYTE = 0x01,
00060 PV8630_REQ_EPPBULKREAD = 0x02,
00061 PV8630_REQ_EPPBULKWRITE = 0x03,
00062 PV8630_REQ_FLUSHBUFFER = 0x04,
00063 PV8630_REQ_ENABLEINTERRUPT = 0x05,
00064 PV8630_REQ_DISABLEINTERRUPT = 0x06,
00065 PV8630_REQ_READWORD = 0x08,
00066 PV8630_REQ_WRITEWORD = 0x09
00067 }
00068 SANEI_PV_Request;
00069
00070 typedef enum
00071 {
00072 PV8630_RDATA = 0x00,
00073 PV8630_REPPADDRESS = 0x01,
00074 PV8630_UNKNOWN = 0x02,
00075 PV8630_RMODE = 0x03,
00076 PV8630_RSTATUS = 0x04
00077 }
00078 SANEI_PV_Index;
00079
00080 extern void sanei_pv8630_init (void);
00081 extern SANE_Status sanei_pv8630_write_byte (int fd, SANEI_PV_Index index,
00082 SANE_Byte byte);
00083 extern SANE_Status sanei_pv8630_read_byte (int fd, SANEI_PV_Index index,
00084 SANE_Byte * byte);
00085 extern SANE_Status sanei_pv8630_prep_bulkread (int fd, int len);
00086 extern SANE_Status sanei_pv8630_prep_bulkwrite (int fd, int len);
00087 extern SANE_Status sanei_pv8630_flush_buffer (int fd);
00088 extern SANE_Status sanei_pv8630_bulkwrite (int fd, const void *data,
00089 size_t * len);
00090 extern SANE_Status sanei_pv8630_bulkread (int fd, void *data, size_t * len);
00091 extern SANE_Status sanei_pv8630_xpect_byte (int fd, SANEI_PV_Index index,
00092 SANE_Byte value, SANE_Byte mask);
00093 extern SANE_Status sanei_pv8630_wait_byte (int fd, SANEI_PV_Index index,
00094 SANE_Byte value, SANE_Byte mask,
00095 int timeout);
00096 #endif