Change REVERSE macro name.
authorbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 17 Nov 2009 11:32:06 +0000 (11:32 +0000)
committerbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 17 Nov 2009 11:32:06 +0000 (11:32 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3114 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/algo/reverse_test.c
bertos/cfg/macros.h

index 0e37d3fb5b02e6ed7749a30d0b835fb2200656ba..d09de0e928e0913429a9798c44c3600e9bdd6ddb 100644 (file)
@@ -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;
 }
index 0dad9d393effcb3f44abfa7aa85264c342a27206..4f77b21e6c6c7227492156dea2329e59b9e6f6cf 100644 (file)
  * 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