diff options
author | Felix Domke <tmbinc@elitedvb.net> | 2014-09-05 13:47:33 +0200 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-09-15 22:34:07 +0100 |
commit | 09de030651b95956eb9f899e850f24d0ce804460 (patch) | |
tree | 598a575125e5f13d095469105f5b55846d178975 | |
parent | d4a799f152a4823fe15003f2db908801fb84533c (diff) | |
download | micropython-09de030651b95956eb9f899e850f24d0ce804460.tar.gz micropython-09de030651b95956eb9f899e850f24d0ce804460.zip |
stmhal/hal/src/stm32f4xx_hal_sd.c: fix SDHC card capacity
-rw-r--r-- | stmhal/hal/src/stm32f4xx_hal_sd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stmhal/hal/src/stm32f4xx_hal_sd.c b/stmhal/hal/src/stm32f4xx_hal_sd.c index 08be7f689b..5018f1b23c 100644 --- a/stmhal/hal/src/stm32f4xx_hal_sd.c +++ b/stmhal/hal/src/stm32f4xx_hal_sd.c @@ -1578,7 +1578,7 @@ HAL_SD_ErrorTypedef HAL_SD_Get_CardInfo(SD_HandleTypeDef *hsd, HAL_SD_CardInfoTy /* Byte 10 */
tmp = (uint8_t)((hsd->CSD[2] & 0x0000FF00) >> 8);
- pCardInfo->CardCapacity = ((pCardInfo->SD_csd.DeviceSize + 1)) * 512 * 1024;
+ pCardInfo->CardCapacity = ((pCardInfo->SD_csd.DeviceSize + 1ULL)) * 512 * 1024;
pCardInfo->CardBlockSize = 512;
}
else
|