changeset 129:bf610ca0f1b1

fc-tmsh: ttr command implemented, ttw command hooked in
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 19 Feb 2017 16:10:25 +0000
parents d76970e1895e
children d3e2b619ff89
files rvinterf/tmsh/l1cmd.c rvinterf/tmsh/usercmd.c
diffstat 2 files changed, 21 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/rvinterf/tmsh/l1cmd.c	Sun Feb 19 16:05:21 2017 +0000
+++ b/rvinterf/tmsh/l1cmd.c	Sun Feb 19 16:10:25 2017 +0000
@@ -474,3 +474,20 @@
 	send_etm_cmd(cmdpkt, 34);
 	return(0);
 }
+
+cmd_ttr(argc, argv)
+	char **argv;
+{
+	unsigned index;
+	u_char cmdpkt[4];
+
+	index = strtoul(argv[1], 0, 0);
+	if (index >= 16) {
+		printf("error: index out of range\n");
+		return(ERROR_USAGE);
+	}
+	cmdpkt[1] = TX_TEMPLATE_READ;
+	cmdpkt[2] = index;
+	send_etm_cmd(cmdpkt, 2);
+	return(0);
+}
--- a/rvinterf/tmsh/usercmd.c	Sun Feb 19 16:05:21 2017 +0000
+++ b/rvinterf/tmsh/usercmd.c	Sun Feb 19 16:10:25 2017 +0000
@@ -38,6 +38,8 @@
 extern int cmd_tminit();
 extern int cmd_tmpkt();
 extern int cmd_tms();
+extern int cmd_ttr();
+extern int cmd_ttw();
 extern int cmd_txpr();
 extern int cmd_txpw();
 extern int cmd_version();
@@ -86,6 +88,8 @@
 	{"tminit", 0, 0, cmd_tminit},
 	{"tmpkt", 1, 253, cmd_tmpkt},
 	{"tms", 1, 1, cmd_tms},
+	{"ttr", 1, 1, cmd_ttr},
+	{"ttw", 2, 2, cmd_ttw},
 	{"txpr", 1, 1, cmd_txpr},
 	{"txpw", 2, 2, cmd_txpw},
 	{"version", 1, 1, cmd_version},