diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2018-07-16 15:09:37 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-16 15:09:37 -0700 |
| commit | 617351aebc59e27a5f9a8a3b38032637a49f5432 (patch) | |
| tree | 3cf9b25de82da6bf02b1fac8398310da87c8d448 /shared-module | |
| parent | 6c5a152a51b74dfc08b8837b992fd9b375066e83 (diff) | |
| parent | a20ab40ed2384e3d0463c67a792040145203e364 (diff) | |
Merge pull request #1031 from dhalbert/3.0.0-to-master
Merge 3.0.0 final bugfixes and changes to master
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); |
