Skip to content
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

Add RG_GPIO_LED_ACTIVE_LOW option #149

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions components/retro-go/rg_system.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ static void update_indicators(void)
else if (visibleIndicators)
ledColor = C_BLUE;

#ifdef RG_GPIO_LED_ACTIVE_LOW
ledColor = !ledColor;
#endif

#if defined(ESP_PLATFORM) && defined(RG_GPIO_LED)
gpio_set_level(RG_GPIO_LED, ledColor != 0);
#endif
Expand Down
1 change: 1 addition & 0 deletions components/retro-go/targets/fri3d-2024/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@

// Status LED
#define RG_GPIO_LED GPIO_NUM_21
#define RG_GPIO_LED_ACTIVE_LOW // setting RG_GPIO_LED low turns on the LED, while high turns it off

// Battery
#define RG_BATTERY_DRIVER 1
Expand Down