-
Notifications
You must be signed in to change notification settings - Fork 1k
Pin name PXn should match Arduino pin numberin Dx #81
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
Comments
Hi @gus-ghielec, So, |
@fpistm digitalWrite(PC6, HIGH); not BTW. I was not aware that the direct mapping does not work using the pin names like it does in libmaple and STM32Generic |
Thanks @rogerclarkmelbourne |
If someone made their own variant file, do you think they could map as 1:1 ? i.e I know @gus-ghielec sells a custom board, and I think it may have pin names rather than pin numbers |
it would be great if we can use Pxy names without pinNametoDigitalPin |
No @rogerclarkmelbourne as PinName is not an index. Edit: I've got an idea, need to check if it could be applied |
Yikes This is going to be a rather confusing for anyone using the Discovery series boards, which are labelled with Pxn format names |
The pinname issue is kind of embedded deeply in these cores at this point. |
I will not change the pinmap management but I could grant this request. I will do a PR before the end of the week. I hope ;) |
I presume the problem is all associated with the Analog pin numbers needing to be Arduino compatible :-( |
Yes, always the same problem... to be or not to be Arduino compatible. 😅 |
Frederic I'm not sure if its something you can decide... But given the choice of either being able to use the real Port / Pin name or supporting the Arduino analogue pin number system, I would use Port / Pin There are so many other things which are not going to be AVR compatible, that trying to make the Analog pin names compatible will be a minor change compared with the Harvard vs Von Neumann architecture and the size of int and float etc, that people will have to get used to, if migrating from AVR. |
Pxy/Dx and Ax, deal? :) |
I will only add possibility to use pin name as an index matching the Dx. (no loop ;)) PYn == Dx == x for digital |
Issue stm32duino#81 Signed-off-by: Frederic.Pillon <[email protected]>
Example for Nucleo F429ZI, equivalent calls are: Digital:
AnalogRead:
AnalogWrite:
Warning: |
Requested by: stm32duino/Arduino_Core_STM32#81 Signed-off-by: Frederic.Pillon <[email protected]>
Excellent. |
PR #83 merged |
I have an LED connected to D34(PC6). My code works when I use D34 just fine but then it doesn't work if I use PC6 instead of D34. Both of these should be the same thing. There seem to be an issue when using the processor pin names.
This is necessary for those building products based on the nucleo board and want to use the processor pin name instead of the "Arduino" Dxx pin names.
I am using the blink LED code example.
The text was updated successfully, but these errors were encountered: