ESPHome  2022.6.2
max31855.h
Go to the documentation of this file.
1 #pragma once
2 
6 
7 namespace esphome {
8 namespace max31855 {
9 
11  public PollingComponent,
12  public spi::SPIDevice<spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_HIGH,
13  spi::CLOCK_PHASE_TRAILING, spi::DATA_RATE_4MHZ> {
14  public:
15  void set_reference_sensor(sensor::Sensor *temperature_sensor) { temperature_reference_ = temperature_sensor; }
16 
17  void setup() override;
18  void dump_config() override;
19  float get_setup_priority() const override;
20 
21  void update() override;
22 
23  protected:
24  void read_data_();
26 };
27 
28 } // namespace max31855
29 } // namespace esphome
float get_setup_priority() const override
Definition: max31855.cpp:36
This class simplifies creating components that periodically check a state.
Definition: component.h:266
sensor::Sensor * temperature_reference_
Definition: max31855.h:25
Definition: a4988.cpp:4
Base-class for all sensors.
Definition: sensor.h:47
void set_reference_sensor(sensor::Sensor *temperature_sensor)
Definition: max31855.h:15