Lines Matching refs:command

76 static status_t SDIF_WaitCommandDone(SDIF_Type *base, sdif_command_t *command);
91 static status_t SDIF_ReadCommandResponse(SDIF_Type *base, sdif_command_t *command);
233 sdif_command_t *command = transfer->command; in SDIF_TransferConfig() local
236 if ((command == NULL) || ((data != NULL) && (data->blockSize > SDIF_BLKSIZ_BLOCK_SIZE_MASK))) in SDIF_TransferConfig()
249 command->flags |= (uint32_t)kSDIF_DataExpect; /* need transfer data flag */ in SDIF_TransferConfig()
253 command->flags |= (uint32_t)kSDIF_DataWriteToCard; /* data transfer direction */ in SDIF_TransferConfig()
270 command->flags |= in SDIF_TransferConfig()
277 command->flags |= (uint32_t)kSDIF_DataTransferAutoStop; in SDIF_TransferConfig()
281 if (command->responseType == (uint32_t)kCARD_ResponseTypeR2) in SDIF_TransferConfig()
283command->flags |= ((uint32_t)kSDIF_CmdCheckResponseCRC | (uint32_t)kSDIF_CmdResponseLengthLong | in SDIF_TransferConfig()
286 else if ((command->responseType == (uint32_t)kCARD_ResponseTypeR3) || in SDIF_TransferConfig()
287 (command->responseType == (uint32_t)kCARD_ResponseTypeR4)) in SDIF_TransferConfig()
289command->flags |= (uint32_t)kSDIF_CmdResponseExpect; /* response R3 do not check Response CRC */ in SDIF_TransferConfig()
293 if (command->responseType != (uint32_t)kCARD_ResponseTypeNone) in SDIF_TransferConfig()
295command->flags |= ((uint32_t)kSDIF_CmdCheckResponseCRC | (uint32_t)kSDIF_CmdResponseExpect); in SDIF_TransferConfig()
299 if (command->type == (uint32_t)kCARD_CommandTypeAbort) in SDIF_TransferConfig()
301 command->flags |= (uint32_t)kSDIF_TransferStopAbort; in SDIF_TransferConfig()
305 command->flags |= (uint32_t)kSDIF_WaitPreTransferComplete | (uint32_t)kSDIF_CmdDataUseHoldReg; in SDIF_TransferConfig()
331 static status_t SDIF_ReadCommandResponse(SDIF_Type *base, sdif_command_t *command) in SDIF_ReadCommandResponse() argument
334 if (NULL != command) in SDIF_ReadCommandResponse()
337 command->response[0U] = base->RESP[0U]; in SDIF_ReadCommandResponse()
338 if (command->responseType == (uint32_t)kCARD_ResponseTypeR2) in SDIF_ReadCommandResponse()
340 command->response[1U] = base->RESP[1U]; in SDIF_ReadCommandResponse()
341 command->response[2U] = base->RESP[2U]; in SDIF_ReadCommandResponse()
342 command->response[3U] = base->RESP[3U]; in SDIF_ReadCommandResponse()
345 …if ((command->responseErrorFlags != 0U) && ((command->responseType == (uint32_t)kCARD_ResponseType… in SDIF_ReadCommandResponse()
346 … (command->responseType == (uint32_t)kCARD_ResponseTypeR1b) || in SDIF_ReadCommandResponse()
347 … (command->responseType == (uint32_t)kCARD_ResponseTypeR6) || in SDIF_ReadCommandResponse()
348 … (command->responseType == (uint32_t)kCARD_ResponseTypeR5))) in SDIF_ReadCommandResponse()
350 if (((command->responseErrorFlags) & (command->response[0U])) != 0UL) in SDIF_ReadCommandResponse()
360 static status_t SDIF_WaitCommandDone(SDIF_Type *base, sdif_command_t *command) in SDIF_WaitCommandDone() argument
379 return SDIF_ReadCommandResponse(base, command); in SDIF_WaitCommandDone()
1301 if (SDIF_SendCommand(base, transfer->command, 0UL) != kStatus_Success) in SDIF_TransferBlocking()
1306 if (SDIF_WaitCommandDone(base, transfer->command) != kStatus_Success) in SDIF_TransferBlocking()
1352 handle->command = transfer->command; in SDIF_TransferNonBlocking()
1389 return SDIF_SendCommand(base, transfer->command, 0UL); in SDIF_TransferNonBlocking()
1456 assert(handle->command != NULL); in SDIF_TransferHandleCommand()
1474 (SDIF_ReadCommandResponse(base, handle->command) != kStatus_Success)) in SDIF_TransferHandleCommand()
1492 handle->command = NULL; in SDIF_TransferHandleCommand()