X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcore%2Fao_freq.c;h=12496f6fdf785a2d94f5fac84c239092ede0e004;hb=2ecb6a8276b2ce40d2a4da586dbc17581cfda26d;hp=67b0b037bdcc9defd2b2bd44f38fe7e6aea4a0a0;hpb=7dd1d62676c1e605fe69a4c0acfe7638c6b79aa5;p=fw%2Faltos diff --git a/src/core/ao_freq.c b/src/core/ao_freq.c index 67b0b037..12496f6f 100644 --- a/src/core/ao_freq.c +++ b/src/core/ao_freq.c @@ -25,10 +25,15 @@ * frequency, and updating the radio setting along the way */ -int32_t ao_freq_to_set(int32_t freq, int32_t cal) { - __pdata int32_t set = 0; - uint8_t neg = 0; - __pdata int32_t error = -434550 / 2; +int32_t ao_freq_to_set(int32_t freq, int32_t cal) __reentrant +{ + static __pdata int32_t set; + static __pdata uint8_t neg; + static __pdata int32_t error; + + set = 0; + neg = 0; + error = -434550 / 2; if ((freq -= 434550) < 0) { neg = 1;