-
Notifications
You must be signed in to change notification settings - Fork 3k
Add consistent button names across targets #4249
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
Changes from 3 commits
77cc87b
83a5107
28d1ac5
418d83b
0268c85
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,6 +79,10 @@ typedef enum { | |
SW1 = P2_3, | ||
SW2 = NOT_CONNECTED, | ||
SW3 = NOT_CONNECTED, | ||
// Standardized button names | ||
BUTTON1 = SW1, | ||
BUTTON2 = SW2, | ||
BUTTON3 = SW3, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here regarding not connected buttons. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated |
||
|
||
// USB bridge connected UART pins | ||
USBTX = P2_1, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,6 +128,8 @@ typedef enum { | |
LED_YELLOW = GPIO6, | ||
LED_BLUE = GPIO5, | ||
USER_BUTTON = GPIO7, /*NEW connection on NCS36510-RF Rev 1.1 - Alias of SW1 */ | ||
// Standardized button names | ||
BUTTON1 = USER_BUTTON, | ||
SW1 = GPIO7, /*NEW connection on NCS36510-RF Rev 1.1 */ | ||
SW2 = GPIO10, /*NEW connection on NCS36510-RF Rev 1.1 */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting, that was a failure on my script end I'll add those in. Good catch! |
||
SERIAL_TX = GPIO0, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,6 +104,8 @@ typedef enum { | |
LED3 = PB_3, | ||
LED4 = PB_3, | ||
USER_BUTTON = 0x20, // no user button on the board | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This switch is specified as not existing, left the new button map in but could also pull it out since it's not really needed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bcostm Is this used in the apps somewhere? I assume as all of ST are defining There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no user button on the small Nucleo 32 pins boards like this one. This definition was probably left by mistake... |
||
// Standardized button names | ||
BUTTON1 = USER_BUTTON, | ||
SERIAL_TX = PA_2, | ||
SERIAL_RX = PA_15, | ||
USBTX = PA_2, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an interesting one actually, since
SW2
andSW3
aren't actually connected. In this case I'd say let's not add anyBUTTONx
definitions. I'd rather this fail at compile time. What do you think @0xc0170?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated