Add Switch BackLight action

This commit is contained in:
Armel FAUVEAU
2024-03-11 02:48:21 +01:00
parent f31e8c319e
commit ad3b8b5b9a
13 changed files with 53 additions and 14 deletions

View File

@@ -24,6 +24,7 @@
#ifdef ENABLE_FEAT_F4HWN
#include "driver/system.h"
#include "audio.h"
uint8_t gBacklightBrightnessOld = 0;
#endif
// this is decremented once every 500ms
@@ -59,6 +60,10 @@ void BACKLIGHT_InitHardware()
void BACKLIGHT_TurnOn(void)
{
#ifdef ENABLE_FEAT_F4HWN
gBacklightBrightnessOld = BACKLIGHT_GetBrightness();
#endif
if (gEeprom.BACKLIGHT_TIME == 0) {
BACKLIGHT_TurnOff();
return;

View File

@@ -38,4 +38,8 @@ bool BACKLIGHT_IsOn();
void BACKLIGHT_SetBrightness(uint8_t brigtness);
uint8_t BACKLIGHT_GetBrightness(void);
#ifdef ENABLE_FEAT_F4HWN
extern uint8_t gBacklightBrightnessOld;
#endif
#endif