Allow to exit from bootloader mode without flasing

Useful for when you hit PINE+FN+F and don't want to flash a firmware.

./kbprog-usb reset
This commit is contained in:
Ondrej Jirman 2021-06-15 09:22:31 +02:00
parent e59f647d83
commit a8c9398567

View File

@ -693,6 +693,11 @@ int main(int ac, char* av[])
{ {
bootloader_fd = bootloader_open(); bootloader_fd = bootloader_open();
if (ac == 2 && !strcmp(av[1], "reset")) {
cmd_software_reset();
return 0;
}
cmd_abort(); cmd_abort();
printf("FW=0x%04hx BOOT=0x%04hx\n", cmd_get_ver_fw(), cmd_get_ver_spec()); printf("FW=0x%04hx BOOT=0x%04hx\n", cmd_get_ver_fw(), cmd_get_ver_spec());