-
-
Notifications
You must be signed in to change notification settings - Fork 140
Move analogReference enum to ArduinoCore-API #236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Moved from ArduinoCore-samd
CLA assistant check
All committers have signed the CLA.
These values seem very specific. How can other platforms use them? Does it benefit any platform besides SAMD? Just curious as to if this is generic enough for other platforms following the API.
facchinm
commented
Jun 28, 2024
Hi @rubenstar, as @bmourit already explained, the analogReference parameters are architecture specific, so they cannot be generalized and added to the API repo.
The warning arises from the SAMD port being stricter than usual on the parameter type, but the fix for the warning should just be applied in that core.
rubenstar
commented
Jun 30, 2024
bmourit
commented
Jul 1, 2024
No need to be sorry!!!
Uh oh!
There was an error while loading. Please reload this page.
Currently, the header for
analogReference(...)is in ArduinoCore-API and takesuint8_tas argument type.The implementation of that function is in ArduinoCore-samd (here), but takes
eAnalogReferenceenum as argument type. The enum is defined in Arduino.hCompiling
ArduinoCore-samd/cores/arduino/wiring_analog.cwill give a warning:My proposal is to move that enum from Arduino.h in ArduinoCore-samd fully into ArduinoCore-API. Seems cleaner to me.
I filed a corresponding PR in ArduinoCore-samd too:
arduino/ArduinoCore-samd#718