Remove "delay_microseconds_accurate()" and improve systemwide delayMicroseconds() (#2497)

This commit is contained in:
Carlos Garcia Saura
2021-11-10 04:22:00 +01:00
committed by GitHub
parent 6e5cfac927
commit 875b803483
8 changed files with 25 additions and 30 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
#include "sdp3x.h"
#include "esphome/core/log.h"
#include "esphome/core/hal.h"
#include "esphome/core/helpers.h"
namespace esphome {
@@ -25,7 +26,7 @@ void SDP3XComponent::setup() {
ESP_LOGW(TAG, "Soft Reset SDP3X failed!"); // This sometimes fails for no good reason
}
delay_microseconds_accurate(20000);
delayMicroseconds(20000);
if (this->write(SDP3X_READ_ID1, 2) != i2c::ERROR_OK) {
ESP_LOGE(TAG, "Read ID1 SDP3X failed!");