From 21374993b352117c15469ef02fc2205f620cdfe2 Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Sun, 5 Sep 2021 01:58:48 +0200 Subject: [PATCH] Allow to reset to stock firmware from user firmware by holding pine+f+h --- firmware/main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/firmware/main.c b/firmware/main.c index 9a529ba..82e5964 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -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))