Renamed the C++ implementation files to match the component folder naming: - lsm6ds.h -> lsm6ds_base.h - lsm6ds.cpp -> lsm6ds_base.cpp Updated all includes: - lsm6ds_base/lsm6ds_base.cpp: Updated self-include - lsm6ds_i2c/lsm6ds_i2c.h: Updated to include lsm6ds_base.h - lsm6ds_spi/lsm6ds_spi.h: Updated to include lsm6ds_base.h Fixed test file: - tests/lsm6ds_test.yaml: Updated sensor platforms to use lsm6ds_i2c and lsm6ds_spi This ensures all files follow consistent naming conventions with the _base suffix.
17 lines
517 B
C++
17 lines
517 B
C++
#pragma once
|
|
|
|
#include "esphome/components/i2c/i2c.h"
|
|
#include "esphome/components/lsm6ds_base/lsm6ds_base.h"
|
|
|
|
namespace esphome {
|
|
namespace lsm6ds_i2c {
|
|
|
|
class LSM6DSI2CDevice : public lsm6ds_base::LSM6DSComponent, public i2c::I2CDevice {
|
|
public:
|
|
bool read_register(uint8_t reg, uint8_t *data, size_t len) override { return this->read_bytes(reg, data, len); }
|
|
bool write_register(uint8_t reg, uint8_t data) override { return this->write_byte(reg, data); }
|
|
};
|
|
|
|
} // namespace lsm6ds_i2c
|
|
} // namespace esphome
|