6 #if __has_include(<esp_log.h>)
16 uint16_t
id = readRegister16(0xFF);
17 #if defined (ESP_LOGV)
18 ESP_LOGV(
"INA3221",
"regFFh:%04x",
id);
20 _init = (
id == 0x3220);
27 _shunt_res[channel] = res;
69 std::size_t INA3221_Class::readRegister16(std::uint8_t addr)
71 std::uint8_t buf[2] = {0};
73 return buf[0] << 8 | buf[1];
bool readRegister(std::uint8_t reg, std::uint8_t *result, std::size_t length) const
float getBusVoltage(uint8_t channel)
void setShuntRes(uint8_t channel, uint32_t res)
static constexpr std::uint8_t INA3221_CH_NUM_MAX
static constexpr uint8_t INA3221_CH1_BUS_V
static constexpr uint8_t INA3221_CH1_SHUNT_V
int_fast16_t getBusMilliVoltage(uint8_t channel)
float getShuntVoltage(uint8_t channel)
float getCurrent(uint8_t channel)
int32_t getShuntMilliVoltage(uint8_t channel)