mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-06 04:48:27 +02:00
Add support for LTR390 (#1505)
* Add support for ltr390 * Fix linting errors * Fix more linting errors * Linting fixes continued * Linting forever * Another one * Fix regression and linting * Fix narrowing conversion * Add test and bugfix * Add codeowners * Update CODEOWNERS * Update sensor defs * Reformatted with black * Fixed device class import * Update CODEOWNERS * Update CODEOWNERS * Adding all config options As requested https://github.com/esphome/esphome/pull/1505#discussion_r597326897 * Moving test to different config file test1.yml runs out of memory * Update according to comments * Add safety clause to reading modes * Fix clang-tidy complaint * Revert change to i2c component * Fix for changes in dev * Revert "Revert change to i2c component" This reverts commit 2810df59e9c05311df6d32149ed79a393676503b. Co-authored-by: Otto winter <otto@otto-winter.com> Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
This commit is contained in:
@@ -13,8 +13,6 @@ namespace i2c {
|
||||
class I2CDevice;
|
||||
class I2CRegister {
|
||||
public:
|
||||
I2CRegister(I2CDevice *parent, uint8_t a_register) : parent_(parent), register_(a_register) {}
|
||||
|
||||
I2CRegister &operator=(uint8_t value);
|
||||
I2CRegister &operator&=(uint8_t value);
|
||||
I2CRegister &operator|=(uint8_t value);
|
||||
@@ -24,6 +22,10 @@ class I2CRegister {
|
||||
uint8_t get() const;
|
||||
|
||||
protected:
|
||||
friend class I2CDevice;
|
||||
|
||||
I2CRegister(I2CDevice *parent, uint8_t a_register) : parent_(parent), register_(a_register) {}
|
||||
|
||||
I2CDevice *parent_;
|
||||
uint8_t register_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user