arduino / arduino/ArduinoCore-megaavr

Wire library has no timeout functionality (meaning it is blocking).

Open
#83 3 comments 4 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
111
Forks
65
PR merge metrics
No merged PRs in 30d

Description

In trying to solve some I2C issues I've been having, I came across [this](https://github.com/arduino/ArduinoCore-avr/pull/107) thread (and a great many others), which indicate the Wire libraries don't have any timeout capabilities, particularly making `Wire .endTransmission ()` blocking. This has [since been solved and merged](https://github.com/arduino/ArduinoCore-avr/pull/107#issuecomment-642671632) into _ArduinoCore-avr_ and has appeared in my libraries locally. To the best of my knowledge (and my own experience), the _ArduinoCore-megaavr_ Wire library is also blocking. I haven't been able to find this fix in the _ArduinoCore-megaavr_ version of Wire, and I haven't found any other issues relating to this, so I'm raising one now.

I'm not aware of the development relationship between the two cores, so if this already on its way, that's great. If not (and it's appropriate to do so), I'd like to see the functionality added to _ArduinoCore-avr_ added here too. Particularly, I'd like to see functionality added that's similar to that provided by the new functions `setWireTimeout()`, `getWireTimeoutFlag()`, `clearWireTimeoutFlag()`.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the linked ArduinoCore-avr pull request and comparing its Wire implementation with ArduinoCore-megaavr, focusing on Wire.endTransmission() and the setWireTimeout(), getWireTimeoutFlag(), and clearWireTimeoutFlag() functions named in the issue. Done means the megaavr Wire library provides equivalent timeout behavior and no longer blocks indefinitely during transmission.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
embedded-iot
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.