We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e56d262 commit 7a351ddCopy full SHA for 7a351dd
libraries/Wire/src/Wire.cpp
@@ -390,7 +390,6 @@ uint32_t TwoWire::getClock()
390
391
void TwoWire::setClock(uint32_t frequency)
392
{
393
- esp_err_t err = ESP_OK;
394
#if !CONFIG_DISABLE_HAL_LOCKS
395
//acquire lock
396
if(lock == NULL || xSemaphoreTake(lock, portMAX_DELAY) != pdTRUE){
@@ -401,11 +400,10 @@ void TwoWire::setClock(uint32_t frequency)
401
400
#if SOC_I2C_SUPPORT_SLAVE
402
if(is_slave){
403
log_e("Bus is in Slave Mode");
404
- err = ESP_FAIL;
405
} else
406
#endif /* SOC_I2C_SUPPORT_SLAVE */
407
408
- err = i2cSetClock(num, frequency);
+ i2cSetClock(num, frequency);
409
}
410
411
//release lock
0 commit comments