mirror of
https://github.com/esphome/esphome.git
synced 2024-11-29 18:24:13 +01:00
Update pca9685_output.cpp (#4929)
This commit is contained in:
parent
959e7745a6
commit
5513b0e121
1 changed files with 0 additions and 3 deletions
|
@ -29,13 +29,10 @@ void PCA9685Output::setup() {
|
||||||
ESP_LOGCONFIG(TAG, "Setting up PCA9685OutputComponent...");
|
ESP_LOGCONFIG(TAG, "Setting up PCA9685OutputComponent...");
|
||||||
|
|
||||||
ESP_LOGV(TAG, " Resetting devices...");
|
ESP_LOGV(TAG, " Resetting devices...");
|
||||||
uint8_t address_tmp = this->address_;
|
|
||||||
this->set_i2c_address(0x00);
|
|
||||||
if (!this->write_bytes(PCA9685_REGISTER_SOFTWARE_RESET, nullptr, 0)) {
|
if (!this->write_bytes(PCA9685_REGISTER_SOFTWARE_RESET, nullptr, 0)) {
|
||||||
this->mark_failed();
|
this->mark_failed();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this->set_i2c_address(address_tmp);
|
|
||||||
|
|
||||||
if (!this->write_byte(PCA9685_REGISTER_MODE1, PCA9685_MODE1_RESTART | PCA9685_MODE1_AUTOINC)) {
|
if (!this->write_byte(PCA9685_REGISTER_MODE1, PCA9685_MODE1_RESTART | PCA9685_MODE1_AUTOINC)) {
|
||||||
this->mark_failed();
|
this->mark_failed();
|
||||||
|
|
Loading…
Reference in a new issue