oveRTOS C API
Embedded RTOS framework — build system, configuration, and portable C API
Loading...
Searching...
No Matches
Typedefs | Enumerations | Functions
gpio.h File Reference
#include "ove/types.h"
#include "ove_config.h"
Include dependency graph for gpio.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef void(* ove_gpio_irq_cb) (unsigned int port, unsigned int pin, void *user_data)
 GPIO interrupt callback type.
 

Enumerations

enum  ove_gpio_mode_t { OVE_GPIO_MODE_INPUT = 0 , OVE_GPIO_MODE_OUTPUT_PP = 1 , OVE_GPIO_MODE_OUTPUT_OD = 2 }
 GPIO pin direction and drive mode. More...
 
enum  ove_gpio_irq_mode_t { OVE_GPIO_IRQ_RISING = 0x01 , OVE_GPIO_IRQ_FALLING = 0x02 , OVE_GPIO_IRQ_BOTH = 0x03 }
 GPIO interrupt trigger edge selection. More...
 

Functions

int ove_gpio_configure (unsigned int port, unsigned int pin, ove_gpio_mode_t mode)
 Configure the direction and drive mode of a GPIO pin.
 
int ove_gpio_set (unsigned int port, unsigned int pin, int value)
 Set the output level of a GPIO pin.
 
int ove_gpio_get (unsigned int port, unsigned int pin)
 Read the current logical level of a GPIO pin.
 
int ove_gpio_irq_register (unsigned int port, unsigned int pin, ove_gpio_irq_mode_t mode, ove_gpio_irq_cb callback, void *user_data)
 Register an interrupt callback for a GPIO pin.
 
int ove_gpio_irq_enable (unsigned int port, unsigned int pin)
 Enable a previously registered GPIO interrupt.
 
int ove_gpio_irq_disable (unsigned int port, unsigned int pin)
 Disable a previously enabled GPIO interrupt without unregistering it.
 
int ove_gpio_irq_unregister (unsigned int port, unsigned int pin)
 Unregister a GPIO interrupt, freeing its slot.