Lines Matching refs:SdCard
343 if ((hsd->SdCard.CardType == CARD_SDHC_SDXC) && ((speedgrade != 0U) || (unitsize != 0U))) in HAL_SD_Init()
345 hsd->SdCard.CardSpeed = CARD_ULTRA_HIGH_SPEED; in HAL_SD_Init()
349 if (hsd->SdCard.CardType == CARD_SDHC_SDXC) in HAL_SD_Init()
351 hsd->SdCard.CardSpeed = CARD_HIGH_SPEED; in HAL_SD_Init()
355 hsd->SdCard.CardSpeed = CARD_NORMAL_SPEED; in HAL_SD_Init()
365 if((hsd->SdCard.CardSpeed == CARD_ULTRA_HIGH_SPEED) || in HAL_SD_Init()
366 (hsd->SdCard.CardType == CARD_SDHC_SDXC)) in HAL_SD_Init()
375 else if (hsd->SdCard.CardSpeed == CARD_HIGH_SPEED) in HAL_SD_Init()
388 if((hsd->SdCard.CardSpeed == CARD_ULTRA_HIGH_SPEED) || in HAL_SD_Init()
389 (hsd->SdCard.CardSpeed == CARD_HIGH_SPEED) || in HAL_SD_Init()
390 (hsd->SdCard.CardType == CARD_SDHC_SDXC)) in HAL_SD_Init()
619 if((add + NumberOfBlocks) > (hsd->SdCard.LogBlockNbr)) in HAL_SD_ReadBlocks()
630 if(hsd->SdCard.CardType != CARD_SDHC_SDXC) in HAL_SD_ReadBlocks()
714 if(hsd->SdCard.CardType != CARD_SECURED) in HAL_SD_ReadBlocks()
804 if((add + NumberOfBlocks) > (hsd->SdCard.LogBlockNbr)) in HAL_SD_WriteBlocks()
815 if(hsd->SdCard.CardType != CARD_SDHC_SDXC) in HAL_SD_WriteBlocks()
899 if(hsd->SdCard.CardType != CARD_SECURED) in HAL_SD_WriteBlocks()
987 if((add + NumberOfBlocks) > (hsd->SdCard.LogBlockNbr)) in HAL_SD_ReadBlocks_IT()
1003 if(hsd->SdCard.CardType != CARD_SDHC_SDXC) in HAL_SD_ReadBlocks_IT()
1090 if((add + NumberOfBlocks) > (hsd->SdCard.LogBlockNbr)) in HAL_SD_WriteBlocks_IT()
1107 if(hsd->SdCard.CardType != CARD_SDHC_SDXC) in HAL_SD_WriteBlocks_IT()
1195 if((add + NumberOfBlocks) > (hsd->SdCard.LogBlockNbr)) in HAL_SD_ReadBlocks_DMA()
1209 if(hsd->SdCard.CardType != CARD_SDHC_SDXC) in HAL_SD_ReadBlocks_DMA()
1303 if((add + NumberOfBlocks) > (hsd->SdCard.LogBlockNbr)) in HAL_SD_WriteBlocks_DMA()
1317 if(hsd->SdCard.CardType != CARD_SDHC_SDXC) in HAL_SD_WriteBlocks_DMA()
1407 if(end_add > (hsd->SdCard.LogBlockNbr)) in HAL_SD_Erase()
1416 if(((hsd->SdCard.Class) & SDMMC_CCCC_ERASE) == 0U) in HAL_SD_Erase()
1435 if(hsd->SdCard.CardType != CARD_SDHC_SDXC) in HAL_SD_Erase()
1442 if(hsd->SdCard.CardType != CARD_SECURED) in HAL_SD_Erase()
2179 if(hsd->SdCard.CardType == CARD_SDSC) in HAL_SD_GetCardCSD()
2193 hsd->SdCard.BlockNbr = (pCSD->DeviceSize + 1U) ; in HAL_SD_GetCardCSD()
2194 hsd->SdCard.BlockNbr *= (1UL << ((pCSD->DeviceSizeMul & 0x07U) + 2U)); in HAL_SD_GetCardCSD()
2195 hsd->SdCard.BlockSize = (1UL << (pCSD->RdBlockLen & 0x0FU)); in HAL_SD_GetCardCSD()
2197 hsd->SdCard.LogBlockNbr = (hsd->SdCard.BlockNbr) * ((hsd->SdCard.BlockSize) / 512U); in HAL_SD_GetCardCSD()
2198 hsd->SdCard.LogBlockSize = 512U; in HAL_SD_GetCardCSD()
2200 else if(hsd->SdCard.CardType == CARD_SDHC_SDXC) in HAL_SD_GetCardCSD()
2205 hsd->SdCard.BlockNbr = ((pCSD->DeviceSize + 1U) * 1024U); in HAL_SD_GetCardCSD()
2206 hsd->SdCard.LogBlockNbr = hsd->SdCard.BlockNbr; in HAL_SD_GetCardCSD()
2207 hsd->SdCard.BlockSize = 512U; in HAL_SD_GetCardCSD()
2208 hsd->SdCard.LogBlockSize = hsd->SdCard.BlockSize; in HAL_SD_GetCardCSD()
2319 pCardInfo->CardType = (uint32_t)(hsd->SdCard.CardType); in HAL_SD_GetCardInfo()
2320 pCardInfo->CardVersion = (uint32_t)(hsd->SdCard.CardVersion); in HAL_SD_GetCardInfo()
2321 pCardInfo->Class = (uint32_t)(hsd->SdCard.Class); in HAL_SD_GetCardInfo()
2322 pCardInfo->RelCardAdd = (uint32_t)(hsd->SdCard.RelCardAdd); in HAL_SD_GetCardInfo()
2323 pCardInfo->BlockNbr = (uint32_t)(hsd->SdCard.BlockNbr); in HAL_SD_GetCardInfo()
2324 pCardInfo->BlockSize = (uint32_t)(hsd->SdCard.BlockSize); in HAL_SD_GetCardInfo()
2325 pCardInfo->LogBlockNbr = (uint32_t)(hsd->SdCard.LogBlockNbr); in HAL_SD_GetCardInfo()
2326 pCardInfo->LogBlockSize = (uint32_t)(hsd->SdCard.LogBlockSize); in HAL_SD_GetCardInfo()
2353 if(hsd->SdCard.CardType != CARD_SECURED) in HAL_SD_ConfigWideBusOperation()
2403 else if (hsd->SdCard.CardSpeed == CARD_ULTRA_HIGH_SPEED) in HAL_SD_ConfigWideBusOperation()
2408 else if (hsd->SdCard.CardSpeed == CARD_HIGH_SPEED) in HAL_SD_ConfigWideBusOperation()
2563 if(hsd->SdCard.CardType != CARD_SECURED) in SD_InitCard()
2581 if(hsd->SdCard.CardType != CARD_SECURED) in SD_InitCard()
2591 if(hsd->SdCard.CardType != CARD_SECURED) in SD_InitCard()
2594 hsd->SdCard.RelCardAdd = sd_rca; in SD_InitCard()
2597 errorstate = SDMMC_CmdSendCSD(hsd->Instance, (uint32_t)(hsd->SdCard.RelCardAdd << 16U)); in SD_InitCard()
2613 hsd->SdCard.Class = (SDMMC_GetResponse(hsd->Instance, SDMMC_RESP2) >> 20); in SD_InitCard()
2622 …errorstate = SDMMC_CmdSelDesel(hsd->Instance, (uint32_t)(((uint32_t)hsd->SdCard.RelCardAdd) << 16)… in SD_InitCard()
2659 hsd->SdCard.CardVersion = CARD_V1_X; in SD_PowerON()
2663 hsd->SdCard.CardVersion = CARD_V2_X; in SD_PowerON()
2708 hsd->SdCard.CardType = CARD_SDHC_SDXC; in SD_PowerON()
2712 hsd->SdCard.CardSpeed = CARD_ULTRA_HIGH_SPEED; in SD_PowerON()
2781 hsd->SdCard.CardSpeed = CARD_ULTRA_HIGH_SPEED; in SD_PowerON()
2831 errorstate = SDMMC_CmdAppCommand(hsd->Instance, (uint32_t)(hsd->SdCard.RelCardAdd << 16)); in SD_SendSDStatus()
2924 errorstate = SDMMC_CmdSendStatus(hsd->Instance, (uint32_t)(hsd->SdCard.RelCardAdd << 16)); in SD_SendStatus()
2962 errorstate = SDMMC_CmdAppCommand(hsd->Instance, (uint32_t)(hsd->SdCard.RelCardAdd << 16)); in SD_WideBus_Enable()
3009 errorstate = SDMMC_CmdAppCommand(hsd->Instance, (uint32_t)(hsd->SdCard.RelCardAdd << 16)); in SD_WideBus_Disable()
3054 errorstate = SDMMC_CmdAppCommand(hsd->Instance, (uint32_t)((hsd->SdCard.RelCardAdd) << 16)); in SD_FindSCR()
3194 if(hsd->SdCard.CardSpeed == CARD_NORMAL_SPEED) in SD_HighSpeed()
3200 if(hsd->SdCard.CardSpeed == CARD_HIGH_SPEED) in SD_HighSpeed()
3310 if(hsd->SdCard.CardSpeed == CARD_NORMAL_SPEED) in SD_UltraHighSpeed()
3316 if(hsd->SdCard.CardSpeed == CARD_ULTRA_HIGH_SPEED) in SD_UltraHighSpeed()