diff options
| author | hathach <thach@tinyusb.org> | 2018-07-17 21:27:16 +0700 |
|---|---|---|
| committer | hathach <thach@tinyusb.org> | 2018-07-17 21:27:16 +0700 |
| commit | d4e84a9bd43c6b781b46ab5c3c0b2d5078c2b4ce (patch) | |
| tree | 3a0281371c35fa77d17b4e509185be334877e8a3 /shared-module | |
| parent | 3525d65af3cd8ad08b626070fa01048b0697fedc (diff) | |
| parent | 617351aebc59e27a5f9a8a3b38032637a49f5432 (diff) | |
Merge branch 'master' into fix_nrf52840_serial
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); |
