/[H7]/branches/linux-serial/Serial.h
ViewVC logotype

Diff of /branches/linux-serial/Serial.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 48 by torben, Mon Feb 5 01:10:50 2007 UTC revision 49 by torben, Mon Feb 5 07:06:43 2007 UTC
# Line 11  Line 11 
11  #include <stdexcept>  #include <stdexcept>
12  typedef std::vector<unsigned char> UCVector;  typedef std::vector<unsigned char> UCVector;
13    
14  #ifndef _WINDOWS //  #ifndef _MSC_VER //
15  inline void Sleep(int x) { usleep(x*1000);}  inline void Sleep(int x) { usleep(x*1000);}
16  #include <termios.h>  #include <termios.h>
17  #endif  #endif
# Line 19  inline void Sleep(int x) { usleep(x*1000 Line 19  inline void Sleep(int x) { usleep(x*1000
19    
20  class CSerial  class CSerial
21  {  {
22  #ifdef _WINDOWS  #ifdef _MSC_VER
23          HANDLE mComport;          HANDLE mComport;
24          DCB mDcbRestore;          DCB mDcbRestore;
25  #else  #else
# Line 42  public: Line 42  public:
42          int readByte();          int readByte();
43          void writeByte(unsigned char out);          void writeByte(unsigned char out);
44    
45  #ifdef _WINDOWS  #ifdef _MSC_VER
46          COMSTAT getComstat() const;          COMSTAT getComstat() const;
47  #endif  #endif
48          int bytesReady() const;          int bytesReady() const;
# Line 57  public: Line 57  public:
57  protected:  protected:
58                    
59          void printByte(char* description, unsigned char byte);          void printByte(char* description, unsigned char byte);
60  #ifdef _WINDOWS  #ifdef _MSC_VER
61          void openWindows();          void openWindows();
62  #else  #else
63          void openLinux();          void openLinux();

Legend:
Removed from v.48  
changed lines
  Added in v.49

  ViewVC Help
Powered by ViewVC 1.1.20