#ifndef INA226_H
#define INA226_H

#define INA226_ADDRESS              (0x40) // INA226 的 I2C 地址

#define INA226_REG_CONFIG           (0x00)
#define INA226_REG_SHUNTVOLTAGE     (0x01)
#define INA226_REG_BUSVOLTAGE       (0x02)
#define INA226_REG_POWER            (0x03)
#define INA226_REG_CURRENT          (0x04)
#define INA226_REG_CALIBRATION      (0x05)

/*初始化ina226，包括配置 INA226和校准 INA226*/
int ina225_init();

// 读取总线电压
float ina226_readbusvoltage();

// 读取电流
float ina226_readcurrent();

#endif // INA226_H