[FL-942] remove 3s delays in reset, dfu and poweroff CLI commands (#362)
This commit is contained in:
parent
f4f8ef59fd
commit
1ebbd2c266
@ -144,21 +144,15 @@ void power_free(Power* power) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void power_cli_poweroff(string_t args, void* context) {
|
void power_cli_poweroff(string_t args, void* context) {
|
||||||
printf("Poweroff in 3 seconds");
|
|
||||||
osDelay(3000);
|
|
||||||
api_hal_power_off();
|
api_hal_power_off();
|
||||||
}
|
}
|
||||||
|
|
||||||
void power_cli_reset(string_t args, void* context) {
|
void power_cli_reset(string_t args, void* context) {
|
||||||
printf("NVIC System Reset in 3 seconds");
|
|
||||||
osDelay(3000);
|
|
||||||
NVIC_SystemReset();
|
NVIC_SystemReset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void power_cli_dfu(string_t args, void* context) {
|
void power_cli_dfu(string_t args, void* context) {
|
||||||
printf("NVIC System Reset to DFU mode in 3 seconds");
|
|
||||||
api_hal_boot_set_mode(ApiHalBootModeDFU);
|
api_hal_boot_set_mode(ApiHalBootModeDFU);
|
||||||
osDelay(3000);
|
|
||||||
NVIC_SystemReset();
|
NVIC_SystemReset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user