From: asterix Date: Wed, 3 Aug 2011 08:47:29 +0000 (+0000) Subject: Compile these functions only for sam3x. X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=f57ced5005f3378b0ba52cce00b14a7976363ae3;p=bertos.git Compile these functions only for sam3x. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4989 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/drv/sd.c b/bertos/drv/sd.c index e4f9c17f..90498296 100644 --- a/bertos/drv/sd.c +++ b/bertos/drv/sd.c @@ -500,7 +500,7 @@ static bool sd_blockInit(Sd *sd, KFile *ch) return true; } -#ifdef CPU_CM3_SAM3X8 +#if CPU_CM3_SAM3X8 #include @@ -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); } diff --git a/bertos/drv/sd.h b/bertos/drv/sd.h index ee568058..3a8484fb 100644 --- a/bertos/drv/sd.h +++ b/bertos/drv/sd.h @@ -51,7 +51,7 @@ #include -#ifdef CPU_CM3_SAM3X8 +#if CPU_CM3_SAM3X8 typedef struct SDcid {