Go to the documentation of this file.00001 #ifndef QRK_C_SERIAL_T_LIN_H
00002 #define QRK_C_SERIAL_T_LIN_H
00003
00013 #include "ring_buffer.h"
00014 #include <termios.h>
00015
00016
00017 enum {
00018 SerialErrorStringSize = 256,
00019 RingBufferSizeShift = 10,
00020 RingBufferSize = 1 << RingBufferSizeShift,
00021 };
00022
00023
00027 typedef struct
00028 {
00029 int errno_;
00030 char error_string_[SerialErrorStringSize];
00031 int fd_;
00032 struct termios sio_;
00033 ringBuffer_t ring_;
00034 char buffer_[RingBufferSize];
00035 char has_last_ch_;
00036 char last_ch_;
00038 } serial_t;
00039
00040 #endif