MCUdude / MegaCore

Arduino hardware package for ATmega64, ATmega128, ATmega165, ATmega169, ATmega325, ATmega329, ATmega640, ATmega645, ATmega649, ATmega1280, ATmega1281, ATmega2560, ATmega2561, ATmega3250, ATmega3290, ATmega6450, ATmega6490, AT90CAN32, AT90CAN64 and AT90CAN128
Other
374 stars 115 forks source link

make wire library non-blocking #179

Closed imanfreeman closed 10 months ago

imanfreeman commented 2 years ago

Hi @MCUdude first, I would like to thank you for your great job. It's really appreciated. then, I want to mention a problem in the Wire library which results in a freezing code! the Arduino Wire library has been updated to address this problem by defining a timeout function. It would be very great if you can add this update to the Mega (and probably mini) core as well. regards

MCUdude commented 10 months ago

The Wire library does now support timeouts. However, it needs to be enabled in the source code:

https://github.com/MCUdude/MegaCore/blob/c87824f5733765da0c5fc410d8cd3af1791371d0/avr/libraries/Wire/src/Wire_timeout.h#L1-L6