Replies: 2 comments 1 reply
-
AFAIK there is no specific reason. |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
Is there any reason for
variant.h
to use thestatic const uint8_t Ax
instead of the#define PIN_Ax (PIN_Ay + 1)
, when defining pins?Example from this variant:
Arduino_Core_STM32/variants/Generic_F4x7Vx/variant.h
Line 32 in 3c414ec
This makes
PA0 = static const uint8_t A0
, so we can't usePA0
in a preprocessor directive, like#if MY_UART_PIN = PA0
...The variant could be written this way:
This will make
PA0 = *integer*
, directly, thus allowing it to be used in any#if
.Note that all pins in the variant are defined as direct integer, only those related to analog that aren't:
I can send a PR with this change, I just want to know if there's any reason for that.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions