Skip to content

Add user LED to pins.c #10273

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

Merged
merged 2 commits into from
Apr 21, 2025
Merged

Add user LED to pins.c #10273

merged 2 commits into from
Apr 21, 2025

Conversation

KanyonKris
Copy link

Seeed Xiao ESP32-C6 has an LED on GPIO15 for general use in user programs. Commonly these LEDs are defined for the board. So would be good to add this LED pin definition. Schematic showing LED connected to GPIO15 (sheet4, zone D2) - https://files.seeedstudio.com/wiki/SeeedStudio-XIAO-ESP32C6/XIAO-ESP32-C6_v1.0_SCH_PDF_24028.pdf

Seeed Xiao ESP32-C6 has an LED on GPIO15 for general use in user programs. Commonly these LEDs are defined for the board. So would be good to add this LED pin definition.
Schematic showing LED connected to GPIO15 (sheet4, zone D2) - https://files.seeedstudio.com/wiki/SeeedStudio-XIAO-ESP32C6/XIAO-ESP32-C6_v1.0_SCH_PDF_24028.pdf
@Neradoc
Copy link

Neradoc commented Apr 20, 2025

Thanks, I note that the LED is active low. In cases like that we have used LED_INVERTED. Most of the times having both, with the presence of the "inverted" alias making it discoverable that the LED is inverted. (And sometimes only LED_INVERTED like on the Xiao M0, but it has multiple LEDs and labels them with colors).

{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO33) },
{ MP_ROM_QSTR(MP_QSTR_LED_INVERTED), MP_ROM_PTR(&pin_GPIO33) },

led

Added LED_INVERTED
@KanyonKris
Copy link
Author

Thanks, I note that the LED is active low. In cases like that we have used LED_INVERTED. Most of the times having both, with the presence of the "inverted" alias making it discoverable that the LED is inverted. (And sometimes only LED_INVERTED like on the Xiao M0, but it has multiple LEDs and labels them with colors).

Good idea. I added LED_INVERTED

Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this.

I am not so sure having both LED and LED_INVERTED is the clearest solution, but it's been the trend up to now, as @Neradoc noted, so we can leave it.

@dhalbert dhalbert merged commit dc325a3 into adafruit:main Apr 21, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants