ESPHome 2025.6.0
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
ina2xx_spi.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace esphome {
8namespace 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
bool read_ina_register(uint8_t reg, uint8_t *data, size_t len) override
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:302