Zanduino/INA

Incorrect bit mask for INA226_CONFIG_SADC_MASK

Closed this issue · 1 comments

The INA226 shunt voltage conversion time is specified in bits 3-5 of the config register (from datasheet) but INA.h has the mask as bits 3-4.

The bitmask should be:
const uint16_t INA226_CONFIG_SADC_MASK = 0x0028; ///< INA226 Bits 3-5

A related thing: I don't think it makes any difference as the config register MSB (reset bit) is always 0 in normal operation, but configRegister probably should be unsigned.

Luckily only that one slipped through, the other INA-Devices have a correct value for this mask.