|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Texas Instruments INA230 current and power monitor. More...
Files | |
| file | ina230.h |
| Devicetree binding constants for the TI INA230 power monitor. | |
Macros | |
| #define | INA230_CONFIG(mode, svct, bvct, avg) |
| Build the INA230 configuration register value. | |
Mask/enable bits that assert the ALERT pin | |
Mask/enable flags that assert the ALERT pin. | |
| #define | INA230_SHUNT_VOLTAGE_OVER BIT(15) |
| Shunt voltage over-limit. | |
| #define | INA230_SHUNT_VOLTAGE_UNDER BIT(14) |
| Shunt voltage under-limit. | |
| #define | INA230_BUS_VOLTAGE_OVER BIT(13) |
| Bus voltage over-limit. | |
| #define | INA230_BUS_VOLTAGE_UNDER BIT(12) |
| Bus voltage under-limit. | |
| #define | INA230_OVER_LIMIT_POWER BIT(11) |
| Power over-limit. | |
| #define | INA230_CONVERSION_READY BIT(10) |
| Conversion-ready enable. | |
| #define | INA230_ALERT_FUNCTION_FLAG BIT(4) |
| Alert function flag. | |
| #define | INA230_CONVERSION_READY_FLAG BIT(3) |
| Conversion-ready flag. | |
| #define | INA230_MATH_OVERFLOW_FLAG BIT(2) |
| Math overflow flag. | |
| #define | INA230_ALERT_POLARITY BIT(1) |
| Alert pin polarity. | |
| #define | INA230_ALERT_LATCH_ENABLE BIT(0) |
| Alert latch enable. | |
Operating mode | |
Operating-mode argument for the INA230_CONFIG() macro. | |
| #define | INA230_OPER_MODE_POWER_DOWN 0x00 |
| Power-down. | |
| #define | INA230_OPER_MODE_SHUNT_VOLTAGE_TRIG 0x01 |
| Shunt voltage, triggered. | |
| #define | INA230_OPER_MODE_BUS_VOLTAGE_TRIG 0x02 |
| Bus voltage, triggered. | |
| #define | INA230_OPER_MODE_SHUNT_BUS_VOLTAGE_TRIG 0x03 |
| Shunt and bus, triggered. | |
| #define | INA230_OPER_MODE_SHUNT_VOLTAGE_CONT 0x05 |
| Shunt voltage, continuous. | |
| #define | INA230_OPER_MODE_BUS_VOLTAGE_CONT 0x06 |
| Bus voltage, continuous. | |
| #define | INA230_OPER_MODE_SHUNT_BUS_VOLTAGE_CONT 0x07 |
| Shunt and bus, continuous. | |
Bus and shunt voltage conversion time | |
Conversion-time argument for the INA230_CONFIG() macro. | |
| #define | INA230_CONV_TIME_140 0x00 |
| 140 µs | |
| #define | INA230_CONV_TIME_204 0x01 |
| 204 µs | |
| #define | INA230_CONV_TIME_332 0x02 |
| 332 µs | |
| #define | INA230_CONV_TIME_588 0x03 |
| 588 µs | |
| #define | INA230_CONV_TIME_1100 0x04 |
| 1100 µs | |
| #define | INA230_CONV_TIME_2116 0x05 |
| 2116 µs | |
| #define | INA230_CONV_TIME_4156 0x06 |
| 4156 µs | |
| #define | INA230_CONV_TIME_8244 0x07 |
| 8244 µs | |
Averaging mode (number of samples) | |
Averaging-mode argument for the INA230_CONFIG() macro. | |
| #define | INA230_AVG_MODE_1 0x00 |
| 1 sample | |
| #define | INA230_AVG_MODE_4 0x01 |
| 4 samples | |
| #define | INA230_AVG_MODE_16 0x02 |
| 16 samples | |
| #define | INA230_AVG_MODE_64 0x03 |
| 64 samples | |
| #define | INA230_AVG_MODE_128 0x04 |
| 128 samples | |
| #define | INA230_AVG_MODE_256 0x05 |
| 256 samples | |
| #define | INA230_AVG_MODE_512 0x06 |
| 512 samples | |
| #define | INA230_AVG_MODE_1024 0x07 |
| 1024 samples | |
Texas Instruments INA230 current and power monitor.
| #define INA230_ALERT_FUNCTION_FLAG BIT(4) |
#include <zephyr/dt-bindings/sensor/ina230.h>
Alert function flag.
| #define INA230_ALERT_LATCH_ENABLE BIT(0) |
#include <zephyr/dt-bindings/sensor/ina230.h>
Alert latch enable.
| #define INA230_ALERT_POLARITY BIT(1) |
#include <zephyr/dt-bindings/sensor/ina230.h>
Alert pin polarity.
| #define INA230_AVG_MODE_1 0x00 |
#include <zephyr/dt-bindings/sensor/ina230.h>
1 sample
| #define INA230_AVG_MODE_1024 0x07 |
#include <zephyr/dt-bindings/sensor/ina230.h>
1024 samples
| #define INA230_AVG_MODE_128 0x04 |
#include <zephyr/dt-bindings/sensor/ina230.h>
128 samples
| #define INA230_AVG_MODE_16 0x02 |
#include <zephyr/dt-bindings/sensor/ina230.h>
16 samples
| #define INA230_AVG_MODE_256 0x05 |
#include <zephyr/dt-bindings/sensor/ina230.h>
256 samples
| #define INA230_AVG_MODE_4 0x01 |
#include <zephyr/dt-bindings/sensor/ina230.h>
4 samples
| #define INA230_AVG_MODE_512 0x06 |
#include <zephyr/dt-bindings/sensor/ina230.h>
512 samples
| #define INA230_AVG_MODE_64 0x03 |
#include <zephyr/dt-bindings/sensor/ina230.h>
64 samples
| #define INA230_BUS_VOLTAGE_OVER BIT(13) |
#include <zephyr/dt-bindings/sensor/ina230.h>
Bus voltage over-limit.
| #define INA230_BUS_VOLTAGE_UNDER BIT(12) |
#include <zephyr/dt-bindings/sensor/ina230.h>
Bus voltage under-limit.
| #define INA230_CONFIG | ( | mode, | |
| svct, | |||
| bvct, | |||
| avg ) |
#include <zephyr/dt-bindings/sensor/ina230.h>
Build the INA230 configuration register value.
| mode | Operating mode (see ina230_oper_mode). |
| svct | Shunt voltage conversion time (see ina230_conv_time). |
| bvct | Bus voltage conversion time (see ina230_conv_time). |
| avg | Averaging mode (see ina230_avg). |
| #define INA230_CONV_TIME_1100 0x04 |
#include <zephyr/dt-bindings/sensor/ina230.h>
1100 µs
| #define INA230_CONV_TIME_140 0x00 |
#include <zephyr/dt-bindings/sensor/ina230.h>
140 µs
| #define INA230_CONV_TIME_204 0x01 |
#include <zephyr/dt-bindings/sensor/ina230.h>
204 µs
| #define INA230_CONV_TIME_2116 0x05 |
#include <zephyr/dt-bindings/sensor/ina230.h>
2116 µs
| #define INA230_CONV_TIME_332 0x02 |
#include <zephyr/dt-bindings/sensor/ina230.h>
332 µs
| #define INA230_CONV_TIME_4156 0x06 |
#include <zephyr/dt-bindings/sensor/ina230.h>
4156 µs
| #define INA230_CONV_TIME_588 0x03 |
#include <zephyr/dt-bindings/sensor/ina230.h>
588 µs
| #define INA230_CONV_TIME_8244 0x07 |
#include <zephyr/dt-bindings/sensor/ina230.h>
8244 µs
| #define INA230_CONVERSION_READY BIT(10) |
#include <zephyr/dt-bindings/sensor/ina230.h>
Conversion-ready enable.
| #define INA230_CONVERSION_READY_FLAG BIT(3) |
#include <zephyr/dt-bindings/sensor/ina230.h>
Conversion-ready flag.
| #define INA230_MATH_OVERFLOW_FLAG BIT(2) |
#include <zephyr/dt-bindings/sensor/ina230.h>
Math overflow flag.
| #define INA230_OPER_MODE_BUS_VOLTAGE_CONT 0x06 |
#include <zephyr/dt-bindings/sensor/ina230.h>
Bus voltage, continuous.
| #define INA230_OPER_MODE_BUS_VOLTAGE_TRIG 0x02 |
#include <zephyr/dt-bindings/sensor/ina230.h>
Bus voltage, triggered.
| #define INA230_OPER_MODE_POWER_DOWN 0x00 |
#include <zephyr/dt-bindings/sensor/ina230.h>
Power-down.
| #define INA230_OPER_MODE_SHUNT_BUS_VOLTAGE_CONT 0x07 |
#include <zephyr/dt-bindings/sensor/ina230.h>
Shunt and bus, continuous.
| #define INA230_OPER_MODE_SHUNT_BUS_VOLTAGE_TRIG 0x03 |
#include <zephyr/dt-bindings/sensor/ina230.h>
Shunt and bus, triggered.
| #define INA230_OPER_MODE_SHUNT_VOLTAGE_CONT 0x05 |
#include <zephyr/dt-bindings/sensor/ina230.h>
Shunt voltage, continuous.
| #define INA230_OPER_MODE_SHUNT_VOLTAGE_TRIG 0x01 |
#include <zephyr/dt-bindings/sensor/ina230.h>
Shunt voltage, triggered.
| #define INA230_OVER_LIMIT_POWER BIT(11) |
#include <zephyr/dt-bindings/sensor/ina230.h>
Power over-limit.
| #define INA230_SHUNT_VOLTAGE_OVER BIT(15) |
#include <zephyr/dt-bindings/sensor/ina230.h>
Shunt voltage over-limit.
| #define INA230_SHUNT_VOLTAGE_UNDER BIT(14) |
#include <zephyr/dt-bindings/sensor/ina230.h>
Shunt voltage under-limit.