Browse Source

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)

timer1
Youen Toupin 8 years ago
parent
commit
a108089f02
  1. 1
      OneWireSlave.cpp

1
OneWireSlave.cpp

@ -390,6 +390,7 @@ void OneWireSlave::endSendBitZero_()
void OneWireSlave::beginWaitReset_() void OneWireSlave::beginWaitReset_()
{ {
disableTimer_(); disableTimer_();
pin_.inputMode();
pin_.attachInterrupt(&OneWireSlave::waitReset_, CHANGE); pin_.attachInterrupt(&OneWireSlave::waitReset_, CHANGE);
resetStart_ = (unsigned int)-1; resetStart_ = (unsigned int)-1;
} }

Loading…
Cancel
Save