FreeCalypso > hg > fc-pcm-if
annotate sw/mcsi-rx/robe_out.c @ 16:f422d19c0118 default tip
fc-mcsi-rxtx: fix bug in PCM sample Rx
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 29 Oct 2024 01:41:33 +0000 |
parents | de85c3680d7e |
children |
rev | line source |
---|---|
3
de85c3680d7e
sw: fc-mcsi-rx program put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
de85c3680d7e
sw: fc-mcsi-rx program put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * The function in this module is responsible for writing "robe" output. |
de85c3680d7e
sw: fc-mcsi-rx program put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 */ |
de85c3680d7e
sw: fc-mcsi-rx program put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 |
de85c3680d7e
sw: fc-mcsi-rx program put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 #include <sys/types.h> |
de85c3680d7e
sw: fc-mcsi-rx program put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 #include <stdio.h> |
de85c3680d7e
sw: fc-mcsi-rx program put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 |
de85c3680d7e
sw: fc-mcsi-rx program put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 extern FILE *out_binfile; |
de85c3680d7e
sw: fc-mcsi-rx program put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 |
de85c3680d7e
sw: fc-mcsi-rx program put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 process_rx_block(buf) |
de85c3680d7e
sw: fc-mcsi-rx program put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 u_char *buf; |
de85c3680d7e
sw: fc-mcsi-rx program put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 { |
de85c3680d7e
sw: fc-mcsi-rx program put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 unsigned n; |
de85c3680d7e
sw: fc-mcsi-rx program put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 u_char *sp; |
de85c3680d7e
sw: fc-mcsi-rx program put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 |
de85c3680d7e
sw: fc-mcsi-rx program put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 sp = buf; |
de85c3680d7e
sw: fc-mcsi-rx program put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 for (n = 0; n < 160; n++) { |
de85c3680d7e
sw: fc-mcsi-rx program put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 putc(sp[1], out_binfile); |
de85c3680d7e
sw: fc-mcsi-rx program put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 putc(sp[0], out_binfile); |
de85c3680d7e
sw: fc-mcsi-rx program put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 sp += 2; |
de85c3680d7e
sw: fc-mcsi-rx program put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 } |
de85c3680d7e
sw: fc-mcsi-rx program put together
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 } |