ESPHome  2024.8.3
ina2xx_spi.h
Go to the documentation of this file.
1 #pragma once
2 
6 
7 namespace esphome {
8 namespace ina2xx_spi {
9 
11  public spi::SPIDevice<spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_LOW, spi::CLOCK_PHASE_TRAILING,
12  spi::DATA_RATE_1MHZ> {
13  public:
14  void setup() override;
15  void dump_config() override;
16 
17  protected:
18  bool read_ina_register(uint8_t reg, uint8_t *data, size_t len) override;
19  bool write_ina_register(uint8_t reg, const uint8_t *data, size_t len) override;
20 };
21 } // namespace ina2xx_spi
22 } // namespace esphome
bool write_ina_register(uint8_t reg, const uint8_t *data, size_t len) override
Definition: ina2xx_spi.cpp:29
The SPIDevice is what components using the SPI will create.
Definition: spi.h:391
bool read_ina_register(uint8_t reg, uint8_t *data, size_t len) override
Definition: ina2xx_spi.cpp:19
std::string size_t len
Definition: helpers.h:292
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7