LS command

This commit is contained in:
nino-porcino 2022-02-11 14:48:53 +01:00
parent c16e0677df
commit 1a6533bd4a
2 changed files with 7 additions and 5 deletions

View File

@ -1,5 +1,5 @@
void comando_dir() {
send_byte_to_MCU(CMD_DIR);
void comando_dir(byte cmd) {
send_byte_to_MCU(cmd);
if(TIMEOUT) return;
print_string_response();
}

View File

@ -30,7 +30,8 @@ const byte CMD_DUMP = 8;
const byte CMD_JMP = 9;
const byte CMD_BAS = 10;
const byte CMD_DEL = 11;
const byte CMD_EXIT = 12;
const byte CMD_LS = 12;
const byte CMD_EXIT = 13;
// the list of recognized commands
byte *DOS_COMMANDS[] = {
@ -46,6 +47,7 @@ byte *DOS_COMMANDS[] = {
"JMP",
"BAS",
"DEL",
"LS",
"EXIT"
};
@ -193,8 +195,8 @@ void console() {
}
comando_write();
}
else if(cmd == CMD_DIR) {
comando_dir();
else if(cmd == CMD_DIR || cmd == CMD_LS) {
comando_dir(cmd);
}
else if(cmd == CMD_TIME) {
get_token(hex1, 4); // parse hex timeout value