append reset dfu command and CONFIG -> ENTER DFU

This commit is contained in:
cho45 2019-09-06 20:46:39 +09:00
parent 496b41fa1c
commit 5e9756e4e0
5 changed files with 44 additions and 0 deletions

8
main.c
View file

@ -120,6 +120,14 @@ static void cmd_reset(BaseSequentialStream *chp, int argc, char *argv[])
(void)argc;
(void)argv;
if (argc == 1) {
if (strcmp(argv[0], "dfu") == 0) {
chprintf(chp, "Performing reset to DFU mode\r\n");
enter_dfu();
return;
}
}
chprintf(chp, "Performing reset\r\n");
rccEnableWWDG(FALSE);