Lines Matching refs:SdCard

411   if ((hsd->SdCard.CardType == CARD_SDHC_SDXC) && ((speedgrade != 0U) || (unitsize != 0U)))  in HAL_SD_Init()
413 hsd->SdCard.CardSpeed = CARD_ULTRA_HIGH_SPEED; in HAL_SD_Init()
417 if (hsd->SdCard.CardType == CARD_SDHC_SDXC) in HAL_SD_Init()
419 hsd->SdCard.CardSpeed = CARD_HIGH_SPEED; in HAL_SD_Init()
423 hsd->SdCard.CardSpeed = CARD_NORMAL_SPEED; in HAL_SD_Init()
682 if ((add + NumberOfBlocks) > (hsd->SdCard.LogBlockNbr)) in HAL_SD_ReadBlocks()
693 if (hsd->SdCard.CardType != CARD_SDHC_SDXC) in HAL_SD_ReadBlocks()
770 if (hsd->SdCard.CardType != CARD_SECURED) in HAL_SD_ReadBlocks()
867 if ((add + NumberOfBlocks) > (hsd->SdCard.LogBlockNbr)) in HAL_SD_WriteBlocks()
878 if (hsd->SdCard.CardType != CARD_SDHC_SDXC) in HAL_SD_WriteBlocks()
956 if (hsd->SdCard.CardType != CARD_SECURED) in HAL_SD_WriteBlocks()
1049 if ((add + NumberOfBlocks) > (hsd->SdCard.LogBlockNbr)) in HAL_SD_ReadBlocks_IT()
1063 if (hsd->SdCard.CardType != CARD_SDHC_SDXC) in HAL_SD_ReadBlocks_IT()
1144 if ((add + NumberOfBlocks) > (hsd->SdCard.LogBlockNbr)) in HAL_SD_WriteBlocks_IT()
1158 if (hsd->SdCard.CardType != CARD_SDHC_SDXC) in HAL_SD_WriteBlocks_IT()
1241 if ((add + NumberOfBlocks) > (hsd->SdCard.LogBlockNbr)) in HAL_SD_ReadBlocks_DMA()
1255 if (hsd->SdCard.CardType != CARD_SDHC_SDXC) in HAL_SD_ReadBlocks_DMA()
1340 if ((add + NumberOfBlocks) > (hsd->SdCard.LogBlockNbr)) in HAL_SD_WriteBlocks_DMA()
1354 if (hsd->SdCard.CardType != CARD_SDHC_SDXC) in HAL_SD_WriteBlocks_DMA()
1435 if (end_add > (hsd->SdCard.LogBlockNbr)) in HAL_SD_Erase()
1444 if (((hsd->SdCard.Class) & SDMMC_CCCC_ERASE) == 0U) in HAL_SD_Erase()
1463 if (hsd->SdCard.CardType != CARD_SDHC_SDXC) in HAL_SD_Erase()
1470 if (hsd->SdCard.CardType != CARD_SECURED) in HAL_SD_Erase()
2174 if (hsd->SdCard.CardType == CARD_SDSC) in HAL_SD_GetCardCSD()
2188 hsd->SdCard.BlockNbr = (pCSD->DeviceSize + 1U) ; in HAL_SD_GetCardCSD()
2189 hsd->SdCard.BlockNbr *= (1UL << ((pCSD->DeviceSizeMul & 0x07U) + 2U)); in HAL_SD_GetCardCSD()
2190 hsd->SdCard.BlockSize = (1UL << (pCSD->RdBlockLen & 0x0FU)); in HAL_SD_GetCardCSD()
2192 hsd->SdCard.LogBlockNbr = (hsd->SdCard.BlockNbr) * ((hsd->SdCard.BlockSize) / 512U); in HAL_SD_GetCardCSD()
2193 hsd->SdCard.LogBlockSize = 512U; in HAL_SD_GetCardCSD()
2195 else if (hsd->SdCard.CardType == CARD_SDHC_SDXC) in HAL_SD_GetCardCSD()
2200 hsd->SdCard.BlockNbr = ((pCSD->DeviceSize + 1U) * 1024U); in HAL_SD_GetCardCSD()
2201 hsd->SdCard.LogBlockNbr = hsd->SdCard.BlockNbr; in HAL_SD_GetCardCSD()
2202 hsd->SdCard.BlockSize = 512U; in HAL_SD_GetCardCSD()
2203 hsd->SdCard.LogBlockSize = hsd->SdCard.BlockSize; in HAL_SD_GetCardCSD()
2326 pCardInfo->CardType = (uint32_t)(hsd->SdCard.CardType); in HAL_SD_GetCardInfo()
2327 pCardInfo->CardVersion = (uint32_t)(hsd->SdCard.CardVersion); in HAL_SD_GetCardInfo()
2328 pCardInfo->Class = (uint32_t)(hsd->SdCard.Class); in HAL_SD_GetCardInfo()
2329 pCardInfo->RelCardAdd = (uint32_t)(hsd->SdCard.RelCardAdd); in HAL_SD_GetCardInfo()
2330 pCardInfo->BlockNbr = (uint32_t)(hsd->SdCard.BlockNbr); in HAL_SD_GetCardInfo()
2331 pCardInfo->BlockSize = (uint32_t)(hsd->SdCard.BlockSize); in HAL_SD_GetCardInfo()
2332 pCardInfo->LogBlockNbr = (uint32_t)(hsd->SdCard.LogBlockNbr); in HAL_SD_GetCardInfo()
2333 pCardInfo->LogBlockSize = (uint32_t)(hsd->SdCard.LogBlockSize); in HAL_SD_GetCardInfo()
2362 if (hsd->SdCard.CardType != CARD_SECURED) in HAL_SD_ConfigWideBusOperation()
2414 else if (hsd->SdCard.CardSpeed == CARD_ULTRA_HIGH_SPEED) in HAL_SD_ConfigWideBusOperation()
2419 else if (hsd->SdCard.CardSpeed == CARD_HIGH_SPEED) in HAL_SD_ConfigWideBusOperation()
2531 if ((hsd->SdCard.CardSpeed == CARD_ULTRA_HIGH_SPEED) || in HAL_SD_ConfigSpeedBusOperation()
2532 (hsd->SdCard.CardType == CARD_SDHC_SDXC)) in HAL_SD_ConfigSpeedBusOperation()
2545 else if (hsd->SdCard.CardSpeed == CARD_HIGH_SPEED) in HAL_SD_ConfigSpeedBusOperation()
2562 if ((hsd->SdCard.CardSpeed == CARD_ULTRA_HIGH_SPEED) || in HAL_SD_ConfigSpeedBusOperation()
2563 (hsd->SdCard.CardType == CARD_SDHC_SDXC)) in HAL_SD_ConfigSpeedBusOperation()
2582 if ((hsd->SdCard.CardSpeed == CARD_ULTRA_HIGH_SPEED) || in HAL_SD_ConfigSpeedBusOperation()
2583 (hsd->SdCard.CardType == CARD_SDHC_SDXC)) in HAL_SD_ConfigSpeedBusOperation()
2602 if ((hsd->SdCard.CardSpeed == CARD_ULTRA_HIGH_SPEED) || in HAL_SD_ConfigSpeedBusOperation()
2603 (hsd->SdCard.CardSpeed == CARD_HIGH_SPEED) || in HAL_SD_ConfigSpeedBusOperation()
2604 (hsd->SdCard.CardType == CARD_SDHC_SDXC)) in HAL_SD_ConfigSpeedBusOperation()
2634 if ((hsd->SdCard.CardSpeed == CARD_ULTRA_HIGH_SPEED) || in HAL_SD_ConfigSpeedBusOperation()
2635 (hsd->SdCard.CardSpeed == CARD_HIGH_SPEED) || in HAL_SD_ConfigSpeedBusOperation()
2636 (hsd->SdCard.CardType == CARD_SDHC_SDXC)) in HAL_SD_ConfigSpeedBusOperation()
2653 if ((hsd->SdCard.CardSpeed == CARD_ULTRA_HIGH_SPEED) || in HAL_SD_ConfigSpeedBusOperation()
2654 (hsd->SdCard.CardSpeed == CARD_HIGH_SPEED) || in HAL_SD_ConfigSpeedBusOperation()
2655 (hsd->SdCard.CardType == CARD_SDHC_SDXC)) in HAL_SD_ConfigSpeedBusOperation()
2685 if ((hsd->SdCard.CardSpeed == CARD_ULTRA_HIGH_SPEED) || in HAL_SD_ConfigSpeedBusOperation()
2686 (hsd->SdCard.CardSpeed == CARD_HIGH_SPEED) || in HAL_SD_ConfigSpeedBusOperation()
2687 (hsd->SdCard.CardType == CARD_SDHC_SDXC)) in HAL_SD_ConfigSpeedBusOperation()
2704 if ((hsd->SdCard.CardSpeed == CARD_ULTRA_HIGH_SPEED) || in HAL_SD_ConfigSpeedBusOperation()
2705 (hsd->SdCard.CardSpeed == CARD_HIGH_SPEED) || in HAL_SD_ConfigSpeedBusOperation()
2706 (hsd->SdCard.CardType == CARD_SDHC_SDXC)) in HAL_SD_ConfigSpeedBusOperation()
2894 if (hsd->SdCard.CardType != CARD_SECURED) in SD_InitCard()
2912 if (hsd->SdCard.CardType != CARD_SECURED) in SD_InitCard()
2922 if (hsd->SdCard.CardType != CARD_SECURED) in SD_InitCard()
2925 hsd->SdCard.RelCardAdd = sd_rca; in SD_InitCard()
2928 errorstate = SDMMC_CmdSendCSD(hsd->Instance, (uint32_t)(hsd->SdCard.RelCardAdd << 16U)); in SD_InitCard()
2944 hsd->SdCard.Class = (SDMMC_GetResponse(hsd->Instance, SDMMC_RESP2) >> 20U); in SD_InitCard()
2953 …errorstate = SDMMC_CmdSelDesel(hsd->Instance, (uint32_t)(((uint32_t)hsd->SdCard.RelCardAdd) << 16U… in SD_InitCard()
2991 hsd->SdCard.CardVersion = CARD_V1_X; in SD_PowerON()
3002 hsd->SdCard.CardVersion = CARD_V2_X; in SD_PowerON()
3005 if (hsd->SdCard.CardVersion == CARD_V2_X) in SD_PowerON()
3049 hsd->SdCard.CardType = CARD_SDHC_SDXC; in SD_PowerON()
3055 hsd->SdCard.CardSpeed = CARD_ULTRA_HIGH_SPEED; in SD_PowerON()
3172 errorstate = SDMMC_CmdAppCommand(hsd->Instance, (uint32_t)(hsd->SdCard.RelCardAdd << 16U)); in SD_SendSDStatus()
3265 errorstate = SDMMC_CmdSendStatus(hsd->Instance, (uint32_t)(hsd->SdCard.RelCardAdd << 16U)); in SD_SendStatus()
3303 errorstate = SDMMC_CmdAppCommand(hsd->Instance, (uint32_t)(hsd->SdCard.RelCardAdd << 16U)); in SD_WideBus_Enable()
3350 errorstate = SDMMC_CmdAppCommand(hsd->Instance, (uint32_t)(hsd->SdCard.RelCardAdd << 16U)); in SD_WideBus_Disable()
3395 errorstate = SDMMC_CmdAppCommand(hsd->Instance, (uint32_t)((hsd->SdCard.RelCardAdd) << 16U)); in SD_FindSCR()
3555 if (hsd->SdCard.CardSpeed == CARD_NORMAL_SPEED) in SD_HighSpeed()
3561 if (hsd->SdCard.CardSpeed == CARD_HIGH_SPEED) in SD_HighSpeed()
3668 if (hsd->SdCard.CardSpeed == CARD_NORMAL_SPEED) in SD_UltraHighSpeed()
3674 if (hsd->SdCard.CardSpeed == CARD_ULTRA_HIGH_SPEED) in SD_UltraHighSpeed()
3795 if (hsd->SdCard.CardSpeed == CARD_NORMAL_SPEED) in SD_DDR_Mode()
3801 if (hsd->SdCard.CardSpeed == CARD_ULTRA_HIGH_SPEED) in SD_DDR_Mode()