Lines Matching refs:pCSD
2160 HAL_StatusTypeDef HAL_SD_GetCardCSD(SD_HandleTypeDef *hsd, HAL_SD_CardCSDTypeDef *pCSD) in HAL_SD_GetCardCSD() argument
2162 pCSD->CSDStruct = (uint8_t)((hsd->CSD[0] & 0xC0000000U) >> 30U); in HAL_SD_GetCardCSD()
2164 pCSD->SysSpecVersion = (uint8_t)((hsd->CSD[0] & 0x3C000000U) >> 26U); in HAL_SD_GetCardCSD()
2166 pCSD->Reserved1 = (uint8_t)((hsd->CSD[0] & 0x03000000U) >> 24U); in HAL_SD_GetCardCSD()
2168 pCSD->TAAC = (uint8_t)((hsd->CSD[0] & 0x00FF0000U) >> 16U); in HAL_SD_GetCardCSD()
2170 pCSD->NSAC = (uint8_t)((hsd->CSD[0] & 0x0000FF00U) >> 8U); in HAL_SD_GetCardCSD()
2172 pCSD->MaxBusClkFrec = (uint8_t)(hsd->CSD[0] & 0x000000FFU); in HAL_SD_GetCardCSD()
2174 pCSD->CardComdClasses = (uint16_t)((hsd->CSD[1] & 0xFFF00000U) >> 20U); in HAL_SD_GetCardCSD()
2176 pCSD->RdBlockLen = (uint8_t)((hsd->CSD[1] & 0x000F0000U) >> 16U); in HAL_SD_GetCardCSD()
2178 pCSD->PartBlockRead = (uint8_t)((hsd->CSD[1] & 0x00008000U) >> 15U); in HAL_SD_GetCardCSD()
2180 pCSD->WrBlockMisalign = (uint8_t)((hsd->CSD[1] & 0x00004000U) >> 14U); in HAL_SD_GetCardCSD()
2182 pCSD->RdBlockMisalign = (uint8_t)((hsd->CSD[1] & 0x00002000U) >> 13U); in HAL_SD_GetCardCSD()
2184 pCSD->DSRImpl = (uint8_t)((hsd->CSD[1] & 0x00001000U) >> 12U); in HAL_SD_GetCardCSD()
2186 pCSD->Reserved2 = 0U; /*!< Reserved */ in HAL_SD_GetCardCSD()
2190 pCSD->DeviceSize = (((hsd->CSD[1] & 0x000003FFU) << 2U) | ((hsd->CSD[2] & 0xC0000000U) >> 30U)); in HAL_SD_GetCardCSD()
2192 pCSD->MaxRdCurrentVDDMin = (uint8_t)((hsd->CSD[2] & 0x38000000U) >> 27U); in HAL_SD_GetCardCSD()
2194 pCSD->MaxRdCurrentVDDMax = (uint8_t)((hsd->CSD[2] & 0x07000000U) >> 24U); in HAL_SD_GetCardCSD()
2196 pCSD->MaxWrCurrentVDDMin = (uint8_t)((hsd->CSD[2] & 0x00E00000U) >> 21U); in HAL_SD_GetCardCSD()
2198 pCSD->MaxWrCurrentVDDMax = (uint8_t)((hsd->CSD[2] & 0x001C0000U) >> 18U); in HAL_SD_GetCardCSD()
2200 pCSD->DeviceSizeMul = (uint8_t)((hsd->CSD[2] & 0x00038000U) >> 15U); in HAL_SD_GetCardCSD()
2202 hsd->SdCard.BlockNbr = (pCSD->DeviceSize + 1U) ; in HAL_SD_GetCardCSD()
2203 hsd->SdCard.BlockNbr *= (1UL << ((pCSD->DeviceSizeMul & 0x07U) + 2U)); in HAL_SD_GetCardCSD()
2204 hsd->SdCard.BlockSize = (1UL << (pCSD->RdBlockLen & 0x0FU)); in HAL_SD_GetCardCSD()
2212 … pCSD->DeviceSize = (((hsd->CSD[1] & 0x0000003FU) << 16U) | ((hsd->CSD[2] & 0xFFFF0000U) >> 16U)); in HAL_SD_GetCardCSD()
2214 hsd->SdCard.BlockNbr = ((pCSD->DeviceSize + 1U) * 1024U); in HAL_SD_GetCardCSD()
2228 pCSD->EraseGrSize = (uint8_t)((hsd->CSD[2] & 0x00004000U) >> 14U); in HAL_SD_GetCardCSD()
2230 pCSD->EraseGrMul = (uint8_t)((hsd->CSD[2] & 0x00003F80U) >> 7U); in HAL_SD_GetCardCSD()
2232 pCSD->WrProtectGrSize = (uint8_t)(hsd->CSD[2] & 0x0000007FU); in HAL_SD_GetCardCSD()
2234 pCSD->WrProtectGrEnable = (uint8_t)((hsd->CSD[3] & 0x80000000U) >> 31U); in HAL_SD_GetCardCSD()
2236 pCSD->ManDeflECC = (uint8_t)((hsd->CSD[3] & 0x60000000U) >> 29U); in HAL_SD_GetCardCSD()
2238 pCSD->WrSpeedFact = (uint8_t)((hsd->CSD[3] & 0x1C000000U) >> 26U); in HAL_SD_GetCardCSD()
2240 pCSD->MaxWrBlockLen = (uint8_t)((hsd->CSD[3] & 0x03C00000U) >> 22U); in HAL_SD_GetCardCSD()
2242 pCSD->WriteBlockPaPartial = (uint8_t)((hsd->CSD[3] & 0x00200000U) >> 21U); in HAL_SD_GetCardCSD()
2244 pCSD->Reserved3 = 0; in HAL_SD_GetCardCSD()
2246 pCSD->ContentProtectAppli = (uint8_t)((hsd->CSD[3] & 0x00010000U) >> 16U); in HAL_SD_GetCardCSD()
2248 pCSD->FileFormatGroup = (uint8_t)((hsd->CSD[3] & 0x00008000U) >> 15U); in HAL_SD_GetCardCSD()
2250 pCSD->CopyFlag = (uint8_t)((hsd->CSD[3] & 0x00004000U) >> 14U); in HAL_SD_GetCardCSD()
2252 pCSD->PermWrProtect = (uint8_t)((hsd->CSD[3] & 0x00002000U) >> 13U); in HAL_SD_GetCardCSD()
2254 pCSD->TempWrProtect = (uint8_t)((hsd->CSD[3] & 0x00001000U) >> 12U); in HAL_SD_GetCardCSD()
2256 pCSD->FileFormat = (uint8_t)((hsd->CSD[3] & 0x00000C00U) >> 10U); in HAL_SD_GetCardCSD()
2258 pCSD->ECC = (uint8_t)((hsd->CSD[3] & 0x00000300U) >> 8U); in HAL_SD_GetCardCSD()
2260 pCSD->CSD_CRC = (uint8_t)((hsd->CSD[3] & 0x000000FEU) >> 1U); in HAL_SD_GetCardCSD()
2262 pCSD->Reserved4 = 1; in HAL_SD_GetCardCSD()