INA2xx

Committer:
jotaemesousa
Date:
Tue Oct 11 21:09:04 2022 +0000
Revision:
0:726b368625a9
last;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jotaemesousa 0:726b368625a9 1 /*
jotaemesousa 0:726b368625a9 2 * ina2xx.h
jotaemesousa 0:726b368625a9 3 *
jotaemesousa 0:726b368625a9 4 * Created on: 26 de Set de 2015
jotaemesousa 0:726b368625a9 5 * Author: João Sousa
jotaemesousa 0:726b368625a9 6 */
jotaemesousa 0:726b368625a9 7
jotaemesousa 0:726b368625a9 8 #ifndef INA2XX_H_
jotaemesousa 0:726b368625a9 9 #define INA2XX_H_
jotaemesousa 0:726b368625a9 10
jotaemesousa 0:726b368625a9 11 #include "mbed.h"
jotaemesousa 0:726b368625a9 12
jotaemesousa 0:726b368625a9 13
jotaemesousa 0:726b368625a9 14 #define INA226_ADDR 0x8A
jotaemesousa 0:726b368625a9 15
jotaemesousa 0:726b368625a9 16 void init_i2c();
jotaemesousa 0:726b368625a9 17 bool ina226_get(I2C *i2c, uint8_t ina_addr, uint16_t *value);
jotaemesousa 0:726b368625a9 18 bool ina226_set(I2C *i2c, uint8_t ina_addr, uint16_t value);
jotaemesousa 0:726b368625a9 19 float ina226GetVoltage(I2C *i2c, bool *ret_op);
jotaemesousa 0:726b368625a9 20 float ina226GetShuntVoltage(I2C *i2c, bool *ret_op);
jotaemesousa 0:726b368625a9 21 float ina226GetCurrent(I2C *i2c, bool *ret_op);
jotaemesousa 0:726b368625a9 22
jotaemesousa 0:726b368625a9 23
jotaemesousa 0:726b368625a9 24 #endif /* INA2XX_H_ */