X-Git-Url: http://git.linex4red.de/pub/lufa.git/blobdiff_plain/e635872612fb054791a121a2920432574b9245bb..03cdb09071c5c9ed9dd0f851a0980d360a4492d0:/Bootloaders/MassStorage/BootloaderMassStorage.c diff --git a/Bootloaders/MassStorage/BootloaderMassStorage.c b/Bootloaders/MassStorage/BootloaderMassStorage.c index 7adeaced7..c891f8516 100644 --- a/Bootloaders/MassStorage/BootloaderMassStorage.c +++ b/Bootloaders/MassStorage/BootloaderMassStorage.c @@ -61,6 +61,25 @@ USB_ClassInfo_MS_Device_t Disk_MS_Interface = }; +void Application_Jump_Check(void) +{ + bool JumpToApplication = false; + + #if (BOARD == BOARD_LEONARDO) + /* Enable pull-up on the IO13 pin so we can use it to select the mode */ + PORTC |= (1 << 7); + Delay_MS(10); + JumpToApplication |= ((PINC & (1 << 7)) != 0); + PORTC &= ~(1 << 7); + #endif + + if (JumpToApplication) + { + // cppcheck-suppress constStatement + ((void (*)(void))0x0000)(); + } +} + /** Main program entry point. This routine configures the hardware required by the application, then * enters a loop to run the application tasks in sequence. */