Zephyr API 3.6.99
Loading...
Searching...
No Matches
ina230.h File Reference

Go to the source code of this file.

Macros

#define INA230_SHUNT_VOLTAGE_OVER   BIT(15)
 
#define INA230_SHUNT_VOLTAGE_UNDER   BIT(14)
 
#define INA230_BUS_VOLTAGE_OVER   BIT(13)
 
#define INA230_BUS_VOLTAGE_UNDER   BIT(12)
 
#define INA230_OVER_LIMIT_POWER   BIT(11)
 
#define INA230_CONVERSION_READY   BIT(10)
 
#define INA230_ALERT_FUNCTION_FLAG   BIT(4)
 
#define INA230_CONVERSION_READY_FLAG   BIT(3)
 
#define INA230_MATH_OVERFLOW_FLAG   BIT(2)
 
#define INA230_ALERT_POLARITY   BIT(1)
 
#define INA230_ALERT_LATCH_ENABLE   BIT(0)
 
#define INA230_OPER_MODE_POWER_DOWN   0x00
 
#define INA230_OPER_MODE_SHUNT_VOLTAGE_TRIG   0x01
 
#define INA230_OPER_MODE_BUS_VOLTAGE_TRIG   0x02
 
#define INA230_OPER_MODE_SHUNT_BUS_VOLTAGE_TRIG   0x03
 
#define INA230_OPER_MODE_SHUNT_VOLTAGE_CONT   0x05
 
#define INA230_OPER_MODE_BUS_VOLTAGE_CONT   0x06
 
#define INA230_OPER_MODE_SHUNT_BUS_VOLTAGE_CONT   0x07
 
#define INA230_CONV_TIME_140   0x00
 
#define INA230_CONV_TIME_204   0x01
 
#define INA230_CONV_TIME_332   0x02
 
#define INA230_CONV_TIME_588   0x03
 
#define INA230_CONV_TIME_1100   0x04
 
#define INA230_CONV_TIME_2116   0x05
 
#define INA230_CONV_TIME_4156   0x06
 
#define INA230_CONV_TIME_8244   0x07
 
#define INA230_AVG_MODE_1   0x00
 
#define INA230_AVG_MODE_4   0x01
 
#define INA230_AVG_MODE_16   0x02
 
#define INA230_AVG_MODE_64   0x03
 
#define INA230_AVG_MODE_128   0x04
 
#define INA230_AVG_MODE_256   0x05
 
#define INA230_AVG_MODE_512   0x06
 
#define INA230_AVG_MODE_1024   0x07
 
#define INA230_CONFIG(mode, svct, bvct, avg)
 Macro for creating the INA230 configuration value.
 

Macro Definition Documentation

◆ INA230_ALERT_FUNCTION_FLAG

#define INA230_ALERT_FUNCTION_FLAG   BIT(4)

◆ INA230_ALERT_LATCH_ENABLE

#define INA230_ALERT_LATCH_ENABLE   BIT(0)

◆ INA230_ALERT_POLARITY

#define INA230_ALERT_POLARITY   BIT(1)

◆ INA230_AVG_MODE_1

#define INA230_AVG_MODE_1   0x00

◆ INA230_AVG_MODE_1024

#define INA230_AVG_MODE_1024   0x07

◆ INA230_AVG_MODE_128

#define INA230_AVG_MODE_128   0x04

◆ INA230_AVG_MODE_16

#define INA230_AVG_MODE_16   0x02

◆ INA230_AVG_MODE_256

#define INA230_AVG_MODE_256   0x05

◆ INA230_AVG_MODE_4

#define INA230_AVG_MODE_4   0x01

◆ INA230_AVG_MODE_512

#define INA230_AVG_MODE_512   0x06

◆ INA230_AVG_MODE_64

#define INA230_AVG_MODE_64   0x03

◆ INA230_BUS_VOLTAGE_OVER

#define INA230_BUS_VOLTAGE_OVER   BIT(13)

◆ INA230_BUS_VOLTAGE_UNDER

#define INA230_BUS_VOLTAGE_UNDER   BIT(12)

◆ INA230_CONFIG

#define INA230_CONFIG ( mode,
svct,
bvct,
avg )
Value:
(((avg) << 9) | ((bvct) << 6) | ((svct) << 3) | (mode))

Macro for creating the INA230 configuration value.

Parameters
modeOperating mode.
svctConversion time for shunt voltage.
bvctConversion time for bus voltage.
avgAveraging mode.

◆ INA230_CONV_TIME_1100

#define INA230_CONV_TIME_1100   0x04

◆ INA230_CONV_TIME_140

#define INA230_CONV_TIME_140   0x00

◆ INA230_CONV_TIME_204

#define INA230_CONV_TIME_204   0x01

◆ INA230_CONV_TIME_2116

#define INA230_CONV_TIME_2116   0x05

◆ INA230_CONV_TIME_332

#define INA230_CONV_TIME_332   0x02

◆ INA230_CONV_TIME_4156

#define INA230_CONV_TIME_4156   0x06

◆ INA230_CONV_TIME_588

#define INA230_CONV_TIME_588   0x03

◆ INA230_CONV_TIME_8244

#define INA230_CONV_TIME_8244   0x07

◆ INA230_CONVERSION_READY

#define INA230_CONVERSION_READY   BIT(10)

◆ INA230_CONVERSION_READY_FLAG

#define INA230_CONVERSION_READY_FLAG   BIT(3)

◆ INA230_MATH_OVERFLOW_FLAG

#define INA230_MATH_OVERFLOW_FLAG   BIT(2)

◆ INA230_OPER_MODE_BUS_VOLTAGE_CONT

#define INA230_OPER_MODE_BUS_VOLTAGE_CONT   0x06

◆ INA230_OPER_MODE_BUS_VOLTAGE_TRIG

#define INA230_OPER_MODE_BUS_VOLTAGE_TRIG   0x02

◆ INA230_OPER_MODE_POWER_DOWN

#define INA230_OPER_MODE_POWER_DOWN   0x00

◆ INA230_OPER_MODE_SHUNT_BUS_VOLTAGE_CONT

#define INA230_OPER_MODE_SHUNT_BUS_VOLTAGE_CONT   0x07

◆ INA230_OPER_MODE_SHUNT_BUS_VOLTAGE_TRIG

#define INA230_OPER_MODE_SHUNT_BUS_VOLTAGE_TRIG   0x03

◆ INA230_OPER_MODE_SHUNT_VOLTAGE_CONT

#define INA230_OPER_MODE_SHUNT_VOLTAGE_CONT   0x05

◆ INA230_OPER_MODE_SHUNT_VOLTAGE_TRIG

#define INA230_OPER_MODE_SHUNT_VOLTAGE_TRIG   0x01

◆ INA230_OVER_LIMIT_POWER

#define INA230_OVER_LIMIT_POWER   BIT(11)

◆ INA230_SHUNT_VOLTAGE_OVER

#define INA230_SHUNT_VOLTAGE_OVER   BIT(15)

◆ INA230_SHUNT_VOLTAGE_UNDER

#define INA230_SHUNT_VOLTAGE_UNDER   BIT(14)