22 lines
295 B
C
22 lines
295 B
C
#include "coulomb.h"
|
|
#include "i2c.h"
|
|
|
|
bool is_coulomb_ready()
|
|
{
|
|
HAL_I2C_IsDeviceReady(hi2c1,COULOMB_ADDR);
|
|
}
|
|
coulomb_write_reg()
|
|
{
|
|
HAL_I2C_IsDeviceReady(COULOMB_ADDR);
|
|
}
|
|
coulomb_read_reg()
|
|
{
|
|
|
|
}
|
|
|
|
|
|
bool coulomb_read_alcc()
|
|
{
|
|
return HAL_GPIO_ReadPin(COULOMB_ALCC_GPIO_Port,COULOMB_ALCC_Pin);
|
|
}
|