changeset 158:86e4d8aea021

fc-tmsh: aur command implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 17 Mar 2017 06:46:42 +0000
parents f78d696ffb81
children 8fac4aaec230
files rvinterf/tmsh/audiocmd.c rvinterf/tmsh/usercmd.c
diffstat 2 files changed, 21 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/rvinterf/tmsh/audiocmd.c	Fri Mar 17 06:02:17 2017 +0000
+++ b/rvinterf/tmsh/audiocmd.c	Fri Mar 17 06:46:42 2017 +0000
@@ -52,6 +52,24 @@
 	return(0);
 }
 
+cmd_audio_read(argc, argv)
+	char **argv;
+{
+	unsigned param;
+	u_char cmdpkt[5];
+
+	param = strtoul(argv[1], 0, 0);
+	if (param > 255) {
+		printf("error: argument is too large\n");
+		return(ERROR_USAGE);
+	}
+	cmdpkt[1] = ETM_AUDIO;
+	cmdpkt[2] = 'R';
+	cmdpkt[3] = param;
+	send_etm_cmd(cmdpkt, 3);
+	return(0);
+}
+
 static struct cmdtab {
 	char *cmd;
 	int minargs;
@@ -59,6 +77,7 @@
 	int (*func)();
 } audio_cmds[] = {
 	{"load", 1, 1, cmd_audio_load},
+	{"read", 1, 1, cmd_audio_read},
 	{"save", 1, 1, cmd_audio_save},
 	{0, 0, 0, 0}
 };
--- a/rvinterf/tmsh/usercmd.c	Fri Mar 17 06:02:17 2017 +0000
+++ b/rvinterf/tmsh/usercmd.c	Fri Mar 17 06:46:42 2017 +0000
@@ -16,6 +16,7 @@
 extern int cmd_abbw();
 extern int cmd_audio();
 extern int cmd_audio_load();
+extern int cmd_audio_read();
 extern int cmd_audio_save();
 extern int cmd_check_ffs1();
 extern int cmd_dieid();
@@ -74,6 +75,7 @@
 	{"abbw", 3, 3, cmd_abbw},
 	{"audio", 2, 2, cmd_audio},
 	{"aul", 1, 1, cmd_audio_load},
+	{"aur", 1, 1, cmd_audio_read},
 	{"aus", 1, 1, cmd_audio_save},
 	{"check-ffs1", 0, 0, cmd_check_ffs1},
 	{"dieid", 0, 0, cmd_dieid},