ESPHome  2024.10.2
as3935_spi.h
Go to the documentation of this file.
1 #pragma once
2 
8 
9 namespace esphome {
10 namespace as3935_spi {
11 
13 
15  public spi::SPIDevice<spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_LOW,
16  spi::CLOCK_PHASE_LEADING, spi::DATA_RATE_2MHZ> {
17  public:
18  void setup() override;
19  void dump_config() override;
20 
21  protected:
22  void write_register(uint8_t reg, uint8_t mask, uint8_t bits, uint8_t start_position) override;
23  uint8_t read_register(uint8_t reg) override;
24 };
25 
26 } // namespace as3935_spi
27 } // namespace esphome
The SPIDevice is what components using the SPI will create.
Definition: spi.h:391
uint8_t read_register(uint8_t reg) override
Definition: as3935_spi.cpp:33
void write_register(uint8_t reg, uint8_t mask, uint8_t bits, uint8_t start_position) override
Definition: as3935_spi.cpp:21
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7