util/spkmodem-recv: rename function for clarity
Signed-off-by: Leah Rowe <leah@libreboot.org>fsdg20230625
parent
17cd0af9c1
commit
b508245451
|
@ -43,7 +43,7 @@ int ringpos, debug, freq_data, freq_separator, sample_count, ascii_bit = 7;
|
||||||
char ascii = 0;
|
char ascii = 0;
|
||||||
|
|
||||||
void handle_audio(void);
|
void handle_audio(void);
|
||||||
void fetch_sample(void);
|
void decode_pulse(void);
|
||||||
int set_ascii_bit(void);
|
int set_ascii_bit(void);
|
||||||
void print_char(void);
|
void print_char(void);
|
||||||
void print_stats(void);
|
void print_stats(void);
|
||||||
|
@ -74,7 +74,7 @@ handle_audio(void)
|
||||||
sample_count = reset_char();
|
sample_count = reset_char();
|
||||||
if ((freq_separator <= FREQ_SEP_MIN) || (freq_separator >= FREQ_SEP_MAX)
|
if ((freq_separator <= FREQ_SEP_MIN) || (freq_separator >= FREQ_SEP_MAX)
|
||||||
|| (freq_data <= FREQ_DATA_MIN) || (freq_data >= FREQ_DATA_MAX)) {
|
|| (freq_data <= FREQ_DATA_MIN) || (freq_data >= FREQ_DATA_MAX)) {
|
||||||
fetch_sample();
|
decode_pulse();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,11 +82,11 @@ handle_audio(void)
|
||||||
print_char();
|
print_char();
|
||||||
sample_count = 0;
|
sample_count = 0;
|
||||||
for (int sample = 0; sample < SAMPLES_PER_FRAME; sample++)
|
for (int sample = 0; sample < SAMPLES_PER_FRAME; sample++)
|
||||||
fetch_sample();
|
decode_pulse();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
fetch_sample(void)
|
decode_pulse(void)
|
||||||
{
|
{
|
||||||
int next_ringpos = (ringpos + SAMPLES_PER_FRAME) % MAX_SAMPLES;
|
int next_ringpos = (ringpos + SAMPLES_PER_FRAME) % MAX_SAMPLES;
|
||||||
freq_data -= pulse[ringpos];
|
freq_data -= pulse[ringpos];
|
||||||
|
|
Loading…
Reference in New Issue