All Classes Namespaces Files Functions Variables Enumerations Enumerator
libs/connection/c/serial_t_win.h
Go to the documentation of this file.
00001 #ifndef QRK_C_SERIAL_T_WIN_H
00002 #define QRK_C_SERIAL_T_WIN_H
00003 
00013 #include "ring_buffer.h"
00014 #include <windows.h>
00015 
00016 
00017 enum {
00018   SerialErrorStringSize = 256,
00019   RingBufferSizeShift = 10,
00020   RingBufferSize = 1 << RingBufferSizeShift,
00021 };
00022 
00023 
00027 typedef struct {
00028   int errno_;                   
00029   HANDLE hCom_;                 
00030   int current_timeout_;         
00031   ringBuffer_t ring_;           
00032   char buffer_[RingBufferSize];
00033   char has_last_ch_;            
00034   char last_ch_;                
00036 } serial_t;
00037 
00038 #endif /* !QRK_C_SERIAL_T_LIN_H */