Update shared-module/onewireio/OneWire.c

Co-authored-by: Scott Shawcroft <scott@tannewt.org>
This commit is contained in:
CanyonCasa 2023-04-17 12:02:45 -06:00 committed by GitHub
parent 8927e41180
commit 61f868a14e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,7 +59,7 @@ bool common_hal_onewireio_onewire_reset(onewireio_onewire_obj_t *self) {
common_hal_mcu_delay_us(70);
bool value = common_hal_digitalio_digitalinout_get_value(&self->pin);
common_hal_mcu_delay_us(410);
// test if bus returned high (idle) and not stck at low
// test if bus returned high (idle) and not stuck at low
bool idle = common_hal_digitalio_digitalinout_get_value(&self->pin);
common_hal_mcu_enable_interrupts();
return value || !idle;