# HG changeset patch # User Mychaela Falconia # Date 1684902639 0 # Node ID 74930218c2700474f548b09fc4d4bcba84ea7108 # Parent 06f96627ac9ad54c767f630d4790cb9102cd20e3 rvinterf TM log: decode ETM_AUDIO commands diff -r 06f96627ac9a -r 74930218c270 rvinterf/lowlevel/rviftmode.c --- 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