projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use prefix for the presets.
[bertos.git]
/
bertos
/
algo
/
crc_ccitt.h
diff --git
a/bertos/algo/crc_ccitt.h
b/bertos/algo/crc_ccitt.h
index 40e4a81d2b695b217a32e792f276f62a2e25c6f9..240e6e1aeea621ea0e0a4d3f184572747881eed6 100644
(file)
--- a/
bertos/algo/crc_ccitt.h
+++ b/
bertos/algo/crc_ccitt.h
@@
-34,7
+34,6
@@
*
* \note This algorithm is incompatible with the CRC16.
*
*
* \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"
* \author Francesco Sacchi <batt@develer.com>
*
* $WIZ$ module_name = "crc-ccitt"
@@
-56,11
+55,7
@@
extern const uint16_t crc_ccitt_tab[256];
*/
INLINE uint16_t updcrc_ccitt(uint8_t c, uint16_t oldcrc)
{
*/
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 */
}
/** CRC-CCITT init value */