Lely core libraries  2.2.5
attr.h
Go to the documentation of this file.
1 
23 #ifndef LELY_IO_INTERN_ATTR_H_
24 #define LELY_IO_INTERN_ATTR_H_
25 
26 #include "io.h"
27 #include <lely/io/attr.h>
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 #ifdef _WIN32
34 
35 static inline LPDCB io_attr_lpDCB(const io_attr_t *attr);
36 static inline LPCOMMTIMEOUTS io_attr_lpCommTimeouts(const io_attr_t *attr);
37 
38 static inline LPDCB
39 io_attr_lpDCB(const io_attr_t *attr)
40 {
41  struct io_attr {
42  DCB DCB;
43  COMMTIMEOUTS CommTimeouts;
44  };
45 
46  return &((struct io_attr *)attr)->DCB;
47 }
48 
49 static inline LPCOMMTIMEOUTS
50 io_attr_lpCommTimeouts(const io_attr_t *attr)
51 {
52  struct io_attr {
53  DCB DCB;
54  COMMTIMEOUTS CommTimeouts;
55  };
56 
57  return &((struct io_attr *)attr)->CommTimeouts;
58 }
59 
60 #endif // _WIN32
61 
62 #ifdef __cplusplus
63 }
64 #endif
65 
66 #endif // !LELY_IO_INTERN_ATTR_H_
This header file is part of the I/O library; it contains the serial I/O attributes declarations...
An opaque serial I/O device attributes type.
Definition: attr.h:34
This is the internal header file of the I/O library.