no-OS
mbed_gpio.h
Go to the documentation of this file.
1 /***************************************************************************/
32 #ifndef MBED_GPIO_H
33 #define MBED_GPIO_H
34 
35 // Platform support needs to be C-compatible to work with other drivers
36 #ifdef __cplusplus
37 extern "C"
38 {
39 #endif
40 
41 /******************************************************************************/
42 /***************************** Include Files **********************************/
43 /******************************************************************************/
44 #include <stdio.h>
45 
46 /******************************************************************************/
47 /********************** Variables and User defined data types *****************/
48 /******************************************************************************/
49 
50 /*
51  * Note: The structure members are not strongly typed, as this file is included
52  * in application specific '.c' files. The mbed code structure does not
53  * allow inclusion of mbed driver files (e.g. mbed.h) into '.c' files.
54  * All the members are hence typecasted to mbed specific type during
55  * gpio init and read/write operations.
56  **/
57 
63  uint8_t pin_mode; // GPIO pin mode (PinMode)
64 };
65 
71  uint8_t direction;
72  void *gpio_pin; // GPIO pin instance (DigitalIn/DigitalOut)
73  uint8_t pin_mode;
74 };
75 
79 extern const struct no_os_gpio_platform_ops mbed_gpio_ops;
80 
81 /******************************************************************************/
82 /************************ Functions Declarations ******************************/
83 /******************************************************************************/
84 
85 #ifdef __cplusplus // Closing extern c
86 }
87 #endif
88 
89 #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:73
mbed_gpio_init_param
Structure holding the GPIO init parameters for mbed platform.
Definition: mbed_gpio.h:62
mbed_gpio_desc::direction
uint8_t direction
Definition: mbed_gpio.h:71
mbed_gpio_desc
GPIO specific descriptor for the mbed platform.
Definition: mbed_gpio.h:70
no_os_gpio_platform_ops
Structure holding gpio function pointers that point to the platform specific function.
Definition: no_os_gpio.h:127
mbed_gpio_desc::gpio_pin
void * gpio_pin
Definition: mbed_gpio.h:72
mbed_gpio_init_param::pin_mode
uint8_t pin_mode
Definition: mbed_gpio.h:63