diff options
| author | Dan Halbert <halbert@halwitz.org> | 2018-07-16 19:36:40 -0400 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2018-07-16 19:36:40 -0400 |
| commit | 2809b4f9dd08dd1e83e87f1f4088ba22f3f66cd2 (patch) | |
| tree | e87027c60d5de0811f6213d087c677bc59295bd0 /shared-module | |
| parent | e2e01efa84d2ed46d004edf48076e4701accc176 (diff) | |
| parent | 617351aebc59e27a5f9a8a3b38032637a49f5432 (diff) | |
Merge branch 'master' into micropython-25ae98f-merge
Diffstat (limited to 'shared-module')
| -rw-r--r-- | shared-module/bitbangio/OneWire.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/shared-module/bitbangio/OneWire.c b/shared-module/bitbangio/OneWire.c index e77bdb3b2..f5f479087 100644 --- a/shared-module/bitbangio/OneWire.c +++ b/shared-module/bitbangio/OneWire.c @@ -49,6 +49,9 @@ void shared_module_bitbangio_onewire_deinit(bitbangio_onewire_obj_t* self) { common_hal_digitalio_digitalinout_deinit(&self->pin); } +// We use common_hal_mcu_delay_us(). It should not be dependent on interrupts +// to do accurate timekeeping, since we disable interrupts during the delays below. + bool shared_module_bitbangio_onewire_reset(bitbangio_onewire_obj_t* self) { common_hal_mcu_disable_interrupts(); common_hal_digitalio_digitalinout_switch_to_output(&self->pin, false, DRIVE_MODE_OPEN_DRAIN); |
