no-OS
mbed_gpio.h
Go to the documentation of this file.
1 /***************************************************************************/
38 #ifndef MBED_GPIO_H
39 #define MBED_GPIO_H
40 
41 // Platform support needs to be C-compatible to work with other drivers
42 #ifdef __cplusplus
43 extern "C"
44 {
45 #endif
46 
47 /******************************************************************************/
48 /***************************** Include Files **********************************/
49 /******************************************************************************/
50 #include <stdio.h>
51 
52 /******************************************************************************/
53 /********************** Variables and User defined data types *****************/
54 /******************************************************************************/
55 
56 /*
57  * Note: The structure members are not strongly typed, as this file is included
58  * in application specific '.c' files. The mbed code structure does not
59  * allow inclusion of mbed driver files (e.g. mbed.h) into '.c' files.
60  * All the members are hence typecasted to mbed specific type during
61  * gpio init and read/write operations.
62  **/
63 
69  uint8_t pin_mode; // GPIO pin mode (PinMode)
70 };
71 
77  uint8_t direction;
78  void *gpio_pin; // GPIO pin instance (DigitalIn/DigitalOut)
79  uint8_t pin_mode;
80 };
81 
85 extern const struct no_os_gpio_platform_ops mbed_gpio_ops;
86 
87 /******************************************************************************/
88 /************************ Functions Declarations ******************************/
89 /******************************************************************************/
90 
91 #ifdef __cplusplus // Closing extern c
92 }
93 #endif
94 
95 #endif /* MBED_GPIO_H */
mbed_gpio_ops
const struct no_os_gpio_platform_ops mbed_gpio_ops
Mbed specific GPIO platform ops structure.
mbed_gpio_desc::pin_mode
uint8_t pin_mode
Definition: mbed_gpio.h:79
mbed_gpio_init_param
Structure holding the GPIO init parameters for mbed platform.
Definition: mbed_gpio.h:68
mbed_gpio_desc::direction
uint8_t direction
Definition: mbed_gpio.h:77
mbed_gpio_desc
GPIO specific descriptor for the mbed platform.
Definition: mbed_gpio.h:76
no_os_gpio_platform_ops
Structure holding gpio function pointers that point to the platform specific function.
Definition: no_os_gpio.h:133
mbed_gpio_desc::gpio_pin
void * gpio_pin
Definition: mbed_gpio.h:78
mbed_gpio_init_param::pin_mode
uint8_t pin_mode
Definition: mbed_gpio.h:69