FreeCalypso > hg > ice1-trau-tester
changeset 9:e3d16d490ce2
pcm: implement dmw-on and dmw-off commands
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 23 Jun 2024 19:34:08 +0000 |
parents | 70aa8cbdbde9 |
children | 5cf7818a7d08 |
files | pcm/globals.h pcm/pcm_tx.c pcm/user_cmd.c |
diffstat | 3 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/pcm/globals.h Sun Jun 23 19:30:40 2024 +0000 +++ b/pcm/globals.h Sun Jun 23 19:34:08 2024 +0000 @@ -15,3 +15,5 @@ void cmd_record_stop(int argc, char **argv); void cmd_print_rx(int argc, char **argv); void cmd_pcm_fill(int argc, char **argv); +void cmd_dmw_on(int argc, char **argv); +void cmd_dmw_off(int argc, char **argv);
--- a/pcm/pcm_tx.c Sun Jun 23 19:30:40 2024 +0000 +++ b/pcm/pcm_tx.c Sun Jun 23 19:34:08 2024 +0000 @@ -76,3 +76,13 @@ goto inv_arg; pcm_fill_octet = val; } + +void cmd_dmw_on(int argc, char **argv) +{ + dmw_active = true; +} + +void cmd_dmw_off(int argc, char **argv) +{ + dmw_active = false; +}
--- a/pcm/user_cmd.c Sun Jun 23 19:30:40 2024 +0000 +++ b/pcm/user_cmd.c Sun Jun 23 19:34:08 2024 +0000 @@ -17,6 +17,8 @@ char *cmd; void (*func)(int argc, char **argv); } cmdtab[] = { + {"dmw-on", cmd_dmw_on}, + {"dmw-off", cmd_dmw_off}, {"pcm-fill", cmd_pcm_fill}, {"print-rx", cmd_print_rx}, {"record", cmd_record_start},