ESPHome  2024.11.1
adc128s102.h
Go to the documentation of this file.
1 #pragma once
2 
4 #include "esphome/core/hal.h"
6 
7 namespace esphome {
8 namespace adc128s102 {
9 
10 class ADC128S102 : public Component,
11  public spi::SPIDevice<spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_LOW, spi::CLOCK_PHASE_LEADING,
12  spi::DATA_RATE_10MHZ> {
13  public:
14  ADC128S102() = default;
15 
16  void setup() override;
17  void dump_config() override;
18  float get_setup_priority() const override;
19  uint16_t read_data(uint8_t channel);
20 };
21 
22 } // namespace adc128s102
23 } // namespace esphome
The SPIDevice is what components using the SPI will create.
Definition: spi.h:391
float get_setup_priority() const override
Definition: adc128s102.cpp:9
uint16_t read_data(uint8_t channel)
Definition: adc128s102.cpp:21
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7