Init
This commit is contained in:
commit
f4cf0ad8ee
|
|
@ -0,0 +1,14 @@
|
||||||
|
//
|
||||||
|
// Created by xemon on 14.11.22.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef UVEOS_ON_NATION_CMSISREBOOT_H
|
||||||
|
#define UVEOS_ON_NATION_CMSISREBOOT_H
|
||||||
|
|
||||||
|
#include "CliCmd.h"
|
||||||
|
|
||||||
|
uint8_t CliCmd_CmsisReboot(void *env, tCliCmd *cli);
|
||||||
|
|
||||||
|
uint8_t CliCmd_rebootHelp(tCliCmd *cli);
|
||||||
|
|
||||||
|
#endif //UVEOS_ON_NATION_CMSISREBOOT_H
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
//
|
||||||
|
// Created by xemon on 14.11.22.
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "CliCmd/CmsisReboot.h"
|
||||||
|
#include CMSIS_device_header
|
||||||
|
|
||||||
|
uint8_t CliCmd_CmsisReboot(void *env, tCliCmd *cli) {
|
||||||
|
CliCmd_PrintLnStatic(cli, "THIS MODE REBOOTING DEVISES");
|
||||||
|
CliCmd_PrintLnStatic(cli, "Reboot devises? Yes/No");
|
||||||
|
CliCmd_WaitLine(cli);
|
||||||
|
|
||||||
|
if (CliCmd_RxStartsWithStatic(cli, "Yes")) {
|
||||||
|
CliCmd_PrintLnStatic(cli, "Devises rebooting...");
|
||||||
|
NVIC_SystemReset();
|
||||||
|
} else {
|
||||||
|
CliCmd_PrintLnStatic(cli, "Cancel reboot");
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
//
|
||||||
|
// Created by xemon on 22.12.22.
|
||||||
|
//
|
||||||
|
#include "CliCmd/CmsisReboot.h"
|
||||||
|
|
||||||
|
uint8_t CliCmd_rebootHelp(tCliCmd *cli) {
|
||||||
|
CliCmd_PrintLnStatic(cli, " access sub commands:");
|
||||||
|
CliCmd_PrintLnStatic(cli, " command [ Yes ] rebooting process");
|
||||||
|
CliCmd_PrintLnStatic(cli, " command [ No ] channel as exit ib base mode");
|
||||||
|
CliCmd_PrintLnStatic(cli, "");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"dep": [
|
||||||
|
{
|
||||||
|
"type": "git",
|
||||||
|
"provider": "Smart_Components_Aurus",
|
||||||
|
"repo": "CmsisCore5"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "git",
|
||||||
|
"provider": "Smart_Components_Aurus",
|
||||||
|
"repo": "CliCmd"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"cmake": {
|
||||||
|
"inc_dirs": [
|
||||||
|
"Inc"
|
||||||
|
],
|
||||||
|
"srcs": [
|
||||||
|
"Src/**.c"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue