Changeset 1926 for trunk/csctapi/io_serial.h
- Timestamp:
- 04/02/10 16:21:14 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/csctapi/io_serial.h
r1559 r1926 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 … … 55 55 56 56 /* IO_Serial creation and deletion */ 57 void IO_Serial_Flush ( void);57 void IO_Serial_Flush (struct s_reader * reader); 58 58 59 59 /* Initialization and closing */ 60 bool IO_Serial_InitPnP ( void);61 bool IO_Serial_Close ( void);60 bool IO_Serial_InitPnP (struct s_reader * reader); 61 bool IO_Serial_Close (struct s_reader * reader); 62 62 63 63 /* Transmission properties */ 64 bool IO_Serial_DTR_RTS( int, int);64 bool IO_Serial_DTR_RTS(struct s_reader * reader, int, int); 65 65 #if defined(TUXBOX) && defined(PPC) 66 void IO_Serial_Ioctl_Lock( int);66 void IO_Serial_Ioctl_Lock(struct s_reader * reader, int); 67 67 #else 68 #define IO_Serial_Ioctl_Lock( b) {} //FIXME ugly !!68 #define IO_Serial_Ioctl_Lock(a,b) {} //FIXME ugly !! 69 69 #endif 70 70 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);71 bool IO_Serial_SetBitrate (struct s_reader * reader, unsigned long bitrate, struct termios * tio); 72 bool IO_Serial_SetParams (struct s_reader * reader, unsigned long bitrate, unsigned bits, int parity, unsigned stopbits, int dtr, int rts); 73 bool IO_Serial_SetProperties (struct s_reader * reader, struct termios newtio); 74 int IO_Serial_SetParity (struct s_reader * reader, BYTE parity); 75 75 76 76 /* 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);77 bool IO_Serial_Read (struct s_reader * reader, unsigned timeout, unsigned size, BYTE * data); 78 bool IO_Serial_Write (struct s_reader * reader, unsigned delay, unsigned size, BYTE * data); 79 79 80 80 #endif /* IO_SERIAL */
Note:
See TracChangeset
for help on using the changeset viewer.