From 2810df59e9c05311df6d32149ed79a393676503b Mon Sep 17 00:00:00 2001 From: Oxan van Leeuwen Date: Wed, 22 Sep 2021 12:47:58 +0200 Subject: [PATCH] Revert change to i2c component --- esphome/components/i2c/i2c.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/esphome/components/i2c/i2c.h b/esphome/components/i2c/i2c.h index b65854533c..da791ec633 100644 --- a/esphome/components/i2c/i2c.h +++ b/esphome/components/i2c/i2c.h @@ -139,6 +139,8 @@ class I2CDevice; class I2CMultiplexer; class I2CRegister { public: + I2CRegister(I2CDevice *parent, uint8_t a_register) : parent_(parent), register_(a_register) {} + I2CRegister &operator=(uint8_t value); I2CRegister &operator=(const std::vector &value); I2CRegister &operator&=(uint8_t value); @@ -147,10 +149,6 @@ class I2CRegister { uint8_t get(); protected: - friend class I2CDevice; - - I2CRegister(I2CDevice *parent, uint8_t a_register) : parent_(parent), register_(a_register) {} - I2CDevice *parent_; uint8_t register_; };