X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Falgo%2Fcrc.c;h=c7444740144b4c77f14bd42079552ac6a83e2270;hb=5626c31e8564664172ded764dc701904302560d1;hp=96007addc049b3890a125709f16c643b3e189b27;hpb=46fb189becafd5e812ce9a58eb4c25b586b17771;p=bertos.git diff --git a/bertos/algo/crc.c b/bertos/algo/crc.c index 96007add..c7444740 100644 --- a/bertos/algo/crc.c +++ b/bertos/algo/crc.c @@ -33,7 +33,6 @@ * * \brief CRC table and support routines * - * \version $Id$ * \author Bernie Innocenti */ @@ -42,7 +41,13 @@ /** * crctab calculated by Mark G. Mendel, Network Systems Corporation */ -const uint16_t PROGMEM crc16tab[256] = { +#if CPU_HARVARD && !(defined(ARCH_BOOT) && (ARCH & ARCH_BOOT)) + #define CRC_TABLE const uint16_t PROGMEM crc16tab[256] +#else + #define CRC_TABLE const uint16_t crc16tab[256] +#endif + +CRC_TABLE = { 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7, 0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef, 0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6,