From 8c8ddd767ca83ee28383128be9ba6462a66c5896 Mon Sep 17 00:00:00 2001 From: asterix Date: Tue, 17 Nov 2009 12:03:17 +0000 Subject: [PATCH] Fix #if check. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3115 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/algo/crc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bertos/algo/crc.h b/bertos/algo/crc.h index 3fb33812..c5c1eefd 100644 --- a/bertos/algo/crc.h +++ b/bertos/algo/crc.h @@ -71,7 +71,7 @@ extern const uint16_t crc16tab[256]; * \param c New octet (range 0-255) * \param oldcrc Previous CRC16 value (referenced twice, beware of side effects) */ -#if CPU_HARVARD && !(ARCH & defined(ARCH_BOOT)) +#if CPU_HARVARD && !(defined(ARCH_BOOT) && (ARCH & ARCH_BOOT)) #define UPDCRC16(c, oldcrc) (pgm_read_uint16_t(&crc16tab[((oldcrc) >> 8) ^ ((unsigned char)(c))]) ^ ((oldcrc) << 8)) #else #define UPDCRC16(c, oldcrc) ((crc16tab[((oldcrc) >> 8) ^ ((unsigned char)(c))]) ^ ((oldcrc) << 8)) @@ -86,7 +86,7 @@ extern const uint16_t crc16tab[256]; */ INLINE uint16_t updcrc16(uint8_t c, uint16_t oldcrc) { -#if CPU_HARVARD && !(ARCH & defined(ARCH_BOOT)) +#if CPU_HARVARD && !(defined(ARCH_BOOT) && (ARCH & ARCH_BOOT)) return pgm_read_uint16_t(&crc16tab[(oldcrc >> 8) ^ c]) ^ (oldcrc << 8); #else return crc16tab[(oldcrc >> 8) ^ c] ^ (oldcrc << 8); -- 2.25.1