WL865E4-P  36.07.001
m2mb_gpio.h
Go to the documentation of this file.
1 /*===============================================================================================*/
2 /* >>> Copyright (C) Telit Communications S.p.A. Italy All Rights Reserved. <<< */
28 #ifndef M2M_M2MB_GPIO_API_H
29 #define M2M_M2MB_GPIO_API_H
30 
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
45 /*-----------------------------------------------------------------------------------------------*/
46 
51 /*-----------------------------------------------------------------------------------------------*/
52 
53 /* Global declarations ==========================================================================*/
54 
55 /* Global enums ==============================================================================*/
56 
58 {
62 
64 {
81 
82 
83 
91 typedef uint32_t M2MB_GPIO_ID_T;
92 
93 typedef uint32_t M2MB_GPIO_PIN_T;
94 
95 typedef void* M2MB_GPIOINT_ID_T;
101 typedef uint32_t M2MB_GPIOINT_PIN_T;
102 
107 typedef enum
108 {
112  M2MB_GPIO_INVALID_DIR_E = 0x7fffffff /* Placeholder - Do not use */
113 
115 
122 typedef enum
123 {
128  M2MB_GPIO_INVALID_PULL_E = 0x7fffffff /* Placeholder - Do not use */
129 
131 
138 typedef enum
139 {
147 
154 typedef enum
155 {
159  M2MB_GPIO_INVALID_VALUE_E = 0x7fffffff /* Placeholder - Do not use */
160 
162 
163 
168 typedef enum
169 {
176  M2MB_GPIOINT_TRIGGER_INVALID_E = 0x7fffffff /* Placeholder - Do not use */
177 
179 
184 typedef enum
185 {
192  M2MB_GPIOINT_INTERRUPT_PRIORITY_INVALID_E = 0x7fffffff /* Placeholder - Do not use */
193 
195 
200 typedef enum
201 {
208 
209 /* Global typedefs ==============================================================================*/
219 
227 
228 
229 /* Global typedefs ==============================================================================*/
230 
234 typedef struct
235 {
243 
247 typedef struct
248 {
259 
260 
261 /* Global functions =============================================================================*/
262 
263 /*-----------------------------------------------------------------------------------------------*/
301 /*-----------------------------------------------------------------------------------------------*/
302 INT32 m2mb_gpio_open( const CHAR *path, INT32 flags, ... );
303 
304 
305 
306 /*-----------------------------------------------------------------------------------------------*/
343 /*-----------------------------------------------------------------------------------------------*/
345 
346 
347 
348 /*-----------------------------------------------------------------------------------------------*/
400 /*-----------------------------------------------------------------------------------------------*/
402 
403 
404 
405 /*-----------------------------------------------------------------------------------------------*/
437 /*-----------------------------------------------------------------------------------------------*/
438 SSIZE_T m2mb_gpio_read( INT32 fd, void *buf, SIZE_T nbyte );
439 
440 
441 
442 /*-----------------------------------------------------------------------------------------------*/
474 /*-----------------------------------------------------------------------------------------------*/
475 SSIZE_T m2mb_gpio_write( INT32 fd, const void *buf, SIZE_T nbyte );
476 
477 
478 /*-----------------------------------------------------------------------------------------------*/
523 /*-----------------------------------------------------------------------------------------------*/
524 INT32 m2mb_gpioint_open( const CHAR *path, INT32 cfg, ... );
525 
526 
527 
528 /*-----------------------------------------------------------------------------------------------*/
563 /*-----------------------------------------------------------------------------------------------*/
565 
566 
567 
568 /*-----------------------------------------------------------------------------------------------*/
633 /*-----------------------------------------------------------------------------------------------*/
635 
639 /*-----------------------------------------------------------------------------------------------*/
640 
641 
642 #ifdef __cplusplus
643 }
644 #endif
645 
646 #endif /* M2M_M2MB_GPIO_API_H */
M2MB_GPIO_DRIVE_T drive
Definition: m2mb_gpio.h:240
INT32 SSIZE_T
Definition: m2mb_types.h:100
M2MB_GPIOINT_INTERRUPT_PRIORITY_T priority
Definition: m2mb_gpio.h:252
M2MB_GPIOINT_ID_T handle
Definition: m2mb_gpio.h:249
uint32_t M2MB_GPIO_ID_T
Definition: m2mb_gpio.h:91
M2MB_GPIO_DIRECTION_T
Definition: m2mb_gpio.h:107
M2MB_GPIOINT_CB_T callback_fn
Definition: m2mb_gpio.h:254
void(* M2MB_GPIOINT_CB_T)(M2MB_GPIOINT_CALLBACK_DATA_T)
Definition: m2mb_gpio.h:226
M2MB_GPIOINT_INTERRUPT_MASK_T mask
Definition: m2mb_gpio.h:253
M2MB_GPIOINT_PIN_T pin
Definition: m2mb_gpio.h:250
M2MB_GPIO_DIRECTION_T direction
Definition: m2mb_gpio.h:238
M2MB_GPIO_DRIVE_T
Definition: m2mb_gpio.h:138
M2MB_GPIO_CFG_T gpio_cfg
Definition: m2mb_gpio.h:256
M2MB_GPIOINT_IOCTL_REQUEST
Definition: m2mb_gpio.h:63
INT32 m2mb_gpioint_close(INT32 fd)
Closes a GPIO port.
M2MB_GPIO_PIN_T pin
Definition: m2mb_gpio.h:237
M2MB_GPIOINT_TRIGGER_TYPE_T triggertype
Definition: m2mb_gpio.h:251
M2MB_GPIOINT_INTERRUPT_MASK_T
Definition: m2mb_gpio.h:200
uint32_t M2MB_GPIO_PIN_T
Definition: m2mb_gpio.h:93
M2MB_GPIOINT_CALLBACK_DATA_T callback_ctxt
Definition: m2mb_gpio.h:255
M2MB_GPIO_ID_T accessId
Definition: m2mb_gpio.h:236
UINT32 SIZE_T
Definition: m2mb_types.h:99
INT32 m2mb_gpioint_ioctl(INT32 fd, M2MB_GPIOINT_IOCTL_REQUEST_T request,...)
Configure the GPIO port.
char CHAR
Definition: m2mb_types.h:74
M2MB_GPIO_PULL_T pull
Definition: m2mb_gpio.h:239
uint32_t M2MB_GPIOINT_CALLBACK_DATA_T
Definition: m2mb_gpio.h:218
M2MB_GPIO_IOCTL_REQUEST
Definition: m2mb_gpio.h:57
M2MB_GPIOINT_INTERRUPT_PRIORITY_T
Definition: m2mb_gpio.h:184
enum M2MB_GPIOINT_IOCTL_REQUEST M2MB_GPIOINT_IOCTL_REQUEST_T
signed int INT32
Definition: m2mb_types.h:80
uint32_t M2MB_GPIOINT_PIN_T
Definition: m2mb_gpio.h:101
enum M2MB_GPIO_IOCTL_REQUEST M2MB_GPIO_IOCTL_REQUEST_T
INT32 m2mb_gpio_ioctl(INT32 fd, M2MB_GPIO_IOCTL_REQUEST_T request,...)
Configure the GPIO port.
M2MB_GPIOINT_TRIGGER_TYPE_T
Definition: m2mb_gpio.h:168
SSIZE_T m2mb_gpio_write(INT32 fd, const void *buf, SIZE_T nbyte)
Write to GPIO port.
void * M2MB_GPIOINT_ID_T
Definition: m2mb_gpio.h:95
INT32 m2mb_gpio_close(INT32 fd)
Closes a GPIO port.
SSIZE_T m2mb_gpio_read(INT32 fd, void *buf, SIZE_T nbyte)
Read the GPIO port.
M2MB_GPIO_VALUE_T
Definition: m2mb_gpio.h:154
M2MB_GPIO_PULL_T
Definition: m2mb_gpio.h:122
INT32 m2mb_gpio_open(const CHAR *path, INT32 flags,...)
Open a GPIO port.
INT32 m2mb_gpioint_open(const CHAR *path, INT32 cfg,...)
Open a GPIO port and enable the interrupt.