summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-05-16 11:53:23 +0100
committerLeah Rowe <leah@libreboot.org>2023-05-16 23:11:35 +0100
commit8b851258e240c1dfb7f738f82cbd139dc2612700 (patch)
tree3cf3fb070c6a85618d6eae596b5a04385c13c6e9 /util
parent6c1bf756d341be3560274bebe46b7d2715991dd9 (diff)
util/spkmodem_recv: Rename functions for clarity
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util')
-rw-r--r--util/spkmodem_recv/spkmodem-recv.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/util/spkmodem_recv/spkmodem-recv.c b/util/spkmodem_recv/spkmodem-recv.c
index d239e9c1..1ba402ca 100644
--- a/util/spkmodem_recv/spkmodem-recv.c
+++ b/util/spkmodem_recv/spkmodem-recv.c
@@ -28,8 +28,8 @@ int pos, f1, f2;
int amplitude = 0;
int lp = 0;
-void read_sample(void);
-void print_chars(void);
+void fetch_sample(void);
+void handle_audio(void);
int
main(int argc, char *argv[])
@@ -37,13 +37,13 @@ main(int argc, char *argv[])
(void)argc; (void)argv;
while (!feof(stdin))
- print_chars();
+ handle_audio();
return errno;
}
void
-print_chars(void)
+handle_audio(void)
{
static int ascii_bit = 7;
static char ascii = 0;
@@ -61,7 +61,7 @@ print_chars(void)
if (f2 <= FREQ_SEP_MIN || f2 >= FREQ_SEP_MAX
|| f1 <= FREQ_DATA_MIN || f1 >= FREQ_DATA_MAX) {
- read_sample();
+ fetch_sample();
return;
}
#if DEBUG
@@ -86,11 +86,11 @@ print_chars(void)
lp = 0;
llp = 0;
for (int i = 0; i < SAMPLES_PER_FRAME; i++)
- read_sample();
+ fetch_sample();
}
void
-read_sample(void)
+fetch_sample(void)
{
amplitude -= abs(frame[ringpos]);
f1 -= pulse[ringpos];