ruuvi.drivers.c ${PROJECT_VERSION}
Drivers for external sensors and peripherals on embedded systems.
Loading...
Searching...
No Matches
ruuvi_interface_gpio_interrupt.h
Go to the documentation of this file.
1#ifndef RUUVI_INTERFACE_GPIO_INTERRUPT_H
2#define RUUVI_INTERFACE_GPIO_INTERRUPT_H
16#include "ruuvi_driver_error.h"
19#if RI_GPIO_ENABLED
20# define RUUVI_NRF5_SDK15_GPIO_INTERRUPT_ENABLED RUUVI_NRF5_SDK15_ENABLED
21#endif
22
33
44
45typedef void (*ri_gpio_interrupt_fp_t) (const ri_gpio_evt_t);
46
64 ri_gpio_interrupt_fp_t * const interrupt_table, const uint16_t max_interrupts);
65
72
79
106 const ri_gpio_slope_t slope,
107 const ri_gpio_mode_t mode,
108 const ri_gpio_interrupt_fp_t handler);
109
121
124#endif
uint32_t rd_status_t
bitfield for representing errors
ri_gpio_slope_t
Enable implementation selected by application.
rd_status_t ri_gpio_interrupt_enable(const ri_gpio_id_t pin, const ri_gpio_slope_t slope, const ri_gpio_mode_t mode, const ri_gpio_interrupt_fp_t handler)
Enable interrupt on a pin.
rd_status_t ri_gpio_interrupt_init(ri_gpio_interrupt_fp_t *const interrupt_table, const uint16_t max_interrupts)
Initialize interrupt functionality to GPIO. Takes address of interrupt table as a pointer to avoid ty...
void(* ri_gpio_interrupt_fp_t)(const ri_gpio_evt_t)
rd_status_t ri_gpio_interrupt_uninit(void)
Uninitialize interrupt functionality of GPIO.
rd_status_t ri_gpio_interrupt_disable(const ri_gpio_id_t pin)
Disable interrupt on a pin.
bool ri_gpio_interrupt_is_init(void)
Check if interrupt module is initialized.
Header to enable and disable module compilation.
Ruuvi error codes and error check function.
uint16_t ri_gpio_id_t
port<<8 + pin
ri_gpio_slope_t slope
ri_gpio_slope_t slope of event
ri_gpio_id_t pin
Pin of the event.