ESPHome  2024.10.2
ens160_i2c.cpp
Go to the documentation of this file.
1 #include <cstddef>
2 #include <cstdint>
3 
4 #include "ens160_i2c.h"
6 #include "../ens160_base/ens160_base.h"
7 
8 namespace esphome {
9 namespace ens160_i2c {
10 
11 static const char *const TAG = "ens160_i2c.sensor";
12 
13 bool ENS160I2CComponent::read_byte(uint8_t a_register, uint8_t *data) {
14  return I2CDevice::read_byte(a_register, data);
15 };
16 bool ENS160I2CComponent::write_byte(uint8_t a_register, uint8_t data) {
17  return I2CDevice::write_byte(a_register, data);
18 };
19 bool ENS160I2CComponent::read_bytes(uint8_t a_register, uint8_t *data, size_t len) {
20  return I2CDevice::read_bytes(a_register, data, len);
21 };
22 bool ENS160I2CComponent::write_bytes(uint8_t a_register, uint8_t *data, size_t len) {
23  return I2CDevice::write_bytes(a_register, data, len);
24 };
25 
26 void ENS160I2CComponent::dump_config() {
27  ENS160Component::dump_config();
28  LOG_I2C_DEVICE(this);
29 }
30 
31 } // namespace ens160_i2c
32 } // namespace esphome
std::string size_t len
Definition: helpers.h:292
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7