changeset 6:d8cbc7a383eb

fc-cmu200d: signal-gen-off implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 21 May 2017 07:52:11 +0000
parents 493987a4527e
children 948031e6de50
files cmu200/dispatch.c cmu200/signalgen.c
diffstat 2 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/cmu200/dispatch.c	Sun May 21 07:48:54 2017 +0000
+++ b/cmu200/dispatch.c	Sun May 21 07:52:11 2017 +0000
@@ -10,6 +10,7 @@
 extern char *client_cmd_fields[];
 extern int client_cmd_nfields;
 
+extern int cmd_signal_gen_off();
 extern int cmd_signal_gen_sine();
 extern int cmd_signal_gen_setup();
 
@@ -24,6 +25,7 @@
 	int	(*handler)();
 } cmdtab[] = {
 	{"ping", cmd_ping},
+	{"signal-gen-off", cmd_signal_gen_off},
 	{"signal-gen-sine", cmd_signal_gen_sine},
 	{"signal-gen-setup", cmd_signal_gen_setup},
 	{0, 0}
--- a/cmu200/signalgen.c	Sun May 21 07:48:54 2017 +0000
+++ b/cmu200/signalgen.c	Sun May 21 07:52:11 2017 +0000
@@ -68,3 +68,10 @@
 	send_socket_response("+OK\n");
 	return(0);
 }
+
+cmd_signal_gen_off()
+{
+	stop_signal_gen();
+	send_socket_response("+OK\n");
+	return(0);
+}