diff rvinterf/tmsh/l1cmd.c @ 128:d76970e1895e

fc-tmsh: ttw command implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 19 Feb 2017 16:05:21 +0000
parents 777172bcea3c
children bf610ca0f1b1
line wrap: on
line diff
--- a/rvinterf/tmsh/l1cmd.c	Sun Feb 19 15:59:56 2017 +0000
+++ b/rvinterf/tmsh/l1cmd.c	Sun Feb 19 16:05:21 2017 +0000
@@ -453,3 +453,24 @@
 	send_etm_cmd(cmdpkt, 3);
 	return(0);
 }
+
+cmd_ttw(argc, argv)
+	char **argv;
+{
+	unsigned index;
+	u_char cmdpkt[36];
+	int rc;
+
+	index = strtoul(argv[1], 0, 0);
+	if (index >= 16) {
+		printf("error: index out of range\n");
+		return(ERROR_USAGE);
+	}
+	cmdpkt[1] = TX_TEMPLATE_WRITE;
+	cmdpkt[2] = index;
+	rc = read_tx_ramp_template(argv[2], cmdpkt + 3);
+	if (rc)
+		return(rc);
+	send_etm_cmd(cmdpkt, 34);
+	return(0);
+}