arduino / arduino/ArduinoCore-API

Wire.requestFrom with 5 params is undocumented & exists only on AVR & SAM, not SAMD & megaAVR

Open
#92 2 comments 2 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
306
Forks
150
PR merge metrics
No merged PRs in 30d

Description

Looks like a requestFrom() function taking 5 parameters is undocumented, and only implemented in 2 of the 4 platforms Arduino supports.

Here are the definitions in the AVR and SAM platforms:

https://github.com/arduino/ArduinoCore-avr/blob/master/libraries/Wire/src/Wire.h#L63
https://github.com/arduino/ArduinoCore-sam/blob/master/libraries/Wire/src/Wire.h#L49

However, the SAMD and megaAVR plaforms only have the 2 and 3 parameter requestFrom() functions in their Wire libs:

https://github.com/arduino/ArduinoCore-samd/blob/master/libraries/Wire/Wire.h#L45
https://github.com/arduino/ArduinoCore-megaavr/blob/master/libraries/Wire/src/Wire.h#L60

The Wire library requestFrom() reference page also only documents the 2 and 3 parameter functions:

https://www.arduino.cc/en/Reference/WireRequestFrom

This 5 parameter function should be properly documented, and should be consistently implemented on all platforms. Perhaps issues need to be opened on the repositories for the SAMD and megaAVR platforms?

Contributor guide

No contributing guide indexed for this repository

Research direction

Compare the requestFrom() declarations in the linked Wire.h files for the AVR, SAM, SAMD, and megaAVR cores, then review the Wire requestFrom reference page. Determine the intended five-parameter API scope across platforms; done means the supported behavior is consistently implemented and the reference documentation covers it.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.