mirror of
https://github.com/esphome/esphome.git
synced 2026-06-24 13:27:14 +00:00
Add the C++ `final` specifier to leaf, user-configurable component classes and automation action/trigger/condition primitives so that classes meant to be terminal cannot be subclassed by external components. Only classes never used as a base anywhere in the tree are marked. Part 10 of 21, split alphabetically by component (matrix_keypad .. micronova).
24 lines
634 B
C++
24 lines
634 B
C++
#pragma once
|
|
|
|
#include "esphome/core/component.h"
|
|
#include "esphome/components/sensor/sensor.h"
|
|
#include "esphome/components/spi/spi.h"
|
|
|
|
namespace esphome::max6675 {
|
|
|
|
class MAX6675Sensor final : public sensor::Sensor,
|
|
public PollingComponent,
|
|
public spi::SPIDevice<spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_LOW,
|
|
spi::CLOCK_PHASE_LEADING, spi::DATA_RATE_1MHZ> {
|
|
public:
|
|
void setup() override;
|
|
void dump_config() override;
|
|
|
|
void update() override;
|
|
|
|
protected:
|
|
void read_data_();
|
|
};
|
|
|
|
} // namespace esphome::max6675
|