|
Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
|
Voltage Divider. More...
Files | |
| file | voltage_divider.h |
| Header file for extended API of Voltage Divider. | |
Data Structures | |
| struct | voltage_divider_dt_spec |
| Voltage divider DT struct. More... | |
Macros | |
| #define | VOLTAGE_DIVIDER_DT_SPEC_GET(node_id) |
| Get voltage divider information from devicetree. | |
Functions | |
| static int | voltage_divider_scale_dt (const struct voltage_divider_dt_spec *spec, int32_t *v_to_v) |
| Calculates the actual voltage from a measured voltage. | |
Voltage Divider.
| #define VOLTAGE_DIVIDER_DT_SPEC_GET | ( | node_id | ) |
#include <zephyr/drivers/adc/voltage_divider.h>
Get voltage divider information from devicetree.
This returns a static initializer for a voltage_divider_dt_spec structure given a devicetree node.
| node_id | Devicetree node identifier. |
|
inlinestatic |
#include <zephyr/drivers/adc/voltage_divider.h>
Calculates the actual voltage from a measured voltage.
| [in] | spec | voltage divider specification from Devicetree. |
| [in,out] | v_to_v | Pointer to the measured voltage on input, and the corresponding scaled voltage value on output. |
| 0 | on success |
| -ENOTSUP | if "full_ohms" is not specified |