mirror of
https://xff.cz/git/pinephone-keyboard
synced 2024-12-22 04:48:49 -05:00
Allow to reset to stock firmware from user firmware by holding pine+f+h
This commit is contained in:
parent
0b280ebc14
commit
21374993b3
@ -2149,11 +2149,15 @@ void main(void)
|
|||||||
|
|
||||||
// Check for Pine + F + # being held during powerup
|
// Check for Pine + F + # being held during powerup
|
||||||
if ((keys[0] & BIT(2)) && (keys[4] & BIT(2))) {
|
if ((keys[0] & BIT(2)) && (keys[4] & BIT(2))) {
|
||||||
#if CONFIG_STOCK_FW
|
|
||||||
// H - stay in main firmware
|
// H - stay in main firmware
|
||||||
if (keys[6] & BIT(2))
|
if (keys[6] & BIT(2)) {
|
||||||
|
#if CONFIG_STOCK_FW
|
||||||
user_app_checked = 1;
|
user_app_checked = 1;
|
||||||
|
#else
|
||||||
|
RSTSC &= ~BIT(7);
|
||||||
|
RSTSC |= BIT(7);
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
// B - jump to USB bootloader
|
// B - jump to USB bootloader
|
||||||
if (keys[5] & BIT(3))
|
if (keys[5] & BIT(3))
|
||||||
|
Loading…
Reference in New Issue
Block a user