17#include <zephyr/drivers/gpio.h>
18#include <zephyr/drivers/adc.h>
20#define OUTUT_READ_DIVIDER_HIGH 100
21#define OUTUT_READ_DIVIDER_LOW 13
30 struct gpio_dt_spec boost_en;
32 struct gpio_dt_spec boost_ctrl1;
34 struct gpio_dt_spec boost_ctrl2;
36 const struct device *ldo_dev;
38 const struct adc_dt_spec output_read;
This is a library to keep track of sensor ids and sensor power ids. As well as the configuration for ...
sensor_power_id
Sensor power identifiers.
Definition sensor_id.h:45
sensor_voltage
Voltage levels for sensor power.
Definition sensor_id.h:54
int validate_output(sensor_power_config_t *config, enum sensor_voltage voltage, uint8_t accepted_error)
Definition sensor_power.c:228
enum sensor_voltage get_sensor_output(sensor_power_config_t *config)
Get the sensor voltage that is set for an output.
Definition sensor_power.c:185
int set_sensor_output(sensor_power_config_t *config, enum sensor_voltage voltage)
Set the sensor voltage for an output, enabling/disabling the correct regulators, and setting the corr...
Definition sensor_power.c:53
float read_sensor_output(sensor_power_config_t *config)
Read the voltage output of the selected sensor power configuration. Takes into account resistor divid...
Definition sensor_power.c:215
int sensor_power_init(sensor_power_config_t *config)
Initialize a sensor_power_setup. This sets the id of the output, the gpios beings used and the regula...
Definition sensor_power.c:170
Sensor power configuration.
Definition sensor_power.h:26