22#include "current_acs37800_defs.h"
35 float current_per_amp;
36 float voltage_per_volt;
StatusCode acs37800_get_undervoltage_flag(ACS37800_Storage *storage, bool *undervoltage_flag)
Gets if the ACS37800 unit detects under-voltage.
Definition: current_acs37800.c:184
StatusCode acs37800_get_voltage(ACS37800_Storage *storage, float *out_voltage_mV)
Gets the instantaneous voltage in volts.
Definition: current_acs37800.c:74
StatusCode acs37800_get_overcurrent_flag(ACS37800_Storage *storage, bool *overcurrent_flag)
Gets if the ACS37800 unit detects over-current (latched)
Definition: current_acs37800.c:114
StatusCode acs37800_get_current(ACS37800_Storage *storage, float *out_current_amps)
Gets the instantaneous current in amps.
Definition: current_acs37800.c:54
StatusCode acs37800_get_overvoltage_flag(ACS37800_Storage *storage, bool *overvoltage_flag)
Gets if the ACS37800 unit detects over-voltage.
Definition: current_acs37800.c:161
StatusCode acs37800_get_register(ACS37800_Storage *storage, ACS37800_Registers reg, uint32_t *out_raw)
Gets the 16 bit value from the ACS37800 volatile register.
Definition: current_acs37800.c:35
StatusCode acs37800_reset_overcurrent_flag(ACS37800_Storage *storage)
Resets the latched overcurrent fault, needs to write 1 to 0x2D register.
Definition: current_acs37800.c:137
StatusCode acs37800_get_active_power(ACS37800_Storage *storage, float *out_power_mW)
Gets the instantaneous power in milliwatts.
Definition: current_acs37800.c:94
StatusCode acs37800_init(ACS37800_Storage *storage, I2CPort *i2c_port, I2CAddress *i2c_address)
Initialize the ACS37800 driver.
Definition: current_acs37800.c:18
uint8_t I2CAddress
I2C address type.
Definition: i2c.h:34
I2CPort
I2C Port selection.
Definition: i2c.h:37
StatusCode
StatusCodes for various errors.
Definition: status.h:27
Definition: current_acs37800.h:30