ESPHome  2024.12.2
bme280_spi.h
Go to the documentation of this file.
1 #pragma once
2 
5 
6 namespace esphome {
7 namespace bme280_spi {
8 
10  public spi::SPIDevice<spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_LOW,
11  spi::CLOCK_PHASE_LEADING, spi::DATA_RATE_200KHZ> {
12  void setup() override;
13  bool read_byte(uint8_t a_register, uint8_t *data) override;
14  bool write_byte(uint8_t a_register, uint8_t data) override;
15  bool read_bytes(uint8_t a_register, uint8_t *data, size_t len) override;
16  bool read_byte_16(uint8_t a_register, uint16_t *data) override;
17 };
18 
19 } // namespace bme280_spi
20 } // namespace esphome
The SPIDevice is what components using the SPI will create.
Definition: spi.h:391
std::string size_t len
Definition: helpers.h:293
This class implements support for the BME280 Temperature+Pressure+Humidity sensor.
Definition: bme280_base.h:60
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7