FreeCalypso > hg > ice1-trau-tester
diff pcm-br/showbuf.c @ 35:499d065ee591
new program itt-pcm-br (PCM bridge)
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 28 Aug 2024 05:00:38 +0000 |
parents | pcm/record_ctrl.c@631f2db08538 |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pcm-br/showbuf.c Wed Aug 28 05:00:38 2024 +0000 @@ -0,0 +1,37 @@ +/* + * Here we implement stdin commands that display current instantaneous + * state of each read channel. + */ + +#include <stdint.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> + +#include <osmocom/core/select.h> + +#include "globals.h" + +void cmd_show_a(int argc, char **argv) +{ + int i, j, off; + + off = 0; + for (i = 0; i < 10; i++) { + for (j = 0; j < 16; j++) + printf(" %02X", readbuf_a[off++]); + putchar('\n'); + } +} + +void cmd_show_b(int argc, char **argv) +{ + int i, j, off; + + off = 0; + for (i = 0; i < 10; i++) { + for (j = 0; j < 16; j++) + printf(" %02X", readbuf_b[off++]); + putchar('\n'); + } +}