Allow to reset to stock firmware from user firmware by holding pine+f+h

This commit is contained in:
Ondrej Jirman 2021-09-05 01:58:48 +02:00
parent 0b280ebc14
commit 21374993b3
1 changed files with 6 additions and 2 deletions

View File

@ -2149,11 +2149,15 @@ void main(void)
// Check for Pine + F + # being held during powerup
if ((keys[0] & BIT(2)) && (keys[4] & BIT(2))) {
#if CONFIG_STOCK_FW
// H - stay in main firmware
if (keys[6] & BIT(2))
if (keys[6] & BIT(2)) {
#if CONFIG_STOCK_FW
user_app_checked = 1;
#else
RSTSC &= ~BIT(7);
RSTSC |= BIT(7);
#endif
}
// B - jump to USB bootloader
if (keys[5] & BIT(3))