Use new progmem API.
[bertos.git] / bertos / algo / crc_ccitt.h
index fd87c6a80ff68e02f4b15c001d3acb35f37394d5..240e6e1aeea621ea0e0a4d3f184572747881eed6 100644 (file)
@@ -55,11 +55,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]);
-#else
-       return (oldcrc >> 8) ^ crc_ccitt_tab[(oldcrc ^ c) & 0xff];
-#endif
+       return (oldcrc >> 8) ^ pgm_read16(&crc_ccitt_tab[(oldcrc ^ c) & 0xff]);
 }
 
 /** CRC-CCITT init value */