|
Zephyr API 3.6.99
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
6#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_INA237_H_
7#define ZEPHYR_INCLUDE_DT_BINDINGS_INA237_H_
12#define INA237_CFG_HIGH_PRECISION BIT(4)
13#define INA237_OPER_MODE_SHUTDOWN 0x00
14#define INA237_OPER_MODE_BUS_VOLTAGE_TRIG 0x01
15#define INA237_OPER_MODE_SHUNT_VOLTAGE_TRIG 0x02
16#define INA237_OPER_MODE_SHUNT_BUS_VOLTAGE_TRIG 0x03
17#define INA237_OPER_MODE_TEMP_TRIG 0x04
18#define INA237_OPER_MODE_TEMP_BUS_VOLTAGE_TRIG 0x05
19#define INA237_OPER_MODE_TEMP_SHUNT_VOLTAGE_TRIG 0x06
20#define INA237_OPER_MODE_BUS_SHUNT_VOLTAGE_TEMP_TRIG 0x07
21#define INA237_OPER_MODE_BUS_VOLTAGE_CONT 0x09
22#define INA237_OPER_MODE_SHUNT_VOLTAGE_CONT 0x0A
23#define INA237_OPER_MODE_SHUNT_BUS_VOLTAGE_CONT 0x0B
24#define INA237_OPER_MODE_TEMP_CONT 0x0C
25#define INA237_OPER_MODE_BUS_VOLTAGE_TEMP_CONT 0x0D
26#define INA237_OPER_MODE_TEMP_SHUNT_VOLTAGE_CONT 0x0E
27#define INA237_OPER_MODE_BUS_SHUNT_VOLTAGE_TEMP_CONT 0x0F
30#define INA237_CONV_TIME_50 0x00
31#define INA237_CONV_TIME_84 0x01
32#define INA237_CONV_TIME_150 0x02
33#define INA237_CONV_TIME_280 0x03
34#define INA237_CONV_TIME_540 0x04
35#define INA237_CONV_TIME_1052 0x05
36#define INA237_CONV_TIME_2074 0x06
37#define INA237_CONV_TIME_4120 0x07
40#define INA237_AVG_MODE_1 0x00
41#define INA237_AVG_MODE_4 0x01
42#define INA237_AVG_MODE_16 0x02
43#define INA237_AVG_MODE_64 0x03
44#define INA237_AVG_MODE_128 0x04
45#define INA237_AVG_MODE_256 0x05
46#define INA237_AVG_MODE_512 0x06
47#define INA237_AVG_MODE_1024 0x07
50#define INA237_RST_NORMAL_OPERATION 0x00
51#define INA237_RST_SYSTEM_RESET 0x01
54#define INA237_INIT_ADC_DELAY_0_S 0x00
55#define INA237_INIT_ADC_DELAY_2_MS 0x01
56#define INA237_INIT_ADC_DELAY_510_MS 0xFF
59#define INA237_ADC_RANGE_163_84 0x00
60#define INA237_ADC_RANGE_40_96 0x01
70#define INA237_CONFIG(rst_mode, \
73 (((rst_mode) << 15) | ((convdly) << 6) | ((adc_range) << 4))
84#define INA237_ADC_CONFIG(mode, \
89 (((mode) << 12) | ((vbusct) << 9) | ((vshct) << 6) | ((vtct) << 3) | (avg))