Skip to content

Commit adbbf0b

Browse files
authored
Update dht.c
fixed broken function call
1 parent 1abe2e5 commit adbbf0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/dht/dht.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ static esp_err_t dht_await_pin_state(gpio_num_t pin, uint32_t timeout,
120120
for (uint32_t i = 0; i < timeout; i += DHT_TIMER_INTERVAL)
121121
{
122122
// need to wait at least a single interval to prevent reading a jitter
123-
ets_delay_us(DHT_TIMER_INTERVAL);
123+
esp_rom_delay_us(DHT_TIMER_INTERVAL);
124124
if (gpio_get_level(pin) == expected_pin_state)
125125
{
126126
if (duration)
@@ -145,7 +145,7 @@ static inline esp_err_t dht_fetch_data(dht_sensor_type_t sensor_type, gpio_num_t
145145
// Phase 'A' pulling signal low to initiate read sequence
146146
gpio_set_direction(pin, GPIO_MODE_OUTPUT_OD);
147147
gpio_set_level(pin, 0);
148-
ets_delay_us(sensor_type == DHT_TYPE_SI7021 ? 500 : 20000);
148+
esp_rom_delay_us(sensor_type == DHT_TYPE_SI7021 ? 500 : 20000);
149149
gpio_set_level(pin, 1);
150150

151151
// Step through Phase 'B', 40us

0 commit comments

Comments
 (0)