1
0
Fork 0

Ergonomic changes for PineTime

This involves a longer double reset delay aligned the button blackout
period. The result is that the <- Start will not appear until the button
is active. Finally we shorten the debounce window to make the button
press appear more repsonsive.
wasp-os
Daniel Thompson 2020-05-27 21:41:10 +01:00
parent d8d7d76b17
commit 21bcf675a4
2 changed files with 2 additions and 2 deletions

View File

@ -174,7 +174,7 @@ void SysTick_Handler(void)
* recovering from a flat battery.
*/
if (button_pressed(BUTTON_DFU)) {
if (_systick_count > 4750 && _long_press_count++ > 250) {
if (_systick_count > 2000 && _long_press_count++ > 50) {
NRF_POWER->GPREGRET = BOARD_MAGIC_FORCE_APP_BOOT;
NVIC_SystemReset();
}

View File

@ -106,7 +106,7 @@ void usb_teardown(void);
#define DFU_MAGIC_FORCE_APP_BOOT BOARD_MAGIC_FORCE_APP_BOOT // 0x65
#define DFU_DBL_RESET_MAGIC 0x5A1AD5 // SALADS
#define DFU_DBL_RESET_DELAY 500
#define DFU_DBL_RESET_DELAY 2000
#define DFU_DBL_RESET_MEM 0x20007F7C
#define BOOTLOADER_VERSION_REGISTER NRF_TIMER2->CC[0]