0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-19 06:39:49 +03:00

Fix serial comms mishap, fix dual-watch not starting at power-on

This commit is contained in:
OneOfEleven
2023-10-11 16:02:45 +01:00
parent 5942582da4
commit 46a082ef05
23 changed files with 612 additions and 506 deletions

View File

@ -31,7 +31,7 @@
#include "ui/menu.h"
#include "ui/ui.h"
BOOT_Mode_t BOOT_GetMode(void)
boot_mode_t BOOT_GetMode(void)
{
unsigned int i;
key_code_t Keys[2];
@ -47,7 +47,7 @@ BOOT_Mode_t BOOT_GetMode(void)
if (Keys[0] == Keys[1])
{
if (Keys[0] == KEY_SIDE1)
return BOOT_MODE_F_LOCK;
return BOOT_MODE_UNHIDE_HIDDEN;
#ifdef ENABLE_AIRCOPY
if (Keys[0] == KEY_SIDE2)
@ -58,9 +58,9 @@ BOOT_Mode_t BOOT_GetMode(void)
return BOOT_MODE_NORMAL;
}
void BOOT_ProcessMode(BOOT_Mode_t Mode)
void BOOT_ProcessMode(boot_mode_t Mode)
{
if (Mode == BOOT_MODE_F_LOCK)
if (Mode == BOOT_MODE_UNHIDE_HIDDEN)
{
GUI_SelectNextDisplay(DISPLAY_MENU);
}

View File

@ -20,19 +20,18 @@
#include <stdint.h>
#include "driver/keyboard.h"
enum BOOT_Mode_t
enum boot_mode_e
{
BOOT_MODE_NORMAL = 0,
BOOT_MODE_F_LOCK,
BOOT_MODE_NORMAL = 0, // normal boot
BOOT_MODE_UNHIDE_HIDDEN, // unhide the hidden menu items
#ifdef ENABLE_AIRCOPY
BOOT_MODE_AIRCOPY
BOOT_MODE_AIRCOPY // do an air-copy
#endif
};
typedef enum boot_mode_e boot_mode_t;
typedef enum BOOT_Mode_t BOOT_Mode_t;
BOOT_Mode_t BOOT_GetMode(void);
void BOOT_ProcessMode(BOOT_Mode_t Mode);
boot_mode_t BOOT_GetMode(void);
void BOOT_ProcessMode(boot_mode_t Mode);
#endif