Added the flash light feature.

This commit is contained in:
Dual Tachyon 2023-08-29 17:02:48 +01:00
parent 1f218f7a63
commit 5edb7a8ea2

View File

@ -1594,6 +1594,22 @@ void FUN_000056a0(bool bFlag)
gRequestDisplayScreen = DISPLAY_MAIN; gRequestDisplayScreen = DISPLAY_MAIN;
} }
void APP_ProcessFlashLight(void)
{
switch (gFlashLightState) {
case 0:
gFlashLightState++;
GPIO_SetBit(&GPIOC->DATA, GPIOC_PIN_FLASHLIGHT);
break;
case 1:
gFlashLightState++;
break;
default:
gFlashLightState = 0;
GPIO_ClearBit(&GPIOC->DATA, GPIOC_PIN_FLASHLIGHT);
}
}
void FUN_00004404(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld) void FUN_00004404(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
{ {
uint8_t Short; uint8_t Short;
@ -1641,7 +1657,7 @@ void FUN_00004404(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
} }
switch (Short) { switch (Short) {
case 1: case 1:
//APP_ProcessFlashLight(); APP_ProcessFlashLight();
break; break;
case 2: case 2:
APP_CycleOutputPower(); APP_CycleOutputPower();