ESPHome 2026.4.0-dev
Loading...
Searching...
No Matches
bmp581_spi.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace esphome::bmp581_spi {
7
8// BMP581 is technically compatible with SPI Mode0 and Mode3. Default to Mode3.
10 public spi::SPIDevice<spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_HIGH,
11 spi::CLOCK_PHASE_TRAILING, spi::DATA_RATE_200KHZ> {
12 public:
13 void setup() override;
14 bool bmp_read_byte(uint8_t a_register, uint8_t *data) override;
15 bool bmp_write_byte(uint8_t a_register, uint8_t data) override;
16 bool bmp_read_bytes(uint8_t a_register, uint8_t *data, size_t len) override;
17 bool bmp_write_bytes(uint8_t a_register, uint8_t *data, size_t len) override;
18 void dump_config() override;
19
20 protected:
21 void activate_interface() override;
22};
23
24} // namespace esphome::bmp581_spi
bool bmp_write_bytes(uint8_t a_register, uint8_t *data, size_t len) override
bool bmp_read_byte(uint8_t a_register, uint8_t *data) override
bool bmp_write_byte(uint8_t a_register, uint8_t data) override
bool bmp_read_bytes(uint8_t a_register, uint8_t *data, size_t len) override
The SPIDevice is what components using the SPI will create.
Definition spi.h:429
std::string size_t len
Definition helpers.h:1045