|
Zephyr Project API 4.3.99
A Scalable Open Source RTOS
|
Current Sense Shunt. More...
Files | |
| file | current_sense_shunt.h |
| Header file for extended ADC API of Current Sense Shunt. | |
Data Structures | |
| struct | current_sense_shunt_dt_spec |
| Current sense shunt DT struct. More... | |
Macros | |
| #define | CURRENT_SENSE_SHUNT_DT_SPEC_GET(node_id) |
| Get current sensor information from devicetree. | |
Functions | |
| static void | current_sense_shunt_scale_dt (const struct current_sense_shunt_dt_spec *spec, int32_t *v_to_i) |
| Calculates the actual amperage from a measured voltage. | |
Current Sense Shunt.
| #define CURRENT_SENSE_SHUNT_DT_SPEC_GET | ( | node_id | ) |
#include </__w/bridle/bridle/workspace/zephyr/include/zephyr/drivers/adc/current_sense_shunt.h>
Get current sensor information from devicetree.
This returns a static initializer for a current_sense_shunt_dt_spec structure given a devicetree node.
| node_id | Devicetree node identifier. |
|
inlinestatic |
#include </__w/bridle/bridle/workspace/zephyr/include/zephyr/drivers/adc/current_sense_shunt.h>
Calculates the actual amperage from a measured voltage.
| [in] | spec | current sensor specification from Devicetree. |
| [in,out] | v_to_i | Pointer to the measured voltage in millivolts on input, and the corresponding scaled current value in milliamps on output. |