ESPHome 2025.5.0
Loading...
Searching...
No Matches
max31855.h
Go to the documentation of this file.
1#pragma once
2
6
7#include <cinttypes>
8
9namespace esphome {
10namespace 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
This class simplifies creating components that periodically check a state.
Definition component.h:301
float get_setup_priority() const override
Definition max31855.cpp:36
sensor::Sensor * temperature_reference_
Definition max31855.h:27
void set_reference_sensor(sensor::Sensor *temperature_sensor)
Definition max31855.h:17
Base-class for all sensors.
Definition sensor.h:57
The SPIDevice is what components using the SPI will create.
Definition spi.h:421
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7