Go to the documentation of this file.
21 #ifndef INA3221_PARAMS_H
22 #define INA3221_PARAMS_H
32 #ifndef INA3221_PARAM_I2C
33 #define INA3221_PARAM_I2C (I2C_DEV(0))
36 #ifndef INA3221_PARAM_ADDR
37 #define INA3221_PARAM_ADDR (INA3221_ADDR_00)
40 #ifndef INA3221_PARAM_PIN_WRN
41 #define INA3221_PARAM_PIN_WRN (GPIO_UNDEF)
44 #ifndef INA3221_PARAM_PIN_CRT
45 #define INA3221_PARAM_PIN_CRT (GPIO_UNDEF)
48 #ifndef INA3221_PARAM_PIN_PV
49 #define INA3221_PARAM_PIN_PV (GPIO_UNDEF)
52 #ifndef INA3221_PARAM_PIN_TC
53 #define INA3221_PARAM_PIN_TC (GPIO_UNDEF)
56 #ifndef INA3221_PARAM_INT_PU_PIN_WRN
57 #define INA3221_PARAM_INT_PU_PIN_WRN (0)
60 #ifndef INA3221_PARAM_INT_PU_PIN_CRT
61 #define INA3221_PARAM_INT_PU_PIN_CRT (0)
64 #ifndef INA3221_PARAM_INT_PU_PIN_PV
65 #define INA3221_PARAM_INT_PU_PIN_PV (0)
68 #ifndef INA3221_PARAM_INT_PU_PIN_TC
69 #define INA3221_PARAM_INT_PU_PIN_TC (0)
72 #ifndef INA3221_PARAM_CONFIG
73 #define INA3221_PARAM_CONFIG ( \
74 INA3221_ENABLE_CH1 | \
75 INA3221_ENABLE_CH2 | \
76 INA3221_ENABLE_CH3 | \
77 INA3221_NUM_SAMPLES_4 | \
78 INA3221_CONV_TIME_BADC_4156US | \
79 INA3221_CONV_TIME_SADC_4156US | \
80 INA3221_MODE_CONTINUOUS_SHUNT_BUS \
84 #ifndef INA3221_PARAM_RSHUNT_MOHM_CH1
85 #define INA3221_PARAM_RSHUNT_MOHM_CH1 (100)
88 #ifndef INA3221_PARAM_RSHUNT_MOHM_CH2
89 #define INA3221_PARAM_RSHUNT_MOHM_CH2 (100)
92 #ifndef INA3221_PARAM_RSHUNT_MOHM_CH3
93 #define INA3221_PARAM_RSHUNT_MOHM_CH3 (100)
96 #ifndef INA3221_PARAMS
97 #define INA3221_PARAMS { \
98 .i2c = INA3221_PARAM_I2C, \
99 .addr = INA3221_PARAM_ADDR, \
101 .pin_warn = INA3221_PARAM_PIN_WRN, \
102 .pin_crit = INA3221_PARAM_PIN_CRT, \
103 .pin_tc = INA3221_PARAM_PIN_TC, \
104 .pin_pv = INA3221_PARAM_PIN_PV \
106 .gpio_config = (INA3221_PARAM_INT_PU_PIN_WRN << INA3221_ALERT_WRN) | \
107 (INA3221_PARAM_INT_PU_PIN_CRT << INA3221_ALERT_CRT) | \
108 (INA3221_PARAM_INT_PU_PIN_TC << INA3221_ALERT_TC) | \
109 (INA3221_PARAM_INT_PU_PIN_PV << INA3221_ALERT_PV), \
110 .config = INA3221_PARAM_CONFIG, \
112 INA3221_PARAM_RSHUNT_MOHM_CH1, \
113 INA3221_PARAM_RSHUNT_MOHM_CH2, \
114 INA3221_PARAM_RSHUNT_MOHM_CH3 \
119 #ifndef INA3221_SAUL_INFO
120 #define INA3221_SAUL_INFO { .name = "INA3221 bus voltage" }, \
121 { .name = "INA3221 current" }, \
122 { .name = "INA3221 power" }, \
123 { .name = "INA3221 shunt voltage sum" }
#define INA3221_PARAMS
Default device initialization parameters.
static const ina3221_params_t ina3221_params[]
INA3221 array of device configurations.
#define INA3221_SAUL_INFO
SAUL driver information.
Additional data to collect for each entry.
Device driver interface for Texas Instruments INA3221 three-channel ,high-side current and bus voltag...
SAUL registry interface definition.
INA3221 device parameters.
static const saul_reg_info_t ina3221_saul_info[]
INA3221 array of SAUL driver information.