46#define IOT_GPIO_SUCCESS ( 0 )
47#define IOT_GPIO_INVALID_VALUE ( 1 )
48#define IOT_GPIO_READ_FAILED ( 2 )
49#define IOT_GPIO_WRITE_FAILED ( 3 )
50#define IOT_GPIO_FUNCTION_NOT_SUPPORTED ( 4 )
119struct IotGpioDescriptor;
137 void * pvUserContext );
171 void * pvUserContext );
186 uint8_t * pucPinState );
200 uint8_t ucPinState );
237 void *
const pvBuffer );
IotGpioHandle_t iot_gpio_open(int32_t lGpioNumber)
iot_gpio_open is used to open the GPIO handle. The application must call this function to open desire...
struct IotGpioDescriptor * IotGpioHandle_t
IotGpioHandle_t type is the GPIO handle returned by calling iot_gpio_open() this is initialized in op...
Definition: iot_gpio.h:126
void iot_gpio_set_callback(IotGpioHandle_t const pxGpio, IotGpioCallback_t xGpioCallback, void *pvUserContext)
iot_gpio_set_callback is used to set the callback to be called when an interrupt is triggered.
IotGpioOutputMode_t
enum for configuring GPIO output type.
Definition: iot_gpio.h:65
int32_t iot_gpio_close(IotGpioHandle_t const pxGpio)
iot_gpio_close is used to deinitializes the GPIO pin to default value and close the handle....
IotGpioPull_t
GPIO pin internal pull state. Sets the default state for output pins.
Definition: iot_gpio.h:74
void(* IotGpioCallback_t)(uint8_t ucPinState, void *pvUserContext)
GPIO interrupt callback type. This callback is passed to the driver by using iot_gpio_set_callback AP...
Definition: iot_gpio.h:136
IotGpioIoctlRequest_t
Ioctl request types.
Definition: iot_gpio.h:97
int32_t iot_gpio_write_sync(IotGpioHandle_t const pxGpio, uint8_t ucPinState)
iot_gpio_write_sync is used to write data into the GPIO pin in blocking mode.
IotGpioInterrupt_t
GPIO pin interrupt config types.
Definition: iot_gpio.h:84
int32_t iot_gpio_read_sync(IotGpioHandle_t const pxGpio, uint8_t *pucPinState)
iot_gpio_read_sync is used to read data from GPIO pin in blocking mode.
int32_t iot_gpio_ioctl(IotGpioHandle_t const pxGpio, IotGpioIoctlRequest_t xRequest, void *const pvBuffer)
iot_gpio_ioctl is used to configure GPIO pin options. The application should call this function to co...
IotGpioDirection_t
enum for configuring GPIO input/output direction.
Definition: iot_gpio.h:56
@ eGpioPushPull
Definition: iot_gpio.h:67
@ eGpioOpenDrain
Definition: iot_gpio.h:66
@ eGpioPullUp
Definition: iot_gpio.h:76
@ eGpioPullDown
Definition: iot_gpio.h:77
@ eGpioPullNone
Definition: iot_gpio.h:75
@ eGetGpioFunction
Definition: iot_gpio.h:107
@ eGetGpioDriveStrength
Definition: iot_gpio.h:113
@ eSetGpioInterrupt
Definition: iot_gpio.h:103
@ eSetGpioOutputMode
Definition: iot_gpio.h:102
@ eSetGpioDriveStrength
Definition: iot_gpio.h:106
@ eGetGpioInterrupt
Definition: iot_gpio.h:111
@ eSetGpioFunction
Definition: iot_gpio.h:98
@ eSetGpioDirection
Definition: iot_gpio.h:100
@ eGetGpioSpeed
Definition: iot_gpio.h:112
@ eGetGpioOutputType
Definition: iot_gpio.h:110
@ eGetGpioDirection
Definition: iot_gpio.h:108
@ eSetGpioSpeed
Definition: iot_gpio.h:105
@ eGetGpioPull
Definition: iot_gpio.h:109
@ eSetGpioPull
Definition: iot_gpio.h:101
@ eGpioInterruptLow
Definition: iot_gpio.h:89
@ eGpioInterruptNone
Definition: iot_gpio.h:85
@ eGpioInterruptHigh
Definition: iot_gpio.h:90
@ eGpioInterruptRising
Definition: iot_gpio.h:86
@ eGpioInterruptEdge
Definition: iot_gpio.h:88
@ eGpioInterruptFalling
Definition: iot_gpio.h:87
@ eGpioDirectionInput
Definition: iot_gpio.h:57
@ eGpioDirectionOutput
Definition: iot_gpio.h:58