From a108089f02cabd236a53bbbccb96b730fe0f7b50 Mon Sep 17 00:00:00 2001 From: Youen Toupin Date: Tue, 25 Apr 2017 21:11:19 +0200 Subject: [PATCH] fixed probable cause of rare 1-wire bus deadlock where the Arduino would not release the bus and keep pulling it low forever (thanks to fari on http://www.stm32duino.com/viewtopic.php?f=9&t=1852 for posting this fix) --- OneWireSlave.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/OneWireSlave.cpp b/OneWireSlave.cpp index ef208f4..01ba65e 100644 --- a/OneWireSlave.cpp +++ b/OneWireSlave.cpp @@ -390,6 +390,7 @@ void OneWireSlave::endSendBitZero_() void OneWireSlave::beginWaitReset_() { disableTimer_(); + pin_.inputMode(); pin_.attachInterrupt(&OneWireSlave::waitReset_, CHANGE); resetStart_ = (unsigned int)-1; }