|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Devicetree binding constants for the TI INA237 power monitor. More...
#include <zephyr/dt-bindings/dt-util.h>Go to the source code of this file.
Macros | |
| #define | INA237_CONFIG(rst_mode, convdly, adc_range) |
| Build the INA237 configuration register value. | |
| #define | INA237_ADC_CONFIG(mode, vshct, vbusct, vtct, avg) |
| Build the INA237 ADC configuration register value. | |
Operating mode | |
Operating-mode argument for the INA237_ADC_CONFIG() macro. | |
| #define | INA237_CFG_HIGH_PRECISION BIT(4) |
| High-precision mode flag. | |
| #define | INA237_OPER_MODE_SHUTDOWN 0x00 |
| Shutdown. | |
| #define | INA237_OPER_MODE_BUS_VOLTAGE_TRIG 0x01 |
| Bus voltage, triggered. | |
| #define | INA237_OPER_MODE_SHUNT_VOLTAGE_TRIG 0x02 |
| Shunt voltage, triggered. | |
| #define | INA237_OPER_MODE_SHUNT_BUS_VOLTAGE_TRIG 0x03 |
| Shunt and bus, triggered. | |
| #define | INA237_OPER_MODE_TEMP_TRIG 0x04 |
| Temperature, triggered. | |
| #define | INA237_OPER_MODE_TEMP_BUS_VOLTAGE_TRIG 0x05 |
| Temp and bus, triggered. | |
| #define | INA237_OPER_MODE_TEMP_SHUNT_VOLTAGE_TRIG 0x06 |
| Temp and shunt, triggered. | |
| #define | INA237_OPER_MODE_BUS_SHUNT_VOLTAGE_TEMP_TRIG 0x07 |
| Bus, shunt and temp, triggered. | |
| #define | INA237_OPER_MODE_BUS_VOLTAGE_CONT 0x09 |
| Bus voltage, continuous. | |
| #define | INA237_OPER_MODE_SHUNT_VOLTAGE_CONT 0x0A |
| Shunt voltage, continuous. | |
| #define | INA237_OPER_MODE_SHUNT_BUS_VOLTAGE_CONT 0x0B |
| Shunt and bus, continuous. | |
| #define | INA237_OPER_MODE_TEMP_CONT 0x0C |
| Temperature, continuous. | |
| #define | INA237_OPER_MODE_BUS_VOLTAGE_TEMP_CONT 0x0D |
| Bus and temp, continuous. | |
| #define | INA237_OPER_MODE_TEMP_SHUNT_VOLTAGE_CONT 0x0E |
| Temp and shunt, continuous. | |
| #define | INA237_OPER_MODE_BUS_SHUNT_VOLTAGE_TEMP_CONT 0x0F |
| Bus, shunt and temp, continuous. | |
Bus, shunt and temperature conversion time | |
Conversion-time argument for the INA237_ADC_CONFIG() macro. | |
| #define | INA237_CONV_TIME_50 0x00 |
| 50 µs | |
| #define | INA237_CONV_TIME_84 0x01 |
| 84 µs | |
| #define | INA237_CONV_TIME_150 0x02 |
| 150 µs | |
| #define | INA237_CONV_TIME_280 0x03 |
| 280 µs | |
| #define | INA237_CONV_TIME_540 0x04 |
| 540 µs | |
| #define | INA237_CONV_TIME_1052 0x05 |
| 1052 µs | |
| #define | INA237_CONV_TIME_2074 0x06 |
| 2074 µs | |
| #define | INA237_CONV_TIME_4120 0x07 |
| 4120 µs | |
Averaging mode (number of samples) | |
Averaging-mode argument for the INA237_ADC_CONFIG() macro. | |
| #define | INA237_AVG_MODE_1 0x00 |
| 1 sample | |
| #define | INA237_AVG_MODE_4 0x01 |
| 4 samples | |
| #define | INA237_AVG_MODE_16 0x02 |
| 16 samples | |
| #define | INA237_AVG_MODE_64 0x03 |
| 64 samples | |
| #define | INA237_AVG_MODE_128 0x04 |
| 128 samples | |
| #define | INA237_AVG_MODE_256 0x05 |
| 256 samples | |
| #define | INA237_AVG_MODE_512 0x06 |
| 512 samples | |
| #define | INA237_AVG_MODE_1024 0x07 |
| 1024 samples | |
Reset mode | |
Reset-mode argument for the INA237_CONFIG() macro. | |
| #define | INA237_RST_NORMAL_OPERATION 0x00 |
| Normal operation. | |
| #define | INA237_RST_SYSTEM_RESET 0x01 |
| Trigger a system reset. | |
Initial ADC conversion delay (steps of 2 ms) | |
Initial ADC-delay argument for the INA237_CONFIG() macro. | |
| #define | INA237_INIT_ADC_DELAY_0_S 0x00 |
| 0 s (no delay) | |
| #define | INA237_INIT_ADC_DELAY_2_MS 0x01 |
| 2 ms | |
| #define | INA237_INIT_ADC_DELAY_510_MS 0xFF |
| 510 ms | |
Shunt full-scale range across IN+ and IN− | |
Shunt full-scale range argument for the INA237_CONFIG() macro. | |
| #define | INA237_ADC_RANGE_163_84 0x00 |
| ±163.84 mV | |
| #define | INA237_ADC_RANGE_40_96 0x01 |
| ±40.96 mV | |
Devicetree binding constants for the TI INA237 power monitor.