57 public spi::SPIDevice<spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_LOW,
58 spi::CLOCK_PHASE_LEADING, spi::DATA_RATE_1MHZ> {
63 void set_gains(
float current_gain,
float voltage_gain) {
78 void setup()
override;
118 void play(Ts...
x)
override { cs5460a_->restart(); }
const float DATA
For components that import data from directly connected sensors like DHT.
void set_phase_offset(int8_t phase_offset)
CS5460ARestartAction(CS5460AComponent *cs5460a)
void set_hpf_enable(bool current_hpf, bool voltage_hpf)
void set_pulse_energy_wh(float pulse_energy_wh)
uint32_t prev_raw_current_
CS5460APGAGain
Enum listing the current channel aplifiergain settings for the CS5460A.
void set_power_sensor(sensor::Sensor *power_sensor)
void dump_config() override
float get_setup_priority() const override
The SPIDevice is what components using the SPI will create.
uint32_t read_register_(uint8_t addr)
uint32_t prev_raw_energy_
void write_register_(enum CS5460ARegister addr, uint32_t value)
void set_voltage_sensor(sensor::Sensor *voltage_sensor)
float current_multiplier_
float voltage_multiplier_
void set_current_sensor(sensor::Sensor *current_sensor)
sensor::Sensor * voltage_sensor_
sensor::Sensor * current_sensor_
sensor::Sensor * power_sensor_
void set_gains(float current_gain, float voltage_gain)
Implementation of SPI Controller mode.
void set_pga_gain(CS5460APGAGain pga_gain)
void schedule_next_check_()
void set_samples(uint32_t samples)
Base-class for all sensors.
void play(Ts... x) override
CS5460AComponent * cs5460a_