mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-19 23:08:34 +03:00
simtrace: Boot into DFU when BOOTLOADER button is pressed
This recovers the old functionality of the SAM7 based OpenPCD firmware.
This commit is contained in:
@@ -35,3 +35,17 @@ void board_main_top(void)
|
||||
//card_present_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
int board_override_enter_dfu(void)
|
||||
{
|
||||
const Pin bl_sw_pin = PIN_BOOTLOADER_SW;
|
||||
|
||||
PIO_Configure(&bl_sw_pin, 1);
|
||||
|
||||
/* Enter DFU bootloader in case the respective button is pressed */
|
||||
if (PIO_Get(&bl_sw_pin) == 0) {
|
||||
//printf("BOOTLOADER switch presssed -> Force DFU\n\r");
|
||||
return 1;
|
||||
} else
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user