mirror of
https://github.com/esphome/esphome.git
synced 2025-03-20 01:28:16 +00:00
Update ds248x.h
check clang
This commit is contained in:
parent
996f453589
commit
858f5eafcd
@ -9,17 +9,18 @@ static const uint8_t NBR_CHANNELS = 8;
|
||||
|
||||
namespace esphome {
|
||||
|
||||
namespace ds248x {
|
||||
namespace ds248x {
|
||||
|
||||
enum class DS248xType : int {
|
||||
enum class DS248xType : int {
|
||||
DS2482_100 = 0,
|
||||
DS2482_800 = 1,
|
||||
};
|
||||
};
|
||||
|
||||
class DS248xTemperatureSensor;
|
||||
class DS248xTemperatureSensor;
|
||||
|
||||
class DS248xComponent : public PollingComponent, public i2c::I2CDevice {
|
||||
class DS248xComponent : public PollingComponent, public i2c::I2CDevice {
|
||||
friend class DS248xTemperatureSensor;
|
||||
|
||||
public:
|
||||
void setup() override;
|
||||
void dump_config() override;
|
||||
@ -77,9 +78,9 @@ namespace esphome {
|
||||
uint8_t read_from_wire();
|
||||
|
||||
bool search(uint64_t *address);
|
||||
};
|
||||
};
|
||||
|
||||
class DS248xTemperatureSensor : public sensor::Sensor {
|
||||
class DS248xTemperatureSensor : public sensor::Sensor {
|
||||
public:
|
||||
void set_parent(DS248xComponent *parent) { parent_ = parent; }
|
||||
|
||||
@ -133,8 +134,8 @@ namespace esphome {
|
||||
uint8_t scratch_pad_[9] = {
|
||||
0,
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace ds248x
|
||||
} // namespace ds248x
|
||||
|
||||
} // namespace esphome
|
||||
|
Loading…
x
Reference in New Issue
Block a user