FreeCalypso > hg > fc-pcm-if
comparison sw/mcsi-rxtx/rx_samples.c @ 7:8a386263dd51
fc-mcsi-rxtx skeleton put together
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Mon, 28 Oct 2024 01:44:28 +0000 |
| parents | sw/mcsi-rx/robe_out.c@de85c3680d7e |
| children | 62579cfff4fc |
comparison
equal
deleted
inserted
replaced
| 6:a10657f8024e | 7:8a386263dd51 |
|---|---|
| 1 /* | |
| 2 * In this module we handle PCM samples received from MCSI via the FPGA. | |
| 3 */ | |
| 4 | |
| 5 #include <sys/types.h> | |
| 6 #include <stdio.h> | |
| 7 | |
| 8 u_short rx_pcm_samples[160]; | |
| 9 | |
| 10 process_rx_block(buf) | |
| 11 u_char *buf; | |
| 12 { | |
| 13 unsigned n, samp; | |
| 14 u_char *sp; | |
| 15 | |
| 16 sp = buf; | |
| 17 for (n = 0; n < 160; n++) { | |
| 18 samp = ((unsigned) sp[1] << 8) | ((unsigned) sp[0]); | |
| 19 rx_pcm_samples[n] = samp; | |
| 20 } | |
| 21 } |
