diff options
Diffstat (limited to 'glcddrivers/port.h')
-rw-r--r-- | glcddrivers/port.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/glcddrivers/port.h b/glcddrivers/port.h index ee851c8..fc97293 100644 --- a/glcddrivers/port.h +++ b/glcddrivers/port.h @@ -15,6 +15,24 @@ #include <string> #include <termios.h> +// The following block is copied from "asm/termbits.h" +// Has to be copied as the kernel header file conflicts with glibc termios.h +#define NCCS2 19 +struct termios2 { + tcflag_t c_iflag; /* input mode flags */ + tcflag_t c_oflag; /* output mode flags */ + tcflag_t c_cflag; /* control mode flags */ + tcflag_t c_lflag; /* local mode flags */ + cc_t c_line; /* line discipline */ + cc_t c_cc[NCCS2]; /* control characters */ + speed_t c_ispeed; /* input speed */ + speed_t c_ospeed; /* output speed */ +}; +#define TCGETS2 _IOR('T', 0x2A, struct termios2) +#define TCSETS2 _IOW('T', 0x2B, struct termios2) +#define BOTHER 0010000 + + namespace GLCD { @@ -72,7 +90,7 @@ public: int Open(const char * device); int Close(); - void SetBaudRate(speed_t speed); + void SetBaudRate(int speed); int ReadData(unsigned char * data); void WriteData(unsigned char data); |