1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 00:05:33 +03:00

Add booting into the flash boot loader as an option.

This commit is contained in:
mikeller 2019-06-15 19:47:47 +12:00
parent de60402840
commit 5cf42f40b6
14 changed files with 180 additions and 111 deletions

View file

@ -140,9 +140,10 @@ static const char * const flightControllerIdentifier = BETAFLIGHT_IDENTIFIER; //
enum {
MSP_REBOOT_FIRMWARE = 0,
MSP_REBOOT_BOOTLOADER,
MSP_REBOOT_BOOTLOADER_ROM,
MSP_REBOOT_MSC,
MSP_REBOOT_MSC_UTC,
MSP_REBOOT_BOOTLOADER_FLASH,
MSP_REBOOT_COUNT,
};
@ -263,8 +264,8 @@ static void mspRebootFn(serialPort_t *serialPort)
systemReset();
break;
case MSP_REBOOT_BOOTLOADER:
systemResetToBootloader();
case MSP_REBOOT_BOOTLOADER_ROM:
systemResetToBootloader(BOOTLOADER_REQUEST_ROM);
break;
#if defined(USE_USB_MSC)
@ -279,6 +280,12 @@ static void mspRebootFn(serialPort_t *serialPort)
}
break;
#endif
#if defined(USE_FLASH_BOOT_LOADER)
case MSP_REBOOT_BOOTLOADER_FLASH:
systemResetToBootloader(BOOTLOADER_REQUEST_FLASH);
break;
#endif
default:
return;