sanei_pv8630.h

00001 /* sane - Scanner Access Now Easy.
00002 
00003    Copyright (C) 2000 Adrian Perez Jorge
00004    Copyright (C) 2001 Frank Zago
00005    Copyright (C) 2001 Marcio Teixeira
00006 
00007    This file is part of the SANE package.
00008  
00009    This program is free software; you can redistribute it and/or
00010    modify it under the terms of the GNU General Public License as
00011    published by the Free Software Foundation; either version 2 of the
00012    License, or (at your option) any later version.
00013 
00014    This program is distributed in the hope that it will be useful, but
00015    WITHOUT ANY WARRANTY; without even the implied warranty of
00016    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017    General Public License for more details.
00018 
00019    You should have received a copy of the GNU General Public License
00020    along with this program; if not, write to the Free Software
00021    Foundation, Inc., 59 Temple Place - Suite 330, Boston,
00022    MA 02111-1307, USA.
00023 
00024    As a special exception, the authors of SANE give permission for
00025    additional uses of the libraries contained in this release of SANE.
00026 
00027    The exception is that, if you link a SANE library with other files
00028    to produce an executable, this does not by itself cause the
00029    resulting executable to be covered by the GNU General Public
00030    License.  Your use of that executable is in no way restricted on
00031    account of linking the SANE library code into it.
00032 
00033    This exception does not, however, invalidate any other reasons why
00034    the executable file might be covered by the GNU General Public
00035    License.
00036 
00037    If you submit changes to SANE to the maintainers to be included in
00038    a subsequent release, you agree by submitting the changes that
00039    those changes may be distributed with this exception intact.
00040 
00041    If you write modifications of your own for SANE, it is your choice
00042    whether to permit this exception to apply to your modifications.
00043    If you do not wish that, delete this exception notice.
00044 
00045    Interface files for the PowerVision 8630 chip, a USB to
00046    parallel converter used in many scanners.
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 /* sanei_pv8630_h */

Generated on Fri Oct 3 04:45:39 2008 for SANEI by  doxygen 1.5.1