22#include "current_acs37800_defs.h"
StatusCode acs37800_get_current(ACS37800Storage *storage, float *out_current_amps)
Gets the instantaneous current in amps.
Definition: current_acs37800.c:50
StatusCode acs37800_get_voltage(ACS37800Storage *storage, float *out_voltage_mV)
Gets the instantaneous voltage in volts.
Definition: current_acs37800.c:70
StatusCode acs37800_get_undervoltage_flag(ACS37800Storage *storage, bool *undervoltage_flag)
Gets if the ACS37800 unit detects under-voltage.
Definition: current_acs37800.c:180
StatusCode acs37800_reset_overcurrent_flag(ACS37800Storage *storage)
Resets the latched overcurrent fault, needs to write 1 to 0x2D register.
Definition: current_acs37800.c:133
StatusCode acs37800_get_overvoltage_flag(ACS37800Storage *storage, bool *overvoltage_flag)
Gets if the ACS37800 unit detects over-voltage.
Definition: current_acs37800.c:157
StatusCode acs37800_get_active_power(ACS37800Storage *storage, float *out_power_mW)
Gets the instantaneous power in milliwatts.
Definition: current_acs37800.c:90
StatusCode acs37800_init(ACS37800Storage *storage, I2CPort i2c_port, I2CAddress i2c_address)
Initialize the ACS37800 driver.
Definition: current_acs37800.c:20
StatusCode acs37800_get_register(ACS37800Storage *storage, ACS37800_Registers reg, uint32_t *out_raw)
Gets the 16 bit value from the ACS37800 volatile register.
Definition: current_acs37800.c:31
StatusCode acs37800_get_overcurrent_flag(ACS37800Storage *storage, bool *overcurrent_flag)
Gets if the ACS37800 unit detects over-current (latched)
Definition: current_acs37800.c:110
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