X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fnet%2Fafsk.c;h=d58758cd8397031613a1e8b9395f7421b5edc241;hb=56f2c002c50338f23f1b969ba51a43b0eb24f3da;hp=a87754416d25872346baef3acac6e90581183639;hpb=3fc90c803d609a1444ceeb93432a814b206cbadc;p=bertos.git diff --git a/bertos/net/afsk.c b/bertos/net/afsk.c index a8775441..d58758cd 100644 --- a/bertos/net/afsk.c +++ b/bertos/net/afsk.c @@ -32,8 +32,7 @@ * * \brief AFSK1200 modem. * - * \version $Id$ - * \author Francesco Sacchi + * \author Francesco Sacchi */ #include "afsk.h" @@ -106,11 +105,7 @@ INLINE uint8_t sin_sample(uint16_t idx) uint16_t new_idx = idx % (SIN_LEN / 2); new_idx = (new_idx >= (SIN_LEN / 4)) ? (SIN_LEN / 2 - new_idx - 1) : new_idx; - #if CPU_HARVARD - uint8_t data = pgm_read_char(&sin_table[new_idx]); - #else - uint8_t data = sin_table[new_idx]; - #endif + uint8_t data = pgm_read8(&sin_table[new_idx]); return (idx >= (SIN_LEN / 2)) ? (255 - data) : data; } @@ -127,7 +122,7 @@ INLINE uint8_t sin_sample(uint16_t idx) * \param bit current bit to be parsed. * \param fifo FIFO buffer used to push characters. * - * \return True if all is ok, False if the fifo is full. + * \return true if all is ok, false if the fifo is full. */ static bool hdlc_parse(Hdlc *hdlc, bool bit, FIFOBuffer *fifo) { @@ -477,7 +472,7 @@ static size_t afsk_read(KFile *fd, void *_buf, size_t size) ticks_t start = timer_clock(); #endif - while (fifo_isempty_locked(&af->rx_fifo)); + while (fifo_isempty_locked(&af->rx_fifo)) { cpu_relax(); #if CONFIG_AFSK_RXTIMEOUT != -1