diff options
author | Leah Rowe <leah@libreboot.org> | 2023-05-16 13:35:37 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2023-05-16 23:11:35 +0100 |
commit | c0f2bf307723cf91a2a9274f616fd72f4bf8bc94 (patch) | |
tree | f0a498ab0d9ae34cb16a94fe06ff6ffc9e53d021 /util/spkmodem_recv | |
parent | 5d03598b990a638a12ede0f08467bcfda43647d7 (diff) |
util/spkmodem_recv: Move global variable: pulse
It is only used by a single function.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/spkmodem_recv')
-rw-r--r-- | util/spkmodem_recv/spkmodem-recv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/spkmodem_recv/spkmodem-recv.c b/util/spkmodem_recv/spkmodem-recv.c index 0614d103..2f2ff684 100644 --- a/util/spkmodem_recv/spkmodem-recv.c +++ b/util/spkmodem_recv/spkmodem-recv.c @@ -22,7 +22,6 @@ #define FLUSH_TIMEOUT 1 signed short frame[2 * SAMPLES_PER_FRAME]; -signed short pulse[2 * SAMPLES_PER_FRAME]; int f1, f2; int lp = 0; int ascii_bit = 7; @@ -76,6 +75,7 @@ void fetch_sample(void) { static int ringpos = 0; + static signed short pulse[2 * SAMPLES_PER_FRAME]; f1 -= pulse[ringpos]; f1 += pulse[(ringpos + SAMPLES_PER_FRAME) % (2 * SAMPLES_PER_FRAME)]; |