mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-06-29 19:32:34 +00:00
feat(core/prodtest): add reboot to bootloader command
[no changelog]
This commit is contained in:
parent
5c3cf0004e
commit
a6fda4d814
@ -113,6 +113,17 @@ reboot
|
||||
OK
|
||||
```
|
||||
|
||||
|
||||
### reboot-to-bootloader
|
||||
This command initiates device reboot to bootlaoder.
|
||||
|
||||
Example:
|
||||
```
|
||||
reboot-to-bootloader
|
||||
OK
|
||||
```
|
||||
|
||||
|
||||
### boardloader-version
|
||||
Retrieves the version of the boardloader. The command returns `OK` followed by the version in the format `<major>.<minor>.<patch>`.
|
||||
|
||||
|
@ -36,6 +36,19 @@ static void prodtest_reboot(cli_t* cli) {
|
||||
reboot_device();
|
||||
}
|
||||
|
||||
static void prodtest_reboot_to_bootloader(cli_t* cli) {
|
||||
if (cli_arg_count(cli) > 0) {
|
||||
cli_error_arg_count(cli);
|
||||
return;
|
||||
}
|
||||
|
||||
cli_ok(cli, "");
|
||||
|
||||
// Reboot with a delay to allow the response to be sent
|
||||
systick_delay_ms(1000);
|
||||
reboot_to_bootloader();
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
|
||||
PRODTEST_CLI_CMD(
|
||||
@ -45,4 +58,11 @@ PRODTEST_CLI_CMD(
|
||||
.args = ""
|
||||
);
|
||||
|
||||
PRODTEST_CLI_CMD(
|
||||
.name = "reboot-to-bootloader",
|
||||
.func = prodtest_reboot_to_bootloader,
|
||||
.info = "Reboot the device to bootloader",
|
||||
.args = ""
|
||||
);
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user