--- branches/linux-serial/Serial.h 2007/02/04 23:11:02 46 +++ branches/linux-serial/Serial.h 2007/02/05 07:06:43 49 @@ -7,9 +7,11 @@ #pragma once #include +#include +#include typedef std::vector UCVector; -#ifndef _WINDOWS // +#ifndef _MSC_VER // inline void Sleep(int x) { usleep(x*1000);} #include #endif @@ -17,7 +19,7 @@ class CSerial { -#ifdef _WINDOWS +#ifdef _MSC_VER HANDLE mComport; DCB mDcbRestore; #else @@ -32,15 +34,15 @@ public: CSerial(); CSerial(char* port, int bitrate); - ~CSerial(void); + virtual ~CSerial(void); void close(); void open(char* port, int bitrate); - unsigned char readByte(); + int readByte(); void writeByte(unsigned char out); -#ifdef _WINDOWS +#ifdef _MSC_VER COMSTAT getComstat() const; #endif int bytesReady() const; @@ -55,7 +57,7 @@ protected: void printByte(char* description, unsigned char byte); -#ifdef _WINDOWS +#ifdef _MSC_VER void openWindows(); #else void openLinux();