ESPHome  2024.4.0
max31855.h
Go to the documentation of this file.
1 #pragma once
2 
6 
7 #include <cinttypes>
8 
9 namespace esphome {
10 namespace max31855 {
11 
13  public PollingComponent,
14  public spi::SPIDevice<spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_HIGH,
15  spi::CLOCK_PHASE_TRAILING, spi::DATA_RATE_4MHZ> {
16  public:
17  void set_reference_sensor(sensor::Sensor *temperature_sensor) { temperature_reference_ = temperature_sensor; }
18 
19  void setup() override;
20  void dump_config() override;
21  float get_setup_priority() const override;
22 
23  void update() override;
24 
25  protected:
26  void read_data_();
28 };
29 
30 } // namespace max31855
31 } // 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:283
sensor::Sensor * temperature_reference_
Definition: max31855.h:27
The SPIDevice is what components using the SPI will create.
Definition: spi.h:408
This is a workaround until we can figure out a way to get the tflite-micro idf component code availab...
Definition: a01nyub.cpp:7
Base-class for all sensors.
Definition: sensor.h:57
void set_reference_sensor(sensor::Sensor *temperature_sensor)
Definition: max31855.h:17