FreeCalypso > hg > fc-pcm-if
diff sw/mcsi-rxtx/rx_samples.c @ 10:c1d9b5d128f5
fc-mcsi-rxtx: implement print-rx command
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 28 Oct 2024 06:11:23 +0000 |
parents | 62579cfff4fc |
children | 315428573a25 |
line wrap: on
line diff
--- a/sw/mcsi-rxtx/rx_samples.c Mon Oct 28 06:02:04 2024 +0000 +++ b/sw/mcsi-rxtx/rx_samples.c Mon Oct 28 06:11:23 2024 +0000 @@ -22,3 +22,24 @@ rx_pcm_samples[n] = samp; } } + +void +cmd_print_rx() +{ + unsigned i, j, n; + + if (!is_active) { + printf("Rx is not active\n"); + return; + } + n = 0; + for (i = 0; i < 10; i++) { + for (j = 0; j < 16; j++) { + printf("%04x", rx_pcm_samples[n++]); + if (j == 15) + putchar('\n'); + else + putchar(' '); + } + } +}