summaryrefslogtreecommitdiff
path: root/shared-module/bitbangio
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2018-07-16 09:01:46 -0400
committerDan Halbert <halbert@halwitz.org>2018-07-16 09:01:46 -0400
commita20ab40ed2384e3d0463c67a792040145203e364 (patch)
tree3cf9b25de82da6bf02b1fac8398310da87c8d448 /shared-module/bitbangio
parent6c5a152a51b74dfc08b8837b992fd9b375066e83 (diff)
Merge 3.0.0 final bugfixes and changes to master
Diffstat (limited to 'shared-module/bitbangio')
-rw-r--r--shared-module/bitbangio/OneWire.c3
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);