pub fn identify(manufacturer_id: u16, die_id: u16) -> Result<DieId, SensorError>Expand description
Checks that the identification registers belong to an INA226.
A node reads both registers at start-up so a wrong part on the address, or a bus that reads all ones, is caught before its readings are trusted.
§Arguments
manufacturer_id- the manufacturer ID register (0xFE).die_id- the die ID register (0xFF).
§Returns
The decoded die ID when both registers match.
§Errors
SensorError::Identity if the manufacturer ID is not MANUFACTURER_ID or
the device field of the die ID is not DEVICE_ID.