-
Notifications
You must be signed in to change notification settings - Fork 959
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
Analog pins definition #37
Labels
enhancement
New feature or request
help wanted 🙏
Extra attention is needed
question ❓
Usually converted as a discussion
Comments
fpistm
added
help wanted 🙏
Extra attention is needed
question ❓
Usually converted as a discussion
labels
Jun 23, 2017
fpistm
added a commit
that referenced
this issue
Jun 26, 2017
analogRead(A0) == analogRead(0) analogWrite(A0) != analogWrite(0) == analogWrite(D0) All pins available in PinMap_ADC are available with Ax alias Fix #37 Move pin functions to pins_arduino.c to avoid duplicated code. Pin functions naming alignement. Move init() function to pins_arduino.c to avoid duplicated code and define it as weak. Minor clean of unused code. Remove usb flags for variants w/o usb. Serialx under switch.Disable by default Now, variant files only contain source which differ for each variants. Signed-off-by: Frederic Pillon <[email protected]>
AnalogRead(A0) == AnalogRead(0) Iterate starting from 0 on analogRead(i) is now functionnal (as expected in several sketches/libraries) |
fpistm
added a commit
that referenced
this issue
Jun 26, 2017
analogRead(A0) == analogRead(0) analogWrite(A0) != analogWrite(0) == analogWrite(D0) All pins available in PinMap_ADC are available with Ax alias Fix #37 Move pin functions to pins_arduino.c to avoid duplicated code. Pin functions naming alignement. Move init() function to pins_arduino.c to avoid duplicated code and define it as weak. Minor clean of unused code. Remove usb flags for variants w/o usb. Serialx under switch.Disable by default Now, variant files only contain source which differ for each variants. Signed-off-by: Frederic Pillon <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
help wanted 🙏
Extra attention is needed
question ❓
Usually converted as a discussion
Hi all,
I would like to open a discussion around the analog pins definition Ax
Currently, we mainly defined A0 to A5 but STM2 MCU provide more than 6 ADC.
And in PinMap_ADC we make available more than A0-A5.
So, constant NUM_ANALOG_INPUTS is not aligned.
Questions are:
Is it required to define more than A0 to A5 by default ?
If not then, only comment the other pins in PinMap_ADC.
If yes, extend the Ax to the same number of pins defined in PinMap_ADC. This will imply to duplicate some pin definitions in digital_arduino array or reordering it.
Furthermore, after discussion with Arduino developper, the AnalogRead(A0) == AnalogRead(0) should be the same while AnalogWrite(0) == AnalogWrite(D0).
For constant value, it should be changed to not use sizeof to avoid issue:
Any feedback are welcome here on in the stm32duino forum dedicated topics
Note: I took as example the Nucleo F429ZI but it is valid far all variant.
The text was updated successfully, but these errors were encountered: