Changeset 1975 for branches/modular/csctapi/io_serial.h
- Timestamp:
- 04/06/10 17:45:45 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/modular/csctapi/io_serial.h
r1559 r1975 28 28 #include <termios.h> 29 29 30 //#define IO_Serial_DTR_Set() IO_Serial_DTR_RTS(1, 1)31 //#define IO_Serial_DTR_Clr() IO_Serial_DTR_RTS(1, 0)32 #define IO_Serial_RTS_Set( ) IO_Serial_DTR_RTS(0, 1)33 #define IO_Serial_RTS_Clr( ) IO_Serial_DTR_RTS(0, 0)30 #define IO_Serial_DTR_Set(reader) IO_Serial_DTR_RTS(reader, 1, 1) 31 #define IO_Serial_DTR_Clr(reader) IO_Serial_DTR_RTS(reader, 1, 0) 32 #define IO_Serial_RTS_Set(reader) IO_Serial_DTR_RTS(reader, 0, 1) 33 #define IO_Serial_RTS_Clr(reader) IO_Serial_DTR_RTS(reader, 0, 0) 34 34 35 35 //Type of parity of the serial device … … 48 48 #define IO_SERIAL_PNPID_SIZE 256 49 49 50 int wr;51 52 50 /* 53 51 * Exported functions declaration … … 55 53 56 54 /* IO_Serial creation and deletion */ 57 void IO_Serial_Flush ( void);55 void IO_Serial_Flush (struct s_reader * reader); 58 56 59 57 /* Initialization and closing */ 60 bool IO_Serial_InitPnP ( void);61 bool IO_Serial_Close ( void);58 bool IO_Serial_InitPnP (struct s_reader * reader); 59 bool IO_Serial_Close (struct s_reader * reader); 62 60 63 61 /* Transmission properties */ 64 bool IO_Serial_DTR_RTS( int, int);62 bool IO_Serial_DTR_RTS(struct s_reader * reader, int, int); 65 63 #if defined(TUXBOX) && defined(PPC) 66 void IO_Serial_Ioctl_Lock( int);64 void IO_Serial_Ioctl_Lock(struct s_reader * reader, int); 67 65 #else 68 #define IO_Serial_Ioctl_Lock( b) {} //FIXME ugly !!66 #define IO_Serial_Ioctl_Lock(a,b) {} //FIXME ugly !! 69 67 #endif 70 68 71 bool IO_Serial_SetBitrate ( unsigned long bitrate, struct termios * tio);72 bool IO_Serial_SetParams ( unsigned long bitrate, unsigned bits, int parity, unsigned stopbits, int dtr, int rts);73 bool IO_Serial_SetProperties (struct termios newtio);74 int IO_Serial_SetParity ( BYTE parity);69 bool IO_Serial_SetBitrate (struct s_reader * reader, unsigned long bitrate, struct termios * tio); 70 bool IO_Serial_SetParams (struct s_reader * reader, unsigned long bitrate, unsigned bits, int parity, unsigned stopbits, int dtr, int rts); 71 bool IO_Serial_SetProperties (struct s_reader * reader, struct termios newtio); 72 int IO_Serial_SetParity (struct s_reader * reader, BYTE parity); 75 73 76 74 /* Input and output */ 77 bool IO_Serial_Read ( unsigned timeout, unsigned size, BYTE * data);78 bool IO_Serial_Write ( unsigned delay, unsigned size, BYTE * data);75 bool IO_Serial_Read (struct s_reader * reader, unsigned timeout, unsigned size, BYTE * data); 76 bool IO_Serial_Write (struct s_reader * reader, unsigned delay, unsigned size, BYTE * data); 79 77 80 78 #endif /* IO_SERIAL */
Note:
See TracChangeset
for help on using the changeset viewer.