ruuvi.drivers.c
${PROJECT_VERSION}
Drivers for external sensors and peripherals on embedded systems.
|
#include "ruuvi_driver_enabled_modules.h"
#include "ruuvi_driver_error.h"
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | ri_power_regulators_t |
Enable implementation selected by application. More... | |
Functions | |
rd_status_t | ri_power_regulators_enable (const ri_power_regulators_t regulators) |
Enable given regulators. More... | |
void | ri_power_reset (void) |
Reset IC. More... | |
void | ri_power_enter_bootloader (void) |
Enter bootloader. More... | |
Interface for controlling CPU-integrated regulators and system power modes.
Definition in file ruuvi_interface_power.h.
void ri_power_enter_bootloader | ( | void | ) |
Enter bootloader.
This function attempts to enter bootloader. It's main purpose is to provide a wireless recovery mechanism on fatal error.
rd_status_t ri_power_regulators_enable | ( | const ri_power_regulators_t | regulators | ) |
Enable given regulators.
The implementation must work regardless of software radio state, i.e. on S132 on nRF52 the function must check if softdevice is running and call softdevice wrapper to DC/DC if it is and write registers directly if SD is not running.
[in] | regulators | binary flags of regulators to enable. |
void ri_power_reset | ( | void | ) |
Reset IC.
This function attempts to reset and restart the program as closely as possible to a power cycle.