From: batt Date: Tue, 17 Nov 2009 11:32:06 +0000 (+0000) Subject: Change REVERSE macro name. X-Git-Tag: 2.4.0~83 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=57fd4b5988bc55a1eb532074d126ba264c025255;p=bertos.git Change REVERSE macro name. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3114 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/algo/reverse_test.c b/bertos/algo/reverse_test.c index 0e37d3fb..d09de0e9 100644 --- a/bertos/algo/reverse_test.c +++ b/bertos/algo/reverse_test.c @@ -79,8 +79,8 @@ int reverse_testRun(void) { for (int i = 0; i < 256; i++) { - kprintf("i [%02X], REVERSE(i) [%02X], reverse(i) [%02X]\n", i, REVERSE(i), reverse(i)); - ASSERT(reverse(i) == REVERSE(i)); + kprintf("i [%02X], REVERSE(i) [%02X], reverse(i) [%02X]\n", i, REVERSE_UINT8(i), reverse(i)); + ASSERT(reverse(i) == REVERSE_UINT8(i)); } return 0; } diff --git a/bertos/cfg/macros.h b/bertos/cfg/macros.h index 0dad9d39..4f77b21e 100644 --- a/bertos/cfg/macros.h +++ b/bertos/cfg/macros.h @@ -158,7 +158,7 @@ * Reverse the bits contained in b (LSB becomes the MSB and so on). * \note \a b is evaluated twice */ -#define REVERSE(b) \ +#define REVERSE_UINT8(b) \ ((uint8_t)((((b) * 0x0802UL & 0x22110UL) | ((b) * 0x8020UL & 0x88440UL)) * 0x10101UL >> 16)) #ifndef BV