Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
freertos/stropts.h
Go to the documentation of this file.
1
34
#ifndef _stropts_h_
35
#define _stropts_h_
36
37
#if defined (__cplusplus)
38
extern
"C"
{
39
#endif
40
41
#if defined(ESP_PLATFORM)
42
#include <sys/ioctl.h>
43
#else
49
int
ioctl
(
int
fd,
unsigned
long
int
key, ...);
50
#endif
// ESP_PLATFORM
51
53
#define IOC_NONE 0U
54
56
#define IOC_WRITE 1U
57
59
#define IOC_READ 2U
60
67
#define IOC(_dir, _type, _num, _size) \
68
(((_dir) << 30) | ((_type) << 8) | ((_num)) | ((_size) << 16))
69
74
#define IO(_type, _num) IOC(IOC_NONE, (_type), (_num), 0)
75
81
#define IOR(_type, _num, _size) IOC(IOC_READ, (_type), (_num), (_size))
82
88
#define IOW(_type, _num, _size) IOC(IOC_WRITE, (_type), (_num), (_size))
89
95
#define IOWR(_type, _num, _size) IOC(IOC_WRITE | IOC_READ, (_type), (_num), (_size))
96
101
#define IOC_DIR(_num) (((_num) >> 30) & 0x00000003)
102
107
#define IOC_TYPE(_num) (((_num) >> 8) & 0x000000FF)
108
113
#define IOC_NR(_num) (((_num) >> 0) & 0x000000FF)
114
119
#define IOC_SIZE(_num) (((_num) >> 16) & 0x00003FFF)
120
122
#define IOC_SIZEBITS 14
123
124
#if defined (__cplusplus)
125
}
126
#endif
127
128
#endif
/* _stropts_h_ */
ioctl
int ioctl(int fd, unsigned long int key,...)
Request and ioctl transaction.
Definition
Fileio.cxx:452
include
freertos
stropts.h
Generated on Sun Feb 2 2025 21:18:13 for Open Model Railroad Network (OpenMRN) by
1.9.8