Skip to content

Conversation

@zfields
Copy link
Contributor

@zfields zfields commented Sep 8, 2021

Create an alias for those new to STM32duino environment.

USER_BTN is commonplace in STM32duino, however there are several instances of BUTTON_BUILTIN across other Arduino BSPs. The naming convention of BUTTON_BUILTIN is more closely aligned to LED_BUILTIN, and there appears to be some precedent.

Examples:

Since ST is the clear leader in boards having a built-in button, it has a unique opportunity to help reinforce the semi-standardized precedent BUTTON_BUILTIN by providing an alias for all boards that support a USER_BTN.

@fpistm
Copy link
Member

fpistm commented Sep 9, 2021

Hi @zfields
6 years I'm working in Arduino Ecosystem and honestly, I never seen this definition.
Searching with google give me only 2 pages. It seems mainly defined by ESP.
All standard Arduino examples use the USER_BTN definition.

For Ardunio, no reference:
https://github.com/search?q=org%3Aarduino+%22BUTTON_BUILTIN%22
https://github.com/search?q=org%3Aarduino-libraries+BUTTON_BUILTIN

Same for Adafruit:
https://github.com/search?q=org%3Aadafruit+BUTTON_BUILTIN

And on all GitHub, only 327 occurrences in code:
https://github.com/search?p=32&q=%22BUTTON_BUILTIN%22&type=Code

I think it is really not a good idea to add it, the Arduino standard is USER_BTN. Using BUTTON_BUILTIN in a code would break Arduino compatibility. If you really want have it as a standard it should be submit first to Arduino then it will benefit to all other project following Arduino standard.

@fpistm fpistm added arduino compatibility Request wontfix This will not be worked on labels Sep 9, 2021
@ABOSTM
Copy link
Contributor

ABOSTM commented Sep 9, 2021

I am in line with @fpistm comments.
I prefer to reinforce the Arduino standard USER_BTN (alone),
instead of having a second semi standard definition for the same thing, introducing confusion.
Maybe, library using BUTTON_BUILTIN should stick to Arduino standard (USER_BTN ), or create the alias on theyr own ...

@fpistm fpistm closed this Sep 9, 2021
@fpistm fpistm added enhancement New feature or request and removed Request labels Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arduino compatibility enhancement New feature or request wontfix This will not be worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants