11 |
|
|
12 |
#ifndef _WINDOWS // |
#ifndef _WINDOWS // |
13 |
inline void Sleep(int x) { usleep(x*1000);} |
inline void Sleep(int x) { usleep(x*1000);} |
14 |
|
#include <termios.h> |
15 |
#endif |
#endif |
16 |
|
|
17 |
|
|
22 |
DCB mDcbRestore; |
DCB mDcbRestore; |
23 |
#else |
#else |
24 |
int mFiledescriptor; |
int mFiledescriptor; |
25 |
|
termios mOldtio; |
26 |
#endif |
#endif |
27 |
|
|
28 |
char* mPortstr; |
char* mPortstr; |
29 |
int mBitrate; |
int mBitrate; |
30 |
bool mIsopen; |
bool mIsopen; |
31 |
|
|
|
//void printByte(char* description, unsigned char byte); |
|
32 |
public: |
public: |
33 |
CSerial(); |
CSerial(); |
34 |
CSerial(char* port, int bitrate); |
CSerial(char* port, int bitrate); |
54 |
//UCVector readBytes(int maxcount); |
//UCVector readBytes(int maxcount); |
55 |
protected: |
protected: |
56 |
|
|
57 |
|
void printByte(char* description, unsigned char byte); |
58 |
#ifdef _WINDOWS |
#ifdef _WINDOWS |
59 |
void openWindows(); |
void openWindows(); |
60 |
#else |
#else |