FreeCalypso > hg > freecalypso-tools
changeset 938:74930218c270
rvinterf TM log: decode ETM_AUDIO commands
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 24 May 2023 04:30:39 +0000 |
parents | 06f96627ac9a |
children | 4d2e6a2dd1a1 |
files | rvinterf/lowlevel/rviftmode.c |
diffstat | 1 files changed, 20 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/rvinterf/lowlevel/rviftmode.c Wed May 24 04:25:47 2023 +0000 +++ b/rvinterf/lowlevel/rviftmode.c Wed May 24 04:30:39 2023 +0000 @@ -207,8 +207,26 @@ unsigned pktlen; char *outbuf; { - /* classification code to be filled */ - strcpy(outbuf, "ETM_AUDIO"); + if (pktlen < 4) { + strcpy(outbuf, "ETM_AUDIO runt"); + return; + } + switch (pkt[2]) { + case 'L': + strcpy(outbuf, "aul"); + return; + case 'S': + strcpy(outbuf, "aus"); + return; + case 'R': + strcpy(outbuf, "aur"); + return; + case 'W': + strcpy(outbuf, "auw"); + return; + default: + sprintf(outbuf, "ETM_AUDIO opcode 0x%02X", pkt[2]); + } } static void