application: add reset action
This commit is contained in:
parent
4a8bf5d2a1
commit
b2c823f858
|
@ -98,6 +98,7 @@ static void process_command(char* str)
|
|||
printf("l|led [on|off|toggle]\n");
|
||||
printf("s|self-test\n");
|
||||
printf("p|pin-test\n");
|
||||
printf("r|reset\n");
|
||||
} else if (0==strcmp(word,"l") || 0==strcmp(word,"led")) {
|
||||
word = strtok(NULL,delimiter);
|
||||
if (!word) {
|
||||
|
@ -148,6 +149,9 @@ static void process_command(char* str)
|
|||
} else {
|
||||
printf("pin :test aborted\n");
|
||||
}
|
||||
} else if (0==strcmp(word,"r") || 0==strcmp(word,"reset")) {
|
||||
scb_reset_system(); // reset device
|
||||
while (true); // wait for the reset to happen
|
||||
} else {
|
||||
goto error;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue