ruuvi.drivers.c
${PROJECT_VERSION}
Drivers for external sensors and peripherals on embedded systems.
|
#include "ruuvi_driver_enabled_modules.h"
#include "ruuvi_interface_gpio.h"
#include "ruuvi_driver_error.h"
#include "nrf_gpio.h"
#include "nrf_drv_gpiote.h"
#include <stdbool.h>
Go to the source code of this file.
Functions | |
rd_status_t | ri_gpio_init (void) |
Initializes GPIO module. Call this before other GPIO functions. After initialization all GPIO pins shall be in High-Z mode. More... | |
rd_status_t | ri_gpio_uninit (void) |
Uninitializes GPIO module. Call this to reset GPIO to High-Z mode. After uninitialization all GPIO pins shall be in High-Z mode. Uninitialization can be called at any time, but behaviour is not defined if some other peripheral (i.e. SPI) is using GPIO pins. More... | |
bool | ri_gpio_is_init (void) |
return true if GPIO is init, false otherwise. More... | |
rd_status_t | ri_gpio_configure (const ri_gpio_id_t pin, const ri_gpio_mode_t mode) |
Configure a pin of a port into a mode. If there are several ports the platform driver must implement a conversion function from port + pin to uint8_t. More... | |
rd_status_t | ri_gpio_toggle (const ri_gpio_id_t pin) |
Toggle the state of a pin of a port. If there are several ports the platform driver must implement a conversion function from port + pin to uint8_t. More... | |
rd_status_t | ri_gpio_write (const ri_gpio_id_t pin, const ri_gpio_state_t state) |
Write a pin of a port into given state If there are several ports the platform driver must implement a conversion function from port + pin to uint8_t. More... | |
rd_status_t | ri_gpio_read (const ri_gpio_id_t pin, ri_gpio_state_t *const state) |
Read state of a pin of a port into bool high If there are several ports the platform driver must implement a conversion function from port + pin to uint8_t. More... | |
Implementations for basic GPIO writes and reads on nRF5 SDK15.
Definition in file ruuvi_nrf5_sdk15_gpio.c.