forked from mirror/uv-k5-firmware
Added the flash light feature.
This commit is contained in:
parent
1f218f7a63
commit
5edb7a8ea2
18
app/app.c
18
app/app.c
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user