sam3 SMC definitions: sam3n/s have very different controllers from
authoraleph <aleph@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 3 Mar 2011 14:00:14 +0000 (14:00 +0000)
committeraleph <aleph@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 3 Mar 2011 14:00:14 +0000 (14:00 +0000)
sam3x/a/u: conditionally define without bothering with error, since
the file is included by sam3.h even if SMC is not used on sam3n/s

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4745 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/cpu/cortex-m3/io/sam3_smc.h

index ead911ccf97de24681098a0159a1cb705a73a3d3..b6679b03aeef9dab759ac5387c09e237ba0a50d1 100644 (file)
 #ifndef SAM3_SMC_H
 #define SAM3_SMC_H
 
-#if !CPU_CM3_SAM3X && !CPU_CM3_SAM3U
-       #error SMC registers undefined for current cpu
-#endif
+/*
+ * SMC registers defined only for SAM3X/A and U for now
+ */
+#if CPU_CM3_SAM3X || CPU_CM3_SAM3U
 
 /** SMC registers base. */
 #define SMC_BASE  0x400E0000
 #define SMC_MODE_TDF_MODE             BV(20)
 /*\}*/
 
+#endif /* CPU_CM3_SAM3X || CPU_CM3_SAM3U */
+
 #endif /* SAM3_SMC_H */