Fix CPU_ARM_AT91 redefinition.
authorbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 11 Oct 2007 15:06:05 +0000 (15:06 +0000)
committerbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 11 Oct 2007 15:06:05 +0000 (15:06 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@861 38d2e660-2303-0410-9eaa-f027e97ec537

cpu/detect.h

index dd0e801fa74b148f78f9193b1cbf7fca2b124c0b..182472736f5f604ca4ff94381fd69b329bd670c6 100644 (file)
@@ -45,7 +45,6 @@
                #define CPU_ARM_AT91         1
                #define CPU_ARM_AT91SAM7S32  1
        #else
-               #define CPU_ARM_AT91         0
                #define CPU_ARM_AT91SAM7S32  0
        #endif
 
@@ -53,7 +52,6 @@
                #define CPU_ARM_AT91         1
                #define CPU_ARM_AT91SAM7S64  1
        #else
-               #define CPU_ARM_AT91         0
                #define CPU_ARM_AT91SAM7S64  0
        #endif
 
@@ -61,7 +59,6 @@
                #define CPU_ARM_AT91         1
                #define CPU_ARM_AT91SAM7S128 1
        #else
-               #define CPU_ARM_AT91         0
                #define CPU_ARM_AT91SAM7S128 0
        #endif
 
                #define CPU_ARM_AT91         1
                #define CPU_ARM_AT91SAM7S256 1
        #else
-               #define CPU_ARM_AT91         0
                #define CPU_ARM_AT91SAM7S256 0
        #endif
 
-       #if CPU_ARM_AT91SAM7S32 + CPU_ARM_AT91SAM7S64 \
-         + CPU_ARM_AT91SAM7S128 + CPU_ARM_AT91SAM7S256 != 1
-               #error ARM CPU configuration error
+       #if defined(CPU_ARM_AT91)
+               #if CPU_ARM_AT91SAM7S32 + CPU_ARM_AT91SAM7S64 \
+               + CPU_ARM_AT91SAM7S128 + CPU_ARM_AT91SAM7S256 != 1
+                       #error ARM CPU configuration error
+               #endif
+       /* #elif Add other ARM families here */
+       #else
+               #define CPU_ATM_AT91         0
        #endif
 
+
        #if CPU_ARM_AT91 + 0 /* Add other ARM families here */ != 1
                #error ARM CPU configuration error
        #endif