PebbleOS v4.47.0-1312-gf1984a001
Loading...
Searching...
No Matches
nrf5_gpiote.h File Reference
#include <stdint.h>
#include <pbl/device.h>
#include <pbl/drivers/intc.h>
#include <pbl/kernel/irq.h>

Data Structures

struct  pbl_gpio_nrf5_gpiote_channel
 Owner of a GPIOTE channel. More...
 
struct  pbl_gpio_nrf5_gpiote_state
 GPIOTE state. More...
 
struct  pbl_gpio_nrf5_gpiote
 nRF5 GPIOTE. More...
 

Macros

#define PBL_GPIO_NRF5_GPIOTE_CHANNELS   8U
 Number of GPIOTE channels.
 
#define PBL_GPIO_NRF5_GPIOTE_DEFINE(sym, _name, _base, _irq)
 Define an nRF5 GPIOTE.
 

Functions

int pbl_gpio_nrf5_gpiote_alloc (const struct pbl_gpio_nrf5_gpiote *gpiote, uint8_t *channel)
 Allocate a channel for the tasks of a driver.
 
void pbl_gpio_nrf5_gpiote_task_configure (const struct pbl_gpio_nrf5_gpiote *gpiote, uint8_t channel, uint32_t psel)
 Drive a pin from the tasks of an allocated channel.
 
void pbl_gpio_nrf5_gpiote_task_trigger (const struct pbl_gpio_nrf5_gpiote *gpiote, uint8_t channel, bool high)
 Drive the pin of a task channel high or low.
 
uintptr_t pbl_gpio_nrf5_gpiote_task_addr (const struct pbl_gpio_nrf5_gpiote *gpiote, uint8_t channel, bool high)
 Address of the task driving the pin of a task channel high or low, for PPI.
 
int pbl_gpio_nrf5_gpiote_configure (const struct pbl_gpio_nrf5_gpiote *gpiote, const struct pbl_intc *intc, uint32_t hwirq, uint32_t psel, uint32_t type)
 Bind a channel to a pin, for a line of an interrupt controller.
 
int pbl_gpio_nrf5_gpiote_enable (const struct pbl_gpio_nrf5_gpiote *gpiote, const struct pbl_intc *intc, uint32_t hwirq)
 Raise the events of the channel of a line.
 
int pbl_gpio_nrf5_gpiote_disable (const struct pbl_gpio_nrf5_gpiote *gpiote, const struct pbl_intc *intc, uint32_t hwirq)
 Stop the events of the channel of a line, leaving its input unsensed.
 
void pbl_gpio_nrf5_gpiote_free (const struct pbl_gpio_nrf5_gpiote *gpiote, const struct pbl_intc *intc, uint32_t hwirq)
 Unbind the channel of a line, leaving it to others.