*
* \note This algorithm is incompatible with the CRC16.
*
- * \version $Id: crc.h 2771 2009-08-06 07:01:06Z lottaviano $
* \author Francesco Sacchi <batt@develer.com>
*
* $WIZ$ module_name = "crc-ccitt"
*/
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 */