FreeCalypso > hg > freecalypso-tools
changeset 167:6e4120cdb456
fc-tmsh: auw command sending implemented
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 19 Mar 2017 18:02:07 +0000 |
parents | 2e1be0fc150e |
children | 7b1624cdc9c0 |
files | rvinterf/tmsh/audiocmd.c rvinterf/tmsh/usercmd.c |
diffstat | 2 files changed, 28 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/rvinterf/tmsh/audiocmd.c Sun Mar 19 17:17:57 2017 +0000 +++ b/rvinterf/tmsh/audiocmd.c Sun Mar 19 18:02:07 2017 +0000 @@ -69,3 +69,29 @@ send_etm_cmd(cmdpkt, 3); return(0); } + +cmd_auw(argc, argv) + char **argv; +{ + u32 param, v; + u_char cmdpkt[MAX_PKT_TO_TARGET]; + int di; + char **ap; + + param = strtoul(argv[1], 0, 0); + if (param > 255) { + printf("error: parameter index argument is too large\n"); + return(ERROR_USAGE); + } + cmdpkt[1] = ETM_AUDIO; + cmdpkt[2] = 'W'; + cmdpkt[3] = param; + di = 4; + for (ap = argv + 2; *ap; ap++) { + v = strtol(*ap, 0, 0); + cmdpkt[di++] = v; + cmdpkt[di++] = v >> 8; + } + send_etm_cmd(cmdpkt, di - 1); + return(0); +}
--- a/rvinterf/tmsh/usercmd.c Sun Mar 19 17:17:57 2017 +0000 +++ b/rvinterf/tmsh/usercmd.c Sun Mar 19 18:02:07 2017 +0000 @@ -17,6 +17,7 @@ extern int cmd_audio_load(); extern int cmd_audio_read(); extern int cmd_audio_save(); +extern int cmd_auw(); extern int cmd_check_ffs1(); extern int cmd_dieid(); extern int cmd_ffs2(); @@ -75,6 +76,7 @@ {"aul", 1, 1, cmd_audio_load}, {"aur", 1, 1, cmd_audio_read}, {"aus", 1, 1, cmd_audio_save}, + {"auw", 2, 126, cmd_auw}, {"check-ffs1", 0, 0, cmd_check_ffs1}, {"dieid", 0, 0, cmd_dieid}, {"etmpkt", 1, 253, cmd_tmpkt},