ESPHome 2025.5.0
Loading...
Searching...
No Matches
ens160_spi.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace esphome {
7namespace ens160_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 void dump_config() override;
14
15 bool read_byte(uint8_t a_register, uint8_t *data) override;
16 bool write_byte(uint8_t a_register, uint8_t data) override;
17 bool read_bytes(uint8_t a_register, uint8_t *data, size_t len) override;
18 bool write_bytes(uint8_t a_register, uint8_t *data, size_t len) override;
19};
20
21} // namespace ens160_spi
22} // namespace esphome
The SPIDevice is what components using the SPI will create.
Definition spi.h:421
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7
std::string size_t len
Definition helpers.h:301