Lely core libraries 2.3.4
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
30extern "C" {
31#endif
32
33#if _WIN32
34
35static inline LPDCB io_attr_lpDCB(const io_attr_t *attr);
36static inline LPCOMMTIMEOUTS io_attr_lpCommTimeouts(const io_attr_t *attr);
37
38static inline LPDCB
39io_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
49static inline LPCOMMTIMEOUTS
50io_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.
This is the internal header file of the Windows-specific I/O declarations.
An opaque serial I/O device attributes type.
Definition: attr.h:34