Compile these functions only for sam3x.
authorasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 3 Aug 2011 08:47:29 +0000 (08:47 +0000)
committerasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 3 Aug 2011 08:47:29 +0000 (08:47 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4989 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/drv/sd.c
bertos/drv/sd.h

index e4f9c17f4da9b8348a67443e2a1eac88d2ca33f4..90498296277ff8173e06988dc9112e2faf8fb760 100644 (file)
@@ -500,7 +500,7 @@ static bool sd_blockInit(Sd *sd, KFile *ch)
        return true;
 }
 
-#ifdef CPU_CM3_SAM3X8
+#if CPU_CM3_SAM3X8
 
 #include <drv/hsmci_sam3.h>
 
@@ -698,7 +698,7 @@ void sd_decode_cid(SDcid *cid, uint32_t *resp, size_t len)
     cid->prod_name[4]      = UNSTUFF_BITS(resp, 64, 8);
     cid->m_rev         = UNSTUFF_BITS(resp, 60, 4);
     cid->l_rev         = UNSTUFF_BITS(resp, 56, 4);
-    cid->serial        = UNSTUFF_BITS(resp, 24, 32);
+    cid->serial        = (uint32_t)UNSTUFF_BITS(resp, 24, 32);
     cid->year_off      = UNSTUFF_BITS(resp, 8, 12);
 }
 
index ee568058ccc861b1d21c285d2eb0979a6c63492d..3a8484fbb473cbae343fcf4c46f6affd47742ed7 100644 (file)
@@ -51,7 +51,7 @@
 
 #include <fs/fatfs/diskio.h>
 
-#ifdef CPU_CM3_SAM3X8
+#if CPU_CM3_SAM3X8
 
 typedef struct SDcid
 {