lib/stm32/BSP/STM32F4xx-Nucleo/stm32f4xx_nucleo.c
HAL_StatusTypeDef SD_IO_WaitResponse(uint8_t Response)
{
  uint32_t timeout = 0xFFFF;

  /* Check if response is got or a timeout is happen */
  while ((SD_IO_ReadByte() != Response) && timeout)
  {
    timeout--;
  }

  if (timeout == 0)
  {
    /* After time out */
    return HAL_TIMEOUT;
  }
  else
  {
    /* Right response got */
    return HAL_OK;
  }
}
/**
  * @brief  Waits response from the SD card
  * @param  Response: Expected response from the SD card
  * @retval HAL_StatusTypeDef HAL Status
  */
@brief  Waits response from the SD card
@param  Response: Expected response from the SD card
@retval HAL_StatusTypeDef HAL Status
@brief Waits response from the SD card @param Response : Expected response from the SD card @retval HAL_StatusTypeDef HAL Status
HAL_StatusTypeDef SD_IO_WaitResponse(uint8_t Response)
{
  uint32_t timeout = 0xFFFF;
  while ((SD_IO_ReadByte() != Response) && timeout)
  {
    timeout--;
  }
  if (timeout == 0)
  {
    return HAL_TIMEOUT;
  }
  else
  {
    return HAL_OK;
  }
}
HAL_StatusTypeDef SD_IO_WaitResponse ( uint8_t Response ) { uint32_t timeout = 0xFFFF ; while ( ( SD_IO_ReadByte ( ) != Response ) && timeout ) { timeout -- ; } if ( timeout == 0 ) { return HAL_TIMEOUT ; } else { return HAL_OK ; } }
@brief  Waits response from the SD card
 @param  Response: Expected response from the SD card
 @retval HAL_StatusTypeDef HAL Status
@brief Waits response from the SD card @param Response : Expected response from the SD card @retval HAL_StatusTypeDef HAL Status
/* Check if response is got or a timeout is happen */ /* After time out */ /* Right response got */