include/df/comport.hpp

00001 #ifndef PARITY_NONE
00002 #define PARITY_NONE       (0x0100)
00003 #define PARITY_ODD        (0x0200)
00004 #define PARITY_EVEN       (0x0400)
00005 #define PARITY_MARK       (0x0800)
00006 #define PARITY_SPACE      (0x1000)
00007 #endif
00008 
00009 #define STOPBITS_1   0x0
00010 #define STOPBITS_1_5 0x1
00011 #define STOPBITS_2   0x2
00012 
00013 //States for SetState()/ClrState()
00014 #define STATE_DTR    0x01
00015 #define STATE_RTS    0x02
00016 #define STATE_BREAK  0x04  //also WaitState()
00017 
00018 //States for WaitState()/GetState()
00019 #define STATE_CTS    0x10
00020 #define STATE_DSR    0x20
00021 #define STATE_RING   0x40
00022 #define STATE_DCD    0x80
00023 
00024 class ComPort : public File {
00025   public:
00026     BOOL SetConfig(uint32 _baud, uint16 _parity, uint8 _bits, uint8 _stopbits);
00027     BOOL Open(char *fname);
00028     BOOL SetState(int);
00029     BOOL ClrState(int);
00030     BOOL GetState(int);
00031     uint32 WaitState();
00032 };
00033 
00034 //COM1:9600N81
00035 

Generated on Mon Mar 5 09:49:13 2007 for DigiForce by  doxygen 1.4.7