11 public spi::SPIDevice<spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_HIGH,
12 spi::CLOCK_PHASE_TRAILING, spi::DATA_RATE_200KHZ> {
14 void setup()
override;
37 uint16_t
read16_(uint8_t a_register);
38 int read32_(uint8_t addr_h, uint8_t addr_l);
void set_power_sensor(sensor::Sensor *obj)
float get_reactive_power_()
void set_gain_voltage(uint16_t gain)
float get_forward_active_energy_()
sensor::Sensor * current_sensor_
void set_pl_const(uint32_t pl_const)
sensor::Sensor * power_sensor_
sensor::Sensor * freq_sensor_
void set_reverse_active_energy_sensor(sensor::Sensor *obj)
void set_meter_constant(float val)
void set_voltage_sensor(sensor::Sensor *obj)
sensor::Sensor * reactive_power_sensor_
void set_gain_pga(uint16_t gain)
This class simplifies creating components that periodically check a state.
float get_chip_temperature_()
The SPIDevice is what components using the SPI will create.
void write16_(uint8_t a_register, uint16_t val)
float get_line_current_()
void set_n_line_gain(uint16_t gain)
float get_line_voltage_()
void set_reactive_power_sensor(sensor::Sensor *obj)
void set_gain_metering(uint16_t gain)
int read32_(uint8_t addr_h, uint8_t addr_l)
sensor::Sensor * forward_active_energy_sensor_
void dump_config() override
float get_active_power_()
float get_setup_priority() const override
uint16_t read16_(uint8_t a_register)
void set_current_sensor(sensor::Sensor *obj)
sensor::Sensor * voltage_sensor_
float get_power_factor_()
void set_forward_active_energy_sensor(sensor::Sensor *obj)
void set_line_freq(int freq)
Implementation of SPI Controller mode.
sensor::Sensor * power_factor_sensor_
float get_reverse_active_energy_()
Base-class for all sensors.
uint32_t cumulative_reverse_active_energy_
void set_power_factor_sensor(sensor::Sensor *obj)
void set_gain_ct(uint16_t gain)
uint32_t cumulative_forward_active_energy_
void set_freq_sensor(sensor::Sensor *freq_sensor)
sensor::Sensor * reverse_active_energy_sensor_