Skip to content
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

fix ADC management for pure analog on GIGA #784

Merged
merged 1 commit into from
Dec 4, 2023
Merged

Conversation

Rocketct
Copy link
Contributor

@Rocketct Rocketct commented Dec 1, 2023

This PR allows to fix the management of the pure analogs on GIGA, the issue was that the pure analog pins have not been considered on the g_APinDescription array, this results on miss an offset of 4 elements when a g_AAnalogPinDescription's pin was select in the analogRead() in wiring_Analog.cpp.
The consequence is that the macros involved in Pin and ADC selection, could potentially identify an ADC assigned to the pure analog pins as the ADC channel for all those analog listed after the pin A11 in g_AAnalogPinDescription array in the variant.cpp and than read the ADC channel of the pure analog pins instead of the correct one (e. g. A8 for A12, A9 for A13 and so on and so forth).

The Fix split the two kind of analog pin in order that the correct offset is provided during reading time and manage the pure analog and the other analogs pin as a different entities inside the pins management.

This PR fixes #758

@CLAassistant
Copy link

CLAassistant commented Dec 1, 2023

CLA assistant check
All committers have signed the CLA.

@facchinm facchinm merged commit d2867ba into arduino:main Dec 4, 2023
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GIGA R1 - analogRead(A12) returns A8 value
3 participants