Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFix infinite recursion issue in SERCOM::startTransmissionWIRE #535
Conversation
* If a significant hardware issue is struck startTransmissionWIRE calls itself to restart sending the address+r/w byte. The stack can be blown very quickly in the event of a prolonged hardware issue that warrants transmission restarts. A restart limit has been added (currently set at 5) to fix this issue. * This fixes issue #476 and it builds on work by @jrowberg in which a timeout was added addressing issue #439. * Some code simplification and tidying has followed from #439 and #476 being resolved.
* TwoWire::endTransmission layout changed to be more inline with TwoWire::requestFrom because they are essentially functioning in a similar way. * Sending of stop condition moved to within block of successful start. Apon successful start but unsuccessful read/write, stop condition is also sent - regardless of whether stop has been requested at that time.
If a significant hardware issue is struck startTransmissionWIRE
calls itself to restart sending the address+r/w byte. The stack
can be blown very quickly in the event of a prolonged hardware
issue that warrants transmission restarts. A restart limit has
been added (currently set at 5) to fix this issue.
This fixes issue #476 and it builds on work by @jrowberg in which
a timeout was added addressing issue #439.
Some code simplification and tidying has followed from #439 and #476
being resolved.