Lines Matching refs:SdCard

416   if ((hsd->SdCard.CardType == CARD_SDHC_SDXC) && ((speedgrade != 0U) || (unitsize != 0U)))  in HAL_SD_Init()
418 hsd->SdCard.CardSpeed = CARD_ULTRA_HIGH_SPEED; in HAL_SD_Init()
422 if (hsd->SdCard.CardType == CARD_SDHC_SDXC) in HAL_SD_Init()
424 hsd->SdCard.CardSpeed = CARD_HIGH_SPEED; in HAL_SD_Init()
428 hsd->SdCard.CardSpeed = CARD_NORMAL_SPEED; in HAL_SD_Init()
687 if ((add + NumberOfBlocks) > (hsd->SdCard.LogBlockNbr)) in HAL_SD_ReadBlocks()
698 if (hsd->SdCard.CardType != CARD_SDHC_SDXC) in HAL_SD_ReadBlocks()
775 if (hsd->SdCard.CardType != CARD_SECURED) in HAL_SD_ReadBlocks()
872 if ((add + NumberOfBlocks) > (hsd->SdCard.LogBlockNbr)) in HAL_SD_WriteBlocks()
883 if (hsd->SdCard.CardType != CARD_SDHC_SDXC) in HAL_SD_WriteBlocks()
961 if (hsd->SdCard.CardType != CARD_SECURED) in HAL_SD_WriteBlocks()
1054 if ((add + NumberOfBlocks) > (hsd->SdCard.LogBlockNbr)) in HAL_SD_ReadBlocks_IT()
1068 if (hsd->SdCard.CardType != CARD_SDHC_SDXC) in HAL_SD_ReadBlocks_IT()
1149 if ((add + NumberOfBlocks) > (hsd->SdCard.LogBlockNbr)) in HAL_SD_WriteBlocks_IT()
1163 if (hsd->SdCard.CardType != CARD_SDHC_SDXC) in HAL_SD_WriteBlocks_IT()
1246 if ((add + NumberOfBlocks) > (hsd->SdCard.LogBlockNbr)) in HAL_SD_ReadBlocks_DMA()
1260 if (hsd->SdCard.CardType != CARD_SDHC_SDXC) in HAL_SD_ReadBlocks_DMA()
1345 if ((add + NumberOfBlocks) > (hsd->SdCard.LogBlockNbr)) in HAL_SD_WriteBlocks_DMA()
1359 if (hsd->SdCard.CardType != CARD_SDHC_SDXC) in HAL_SD_WriteBlocks_DMA()
1440 if (end_add > (hsd->SdCard.LogBlockNbr)) in HAL_SD_Erase()
1449 if (((hsd->SdCard.Class) & SDMMC_CCCC_ERASE) == 0U) in HAL_SD_Erase()
1468 if (hsd->SdCard.CardType != CARD_SDHC_SDXC) in HAL_SD_Erase()
1475 if (hsd->SdCard.CardType != CARD_SECURED) in HAL_SD_Erase()
2218 if (hsd->SdCard.CardType == CARD_SDSC) in HAL_SD_GetCardCSD()
2232 hsd->SdCard.BlockNbr = (pCSD->DeviceSize + 1U) ; in HAL_SD_GetCardCSD()
2233 hsd->SdCard.BlockNbr *= (1UL << ((pCSD->DeviceSizeMul & 0x07U) + 2U)); in HAL_SD_GetCardCSD()
2234 hsd->SdCard.BlockSize = (1UL << (pCSD->RdBlockLen & 0x0FU)); in HAL_SD_GetCardCSD()
2236 hsd->SdCard.LogBlockNbr = (hsd->SdCard.BlockNbr) * ((hsd->SdCard.BlockSize) / 512U); in HAL_SD_GetCardCSD()
2237 hsd->SdCard.LogBlockSize = 512U; in HAL_SD_GetCardCSD()
2239 else if (hsd->SdCard.CardType == CARD_SDHC_SDXC) in HAL_SD_GetCardCSD()
2244 hsd->SdCard.BlockNbr = ((pCSD->DeviceSize + 1U) * 1024U); in HAL_SD_GetCardCSD()
2245 hsd->SdCard.LogBlockNbr = hsd->SdCard.BlockNbr; in HAL_SD_GetCardCSD()
2246 hsd->SdCard.BlockSize = 512U; in HAL_SD_GetCardCSD()
2247 hsd->SdCard.LogBlockSize = hsd->SdCard.BlockSize; in HAL_SD_GetCardCSD()
2370 pCardInfo->CardType = (uint32_t)(hsd->SdCard.CardType); in HAL_SD_GetCardInfo()
2371 pCardInfo->CardVersion = (uint32_t)(hsd->SdCard.CardVersion); in HAL_SD_GetCardInfo()
2372 pCardInfo->Class = (uint32_t)(hsd->SdCard.Class); in HAL_SD_GetCardInfo()
2373 pCardInfo->RelCardAdd = (uint32_t)(hsd->SdCard.RelCardAdd); in HAL_SD_GetCardInfo()
2374 pCardInfo->BlockNbr = (uint32_t)(hsd->SdCard.BlockNbr); in HAL_SD_GetCardInfo()
2375 pCardInfo->BlockSize = (uint32_t)(hsd->SdCard.BlockSize); in HAL_SD_GetCardInfo()
2376 pCardInfo->LogBlockNbr = (uint32_t)(hsd->SdCard.LogBlockNbr); in HAL_SD_GetCardInfo()
2377 pCardInfo->LogBlockSize = (uint32_t)(hsd->SdCard.LogBlockSize); in HAL_SD_GetCardInfo()
2406 if (hsd->SdCard.CardType != CARD_SECURED) in HAL_SD_ConfigWideBusOperation()
2458 else if (hsd->SdCard.CardSpeed == CARD_ULTRA_HIGH_SPEED) in HAL_SD_ConfigWideBusOperation()
2463 else if (hsd->SdCard.CardSpeed == CARD_HIGH_SPEED) in HAL_SD_ConfigWideBusOperation()
2575 if ((hsd->SdCard.CardSpeed == CARD_ULTRA_HIGH_SPEED) || in HAL_SD_ConfigSpeedBusOperation()
2576 (hsd->SdCard.CardType == CARD_SDHC_SDXC)) in HAL_SD_ConfigSpeedBusOperation()
2589 else if (hsd->SdCard.CardSpeed == CARD_HIGH_SPEED) in HAL_SD_ConfigSpeedBusOperation()
2606 if ((hsd->SdCard.CardSpeed == CARD_ULTRA_HIGH_SPEED) || in HAL_SD_ConfigSpeedBusOperation()
2607 (hsd->SdCard.CardType == CARD_SDHC_SDXC)) in HAL_SD_ConfigSpeedBusOperation()
2626 if ((hsd->SdCard.CardSpeed == CARD_ULTRA_HIGH_SPEED) || in HAL_SD_ConfigSpeedBusOperation()
2627 (hsd->SdCard.CardType == CARD_SDHC_SDXC)) in HAL_SD_ConfigSpeedBusOperation()
2646 if ((hsd->SdCard.CardSpeed == CARD_ULTRA_HIGH_SPEED) || in HAL_SD_ConfigSpeedBusOperation()
2647 (hsd->SdCard.CardSpeed == CARD_HIGH_SPEED) || in HAL_SD_ConfigSpeedBusOperation()
2648 (hsd->SdCard.CardType == CARD_SDHC_SDXC)) in HAL_SD_ConfigSpeedBusOperation()
2678 if ((hsd->SdCard.CardSpeed == CARD_ULTRA_HIGH_SPEED) || in HAL_SD_ConfigSpeedBusOperation()
2679 (hsd->SdCard.CardSpeed == CARD_HIGH_SPEED) || in HAL_SD_ConfigSpeedBusOperation()
2680 (hsd->SdCard.CardType == CARD_SDHC_SDXC)) in HAL_SD_ConfigSpeedBusOperation()
2697 if ((hsd->SdCard.CardSpeed == CARD_ULTRA_HIGH_SPEED) || in HAL_SD_ConfigSpeedBusOperation()
2698 (hsd->SdCard.CardSpeed == CARD_HIGH_SPEED) || in HAL_SD_ConfigSpeedBusOperation()
2699 (hsd->SdCard.CardType == CARD_SDHC_SDXC)) in HAL_SD_ConfigSpeedBusOperation()
2729 if ((hsd->SdCard.CardSpeed == CARD_ULTRA_HIGH_SPEED) || in HAL_SD_ConfigSpeedBusOperation()
2730 (hsd->SdCard.CardSpeed == CARD_HIGH_SPEED) || in HAL_SD_ConfigSpeedBusOperation()
2731 (hsd->SdCard.CardType == CARD_SDHC_SDXC)) in HAL_SD_ConfigSpeedBusOperation()
2748 if ((hsd->SdCard.CardSpeed == CARD_ULTRA_HIGH_SPEED) || in HAL_SD_ConfigSpeedBusOperation()
2749 (hsd->SdCard.CardSpeed == CARD_HIGH_SPEED) || in HAL_SD_ConfigSpeedBusOperation()
2750 (hsd->SdCard.CardType == CARD_SDHC_SDXC)) in HAL_SD_ConfigSpeedBusOperation()
2938 if (hsd->SdCard.CardType != CARD_SECURED) in SD_InitCard()
2956 if (hsd->SdCard.CardType != CARD_SECURED) in SD_InitCard()
2966 if (hsd->SdCard.CardType != CARD_SECURED) in SD_InitCard()
2969 hsd->SdCard.RelCardAdd = sd_rca; in SD_InitCard()
2972 errorstate = SDMMC_CmdSendCSD(hsd->Instance, (uint32_t)(hsd->SdCard.RelCardAdd << 16U)); in SD_InitCard()
2988 hsd->SdCard.Class = (SDMMC_GetResponse(hsd->Instance, SDMMC_RESP2) >> 20U); in SD_InitCard()
2997 …errorstate = SDMMC_CmdSelDesel(hsd->Instance, (uint32_t)(((uint32_t)hsd->SdCard.RelCardAdd) << 16U… in SD_InitCard()
3035 hsd->SdCard.CardVersion = CARD_V1_X; in SD_PowerON()
3046 hsd->SdCard.CardVersion = CARD_V2_X; in SD_PowerON()
3049 if (hsd->SdCard.CardVersion == CARD_V2_X) in SD_PowerON()
3093 hsd->SdCard.CardType = CARD_SDHC_SDXC; in SD_PowerON()
3099 hsd->SdCard.CardSpeed = CARD_ULTRA_HIGH_SPEED; in SD_PowerON()
3216 errorstate = SDMMC_CmdAppCommand(hsd->Instance, (uint32_t)(hsd->SdCard.RelCardAdd << 16U)); in SD_SendSDStatus()
3309 errorstate = SDMMC_CmdSendStatus(hsd->Instance, (uint32_t)(hsd->SdCard.RelCardAdd << 16U)); in SD_SendStatus()
3347 errorstate = SDMMC_CmdAppCommand(hsd->Instance, (uint32_t)(hsd->SdCard.RelCardAdd << 16U)); in SD_WideBus_Enable()
3394 errorstate = SDMMC_CmdAppCommand(hsd->Instance, (uint32_t)(hsd->SdCard.RelCardAdd << 16U)); in SD_WideBus_Disable()
3439 errorstate = SDMMC_CmdAppCommand(hsd->Instance, (uint32_t)((hsd->SdCard.RelCardAdd) << 16U)); in SD_FindSCR()
3599 if (hsd->SdCard.CardSpeed == CARD_NORMAL_SPEED) in SD_HighSpeed()
3605 if (hsd->SdCard.CardSpeed == CARD_HIGH_SPEED) in SD_HighSpeed()
3712 if (hsd->SdCard.CardSpeed == CARD_NORMAL_SPEED) in SD_UltraHighSpeed()
3718 if (hsd->SdCard.CardSpeed == CARD_ULTRA_HIGH_SPEED) in SD_UltraHighSpeed()
3842 if (hsd->SdCard.CardSpeed == CARD_NORMAL_SPEED) in SD_DDR_Mode()
3848 if (hsd->SdCard.CardSpeed == CARD_ULTRA_HIGH_SPEED) in SD_DDR_Mode()