util/spkmodem_recv: Re-order functions for clarity

print_char() is referenced last, so declare it last.

Signed-off-by: Leah Rowe <leah@libreboot.org>
fsdg20230625
Leah Rowe 2023-05-16 13:22:09 +01:00
parent 93cc664254
commit a0abcb9f53
1 changed files with 24 additions and 24 deletions

View File

@ -74,30 +74,6 @@ handle_audio(void)
fetch_sample();
}
void
print_char(void)
{
#if DEBUG
long stdin_pos = 0;
if ((stdin_pos = ftell(stdin)) == -1)
err(errno, NULL);
printf ("%d %d %d @%ld\n", f1, f2, FREQ_DATA_THRESHOLD,
stdin_pos - sizeof(frame));
#endif
if (f1 < FREQ_DATA_THRESHOLD)
ascii |= (1 << ascii_bit);
ascii_bit--;
if (ascii_bit < 0) {
#if DEBUG
printf("<%c, %x>", ascii, ascii);
#else
printf("%c", ascii);
#endif
ascii_bit = 7;
ascii = 0;
}
}
void
fetch_sample(void)
{
@ -122,3 +98,27 @@ fetch_sample(void)
ringpos %= 2 * SAMPLES_PER_FRAME;
lp++;
}
void
print_char(void)
{
#if DEBUG
long stdin_pos = 0;
if ((stdin_pos = ftell(stdin)) == -1)
err(errno, NULL);
printf ("%d %d %d @%ld\n", f1, f2, FREQ_DATA_THRESHOLD,
stdin_pos - sizeof(frame));
#endif
if (f1 < FREQ_DATA_THRESHOLD)
ascii |= (1 << ascii_bit);
ascii_bit--;
if (ascii_bit < 0) {
#if DEBUG
printf("<%c, %x>", ascii, ascii);
#else
printf("%c", ascii);
#endif
ascii_bit = 7;
ascii = 0;
}
}