ina3221_params.h File Reference

Driver configuration parameters for Texas Instruments INA3221 three-channel, high-side current and bus voltage monitor. More...

Detailed Description

Driver configuration parameters for Texas Instruments INA3221 three-channel, high-side current and bus voltage monitor.

Author
Fabian Hüßler fabia.nosp@m.n.hu.nosp@m.essle.nosp@m.r@ov.nosp@m.gu.de

Definition in file ina3221_params.h.

#include "board.h"
#include "ina3221.h"
#include "saul_reg.h"
+ Include dependency graph for ina3221_params.h:

Go to the source code of this file.

#define INA3221_PARAM_I2C   (I2C_DEV(0))
 I2C bus index.
 
#define INA3221_PARAM_ADDR   (INA3221_ADDR_00)
 I2C device address.
 
#define INA3221_PARAM_PIN_WRN   (GPIO_UNDEF)
 Warning alert pin.
 
#define INA3221_PARAM_PIN_CRT   (GPIO_UNDEF)
 Critical alert pin.
 
#define INA3221_PARAM_PIN_PV   (GPIO_UNDEF)
 Power valid alert pin.
 
#define INA3221_PARAM_PIN_TC   (GPIO_UNDEF)
 Timing control alert pin.
 
#define INA3221_PARAM_INT_PU_PIN_WRN   (0)
 Enable or disable internal pull up resistor for pin WRN.
 
#define INA3221_PARAM_INT_PU_PIN_CRT   (0)
 Enable or disable internal pull up resistor for pin CRT.
 
#define INA3221_PARAM_INT_PU_PIN_PV   (0)
 Enable or disable internal pull up resistor for pin PV.
 
#define INA3221_PARAM_INT_PU_PIN_TC   (0)
 Enable or disable internal pull up resistor for pin TC.
 
#define INA3221_PARAM_CONFIG
 Configuration register value. More...
 
#define INA3221_PARAM_RSHUNT_MOHM_CH1   (100)
 Channel 1 shunt resistance.
 
#define INA3221_PARAM_RSHUNT_MOHM_CH2   (100)
 Channel 2 shunt resistance.
 
#define INA3221_PARAM_RSHUNT_MOHM_CH3   (100)
 Channel 3 shunt resistance.
 
#define INA3221_PARAMS
 Default device initialization parameters. More...
 
#define INA3221_SAUL_INFO
 SAUL driver information. More...
 
static const ina3221_params_t ina3221_params []
 INA3221 array of device configurations. More...
 
static const saul_reg_info_t ina3221_saul_info []
 INA3221 array of SAUL driver information. More...
 

Macro Definition Documentation

◆ INA3221_PARAM_CONFIG

#define INA3221_PARAM_CONFIG
Value:
( \
INA3221_ENABLE_CH1 | \
INA3221_ENABLE_CH2 | \
INA3221_ENABLE_CH3 | \
INA3221_NUM_SAMPLES_4 | \
INA3221_CONV_TIME_BADC_4156US | \
INA3221_CONV_TIME_SADC_4156US | \
INA3221_MODE_CONTINUOUS_SHUNT_BUS \
)

Configuration register value.

Definition at line 73 of file ina3221_params.h.

◆ INA3221_PARAMS

#define INA3221_PARAMS
Value:
{ \
.addr = INA3221_PARAM_ADDR, \
.upins.pins = { \
.pin_warn = INA3221_PARAM_PIN_WRN, \
.pin_crit = INA3221_PARAM_PIN_CRT, \
.pin_tc = INA3221_PARAM_PIN_TC, \
}, \
.config = INA3221_PARAM_CONFIG, \
.rshunt_mohm = { \
INA3221_PARAM_RSHUNT_MOHM_CH1, \
INA3221_PARAM_RSHUNT_MOHM_CH2, \
INA3221_PARAM_RSHUNT_MOHM_CH3 \
} \
}
#define INA3221_PARAM_PIN_TC
Timing control alert pin.
Critical alert.
Definition: ina3221.h:121
#define INA3221_PARAM_INT_PU_PIN_PV
Enable or disable internal pull up resistor for pin PV.
#define INA3221_PARAM_INT_PU_PIN_CRT
Enable or disable internal pull up resistor for pin CRT.
#define INA3221_PARAM_INT_PU_PIN_WRN
Enable or disable internal pull up resistor for pin WRN.
Timing control.
Definition: ina3221.h:122
#define INA3221_PARAM_PIN_CRT
Critical alert pin.
#define INA3221_PARAM_PIN_WRN
Warning alert pin.
Power valid alert.
Definition: ina3221.h:123
#define INA3221_PARAM_PIN_PV
Power valid alert pin.
#define INA3221_PARAM_INT_PU_PIN_TC
Enable or disable internal pull up resistor for pin TC.
Warning alert.
Definition: ina3221.h:120
#define INA3221_PARAM_CONFIG
Configuration register value.
#define INA3221_PARAM_I2C
I2C bus index.
#define INA3221_PARAM_ADDR
I2C device address.

Default device initialization parameters.

Definition at line 97 of file ina3221_params.h.

◆ INA3221_SAUL_INFO

#define INA3221_SAUL_INFO
Value:
{ .name = "INA3221 bus voltage" }, \
{ .name = "INA3221 current" }, \
{ .name = "INA3221 power" }, \
{ .name = "INA3221 shunt voltage sum" }

SAUL driver information.

Definition at line 120 of file ina3221_params.h.

Variable Documentation

◆ ina3221_params

const ina3221_params_t ina3221_params[]
static
Initial value:
= {
}
#define INA3221_PARAMS
Default device initialization parameters.

INA3221 array of device configurations.

Definition at line 129 of file ina3221_params.h.

◆ ina3221_saul_info

const saul_reg_info_t ina3221_saul_info[]
static
Initial value:
= {
}
#define INA3221_SAUL_INFO
SAUL driver information.

INA3221 array of SAUL driver information.

Definition at line 136 of file ina3221_params.h.