Hardware Abstraction Layer for FreeRTOS
gpio.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include <mux.h>
#include <hal.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.

Data Structures

struct  gpio_generic
 
struct  gpio_pin_generic
 

Enumerations

enum  gpio_direction { GPIO_INPUT, GPIO_OUTPUT }
 
enum  gpio_setting { GPIO_OPEN, GPIO_PULL_UP, GPIO_PULL_DOWN }
 
enum  gpio_interrupt { GPIO_FALLING, GPIO_RISING, GPIO_EITHER }
 

Functions

struct gpio * gpio_init (uint32_t index)
 
int32_t gpio_deinit (struct gpio *gpio)
 
struct gpio_pin * gpioPin_init (struct gpio *gpio, uint32_t pin, enum gpio_direction dir, enum gpio_setting setting)
 
int32_t gpioPin_deinit (struct gpio_pin *pin)
 
int32_t gpioPin_enableInterrupt (struct gpio_pin *pin)
 
int32_t gpioPin_disableInterrupt (struct gpio_pin *pin)
 
int32_t gpioPin_setCallback (struct gpio_pin *pin, bool(*callback)(struct gpio_pin *pin, uint32_t pinID, void *data), void *data, enum gpio_interrupt inter)
 
int32_t gpioPin_setDirection (struct gpio_pin *pin, enum gpio_direction dir)
 
int32_t gpioPin_setSetting (struct gpio_pin *pin, enum gpio_setting setting)
 
int32_t gpioPin_SchmittTrigger (struct gpio_pin *pin, bool schmitt)
 
int32_t gpioPin_setValue (struct gpio_pin *pin, bool value)
 
int32_t gpioPin_setPin (struct gpio_pin *pin)
 
int32_t gpioPin_clearPin (struct gpio_pin *pin)
 
int32_t gpioPin_togglePin (struct gpio_pin *pin)
 
bool gpioPin_getValue (struct gpio_pin *pin)