/******************************************************************************* * Function Name : SDIO_GetResponse * Description : Returns response received from the card for the last command. * Input : - SDIO_RESP: Specifies the SDIO response register. * This parameter can be one of the following values: * - SDIO_RESP1: Response Register 1 * - SDIO_RESP2: Response Register 2 * - SDIO_RESP3: Response Register 3 * - SDIO_RESP4: Response Register 4 * Output : None * Return : The Corresponding response register value. *******************************************************************************/ u32 SDIO_GetResponse(u32 SDIO_RESP) { /* Check the parameters */ assert_param(IS_SDIO_RESP(SDIO_RESP)); return (*(vu32 *)(SDIO_RESP_ADDR + SDIO_RESP)); }
/** * @brief Returns response received from the card for the last command. * @param SDIO_RESP: Specifies the SDIO response register. * This parameter can be one of the following values: * @arg SDIO_RESP1: Response Register 1 * @arg SDIO_RESP2: Response Register 2 * @arg SDIO_RESP3: Response Register 3 * @arg SDIO_RESP4: Response Register 4 * @retval : The Corresponding response register value. */ uint32_t SDIO_GetResponse(uint32_t SDIO_RESP) { /* Check the parameters */ assert_param(IS_SDIO_RESP(SDIO_RESP)); return (*(__IO uint32_t *)(SDIO_RESP_ADDR + SDIO_RESP)); }
/** * @brief Returns response received from the card for the last command. * @param SDIO_RESP: Specifies the SDIO response register. * This parameter can be one of the following values: * @arg SDIO_RESP1: Response Register 1 * @arg SDIO_RESP2: Response Register 2 * @arg SDIO_RESP3: Response Register 3 * @arg SDIO_RESP4: Response Register 4 * @retval The Corresponding response register value. */ uint32_t SDIO_GetResponse(uint32_t SDIO_RESP) { __IO uint32_t tmp = 0; /* Check the parameters */ assert_param(IS_SDIO_RESP(SDIO_RESP)); tmp = SDIO_RESP_ADDR + SDIO_RESP; return (*(__IO uint32_t*)tmp); }
/** * @brief Return the response received from the card for the last command * @param SDIO_RESP: Specifies the SDIO response register. * This parameter can be one of the following values: * @arg SDIO_RESP1: Response Register 1 * @arg SDIO_RESP2: Response Register 2 * @arg SDIO_RESP3: Response Register 3 * @arg SDIO_RESP4: Response Register 4 * @retval The Corresponding response register value */ uint32_t SDIO_GetResponse(SDIO_TypeDef *SDIOx, uint32_t Response) { __IO uint32_t tmp = 0; /* Check the parameters */ assert_param(IS_SDIO_RESP(Response)); /* Get the response */ tmp = SDIO_RESP_ADDR + Response; return (*(__IO uint32_t *) tmp); }