0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-04-27 22:01:26 +03:00

backlight on at power-on

This commit is contained in:
OneOfEleven 2023-11-20 10:34:20 +00:00
parent e0d3a36b96
commit 9a5393cb34
3 changed files with 5 additions and 7 deletions

Binary file not shown.

Binary file not shown.

12
main.c
View File

@ -197,12 +197,12 @@ void Main(void)
BootMode = BOOT_GetMode(); BootMode = BOOT_GetMode();
g_unhide_hidden = (BootMode == BOOT_MODE_UNHIDE_HIDDEN); // flag to say include the hidden menu items g_unhide_hidden = (BootMode == BOOT_MODE_UNHIDE_HIDDEN); // flag to say include the hidden menu items
if (!GPIO_CheckBit(&GPIOC->DATA, GPIOC_PIN_PTT) || BACKLIGHT_turn_on(2000); // turn the backlight ON
KEYBOARD_Poll() != KEY_INVALID ||
BootMode != BOOT_MODE_NORMAL) if (!GPIO_CheckBit(&GPIOC->DATA, GPIOC_PIN_PTT) || KEYBOARD_Poll() != KEY_INVALID || BootMode != BOOT_MODE_NORMAL)
{ {
MAIN_DisplayReleaseKeys(); MAIN_DisplayReleaseKeys();
BACKLIGHT_turn_on(0); // turn the backlight ON // BACKLIGHT_turn_on(2000); // turn the backlight ON
} }
else else
{ {
@ -260,9 +260,7 @@ void Main(void)
UI_SortMenu(!g_unhide_hidden); UI_SortMenu(!g_unhide_hidden);
// wait for user to release all buttons before moving on // wait for user to release all buttons before moving on
if (!GPIO_CheckBit(&GPIOC->DATA, GPIOC_PIN_PTT) || if (!GPIO_CheckBit(&GPIOC->DATA, GPIOC_PIN_PTT) || KEYBOARD_Poll() != KEY_INVALID || BootMode != BOOT_MODE_NORMAL)
KEYBOARD_Poll() != KEY_INVALID ||
BootMode != BOOT_MODE_NORMAL)
{ {
MAIN_DisplayReleaseKeys(); MAIN_DisplayReleaseKeys();
i = 0; i = 0;