X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=bertos%2Falgo%2Fcrc_ccitt.h;h=40e4a81d2b695b217a32e792f276f62a2e25c6f9;hb=731bf89d899933871c9b42f84d781660b246f64f;hp=83f1454821404ce9e4fa172fb0bda8a4ea71cccd;hpb=cf5af2b25de263a964bf29a7465cdfe536d32e59;p=bertos.git diff --git a/bertos/algo/crc_ccitt.h b/bertos/algo/crc_ccitt.h index 83f14548..40e4a81d 100644 --- a/bertos/algo/crc_ccitt.h +++ b/bertos/algo/crc_ccitt.h @@ -57,7 +57,7 @@ extern const uint16_t crc_ccitt_tab[256]; INLINE uint16_t updcrc_ccitt(uint8_t c, uint16_t oldcrc) { #if CPU_HARVARD - return (oldcrc >> 8) ^ pgm_read_uint16_t(crc_ccitt_tab[(oldcrc ^ c) & 0xff]); + return (oldcrc >> 8) ^ pgm_read_uint16_t(&crc_ccitt_tab[(oldcrc ^ c) & 0xff]); #else return (oldcrc >> 8) ^ crc_ccitt_tab[(oldcrc ^ c) & 0xff]; #endif