22#include "current_acs37800_defs.h"
108#ifdef MS_PLATFORM_X86
127void acs37800_set_current(
float current_amps);
133void acs37800_set_voltage(
float voltage_mV);
139void acs37800_set_power(
float power_mW);
145void acs37800_set_overcurrent_flag(
bool flag);
151void acs37800_set_overvoltage_flag(
bool flag);
157void acs37800_set_undervoltage_flag(
bool flag);
StatusCode acs37800_get_current(ACS37800Storage *storage, float *out_current_amps)
Gets the instantaneous current in Amps.
Definition: current_acs37800.c:70
StatusCode acs37800_get_voltage(ACS37800Storage *storage, float *out_voltage_mV)
Gets the instantaneous voltage in mV.
Definition: current_acs37800.c:90
StatusCode acs37800_get_undervoltage_flag(ACS37800Storage *storage, bool *undervoltage_flag)
Gets if the ACS37800 unit detects under-voltage.
Definition: current_acs37800.c:191
StatusCode acs37800_reset_overcurrent_flag(ACS37800Storage *storage)
Resets the latched overcurrent fault, needs to write 1 to 0x2D register.
Definition: current_acs37800.c:153
StatusCode acs37800_get_overvoltage_flag(ACS37800Storage *storage, bool *overvoltage_flag)
Gets if the ACS37800 unit detects over-voltage.
Definition: current_acs37800.c:168
StatusCode acs37800_get_active_power(ACS37800Storage *storage, float *out_power_mW)
Gets the instantaneous power in milliwatts.
Definition: current_acs37800.c:110
StatusCode acs37800_init(ACS37800Storage *storage, I2CPort i2c_port, I2CAddress i2c_address)
Initialize the ACS37800 driver.
Definition: current_acs37800.c:35
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:51
StatusCode acs37800_get_overcurrent_flag(ACS37800Storage *storage, bool *overcurrent_flag)
Gets if the ACS37800 unit detects over-current (latched)
Definition: current_acs37800.c:130
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
ACS37800_Registers
Voltatile Memory register addresses.
Definition: current_acs37800_defs.h:55
Definition: current_acs37800.h:30