no-OS
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
mbed_gpio.h
Go to the documentation of this file.
1/***************************************************************************/
31
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
37extern "C"
38{
39#endif
40
41#include <stdio.h>
42
43/*
44 * Note: The structure members are not strongly typed, as this file is included
45 * in application specific '.c' files. The mbed code structure does not
46 * allow inclusion of mbed driver files (e.g. mbed.h) into '.c' files.
47 * All the members are hence typecasted to mbed specific type during
48 * gpio init and read/write operations.
49 **/
50
56 uint8_t pin_mode; // GPIO pin mode (PinMode)
57};
58
64 uint8_t direction;
65 void *gpio_pin; // GPIO pin instance (DigitalIn/DigitalOut)
66 uint8_t pin_mode;
67};
68
72extern const struct no_os_gpio_platform_ops mbed_gpio_ops;
73
74#ifdef __cplusplus // Closing extern c
75}
76#endif
77
78#endif /* MBED_GPIO_H */
const struct no_os_gpio_platform_ops mbed_gpio_ops
Mbed specific GPIO platform ops structure.
GPIO specific descriptor for the mbed platform.
Definition mbed_gpio.h:63
uint8_t direction
Definition mbed_gpio.h:64
uint8_t pin_mode
Definition mbed_gpio.h:66
void * gpio_pin
Definition mbed_gpio.h:65
Structure holding the GPIO init parameters for mbed platform.
Definition mbed_gpio.h:55
uint8_t pin_mode
Definition mbed_gpio.h:56
Structure holding gpio function pointers that point to the platform specific function.
Definition no_os_gpio.h:115