mirror of
https://github.com/esphome/esphome.git
synced 2024-12-25 15:04:54 +01:00
Update gp8211.cpp
This commit is contained in:
parent
6ede5c75cd
commit
cdf55d7c70
1 changed files with 3 additions and 1 deletions
|
@ -8,7 +8,9 @@ static const char *const TAG = "gp8211";
|
||||||
|
|
||||||
static const uint8_t RANGE_REGISTER = 0x01;
|
static const uint8_t RANGE_REGISTER = 0x01;
|
||||||
|
|
||||||
void GP8211::setup() { this->write_register(RANGE_REGISTER, &this->voltage_, 1); }
|
void GP8211::setup() {
|
||||||
|
this->write_register(RANGE_REGISTER, reinterpret_cast<uint8_t*>(&this->voltage_), sizeof(this->voltage_));
|
||||||
|
}
|
||||||
|
|
||||||
void GP8211::dump_config() {
|
void GP8211::dump_config() {
|
||||||
ESP_LOGCONFIG(TAG, "GP8211:");
|
ESP_LOGCONFIG(TAG, "GP8211:");
|
||||||
|
|
Loading…
Reference in a new issue