Subversion Repositories DashDisplay

Rev

Rev 56 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 56 Rev 61
Line 509... Line 509...
509
@endverbatim
509
@endverbatim
510
  * @{
510
  * @{
511
  */
511
  */
512
 
512
 
513
/**
513
/**
514
  * @brief  Send the Data Block Lenght command and check the response
514
  * @brief  Send the Data Block Length command and check the response
515
  * @param  SDIOx: Pointer to SDIO register base
515
  * @param  SDIOx: Pointer to SDIO register base
516
  * @retval HAL status
516
  * @retval HAL status
517
  */
517
  */
518
uint32_t SDMMC_CmdBlockLength(SDIO_TypeDef *SDIOx, uint32_t BlockSize)
518
uint32_t SDMMC_CmdBlockLength(SDIO_TypeDef *SDIOx, uint32_t BlockSize)
519
{
519
{
Line 1097... Line 1097...
1097
 
1097
 
1098
  return errorstate;
1098
  return errorstate;
1099
}
1099
}
1100
 
1100
 
1101
/**
1101
/**
1102
  * @brief  Checks switchable function and switch card function. SDMMC_CMD_HS_SWITCH comand
1102
  * @brief  Checks switchable function and switch card function. SDMMC_CMD_HS_SWITCH command
1103
  * @param  SDIOx: Pointer to SDIO register base
1103
  * @param  SDIOx: Pointer to SDIO register base
1104
  * @parame Argument: Argument used for the command
1104
  * @parame Argument: Argument used for the command
1105
  * @retval HAL status
1105
  * @retval HAL status
1106
  */
1106
  */
1107
uint32_t SDMMC_CmdSwitch(SDIO_TypeDef *SDIOx, uint32_t Argument)
1107
uint32_t SDMMC_CmdSwitch(SDIO_TypeDef *SDIOx, uint32_t Argument)
Line 1109... Line 1109...
1109
  SDIO_CmdInitTypeDef  sdmmc_cmdinit;
1109
  SDIO_CmdInitTypeDef  sdmmc_cmdinit;
1110
  uint32_t errorstate;
1110
  uint32_t errorstate;
1111
 
1111
 
1112
  /* Send CMD6 to activate SDR50 Mode and Power Limit 1.44W */
1112
  /* Send CMD6 to activate SDR50 Mode and Power Limit 1.44W */
1113
  /* CMD Response: R1 */
1113
  /* CMD Response: R1 */
1114
  sdmmc_cmdinit.Argument         = Argument; /* SDMMC_SDR25_SWITCH_PATTERN;*/
1114
  sdmmc_cmdinit.Argument         = Argument; /* SDMMC_SDR25_SWITCH_PATTERN */
1115
  sdmmc_cmdinit.CmdIndex         = SDMMC_CMD_HS_SWITCH;
1115
  sdmmc_cmdinit.CmdIndex         = SDMMC_CMD_HS_SWITCH;
1116
  sdmmc_cmdinit.Response         = SDIO_RESPONSE_SHORT;
1116
  sdmmc_cmdinit.Response         = SDIO_RESPONSE_SHORT;
1117
  sdmmc_cmdinit.WaitForInterrupt = SDIO_WAIT_NO;
1117
  sdmmc_cmdinit.WaitForInterrupt = SDIO_WAIT_NO;
1118
  sdmmc_cmdinit.CPSM             = SDIO_CPSM_ENABLE;
1118
  sdmmc_cmdinit.CPSM             = SDIO_CPSM_ENABLE;
1119
  (void)SDIO_SendCommand(SDIOx, &sdmmc_cmdinit);
1119
  (void)SDIO_SendCommand(SDIOx, &sdmmc_cmdinit);
Line 1502... Line 1502...
1502
  return SDMMC_ERROR_NONE;
1502
  return SDMMC_ERROR_NONE;
1503
 
1503
 
1504
}
1504
}
1505
 
1505
 
1506
/**
1506
/**
-
 
1507
  * @brief  Send the Send EXT_CSD command and check the response.
-
 
1508
  * @param  SDIOx: Pointer to SDMMC register base
-
 
1509
  * @param  Argument: Command Argument
-
 
1510
  * @retval HAL status
-
 
1511
  */
-
 
1512
uint32_t SDMMC_CmdSendEXTCSD(SDIO_TypeDef *SDIOx, uint32_t Argument)
-
 
1513
{
-
 
1514
  SDIO_CmdInitTypeDef  sdmmc_cmdinit;
-
 
1515
  uint32_t errorstate;
-
 
1516
 
-
 
1517
  /* Send CMD9 SEND_CSD */
-
 
1518
  sdmmc_cmdinit.Argument         = Argument;
-
 
1519
  sdmmc_cmdinit.CmdIndex         = SDMMC_CMD_HS_SEND_EXT_CSD;
-
 
1520
  sdmmc_cmdinit.Response         = SDIO_RESPONSE_SHORT;
-
 
1521
  sdmmc_cmdinit.WaitForInterrupt = SDIO_WAIT_NO;
-
 
1522
  sdmmc_cmdinit.CPSM             = SDIO_CPSM_ENABLE;
-
 
1523
  (void)SDIO_SendCommand(SDIOx, &sdmmc_cmdinit);
-
 
1524
 
-
 
1525
  /* Check for error conditions */
-
 
1526
  errorstate = SDMMC_GetCmdResp1(SDIOx, SDMMC_CMD_HS_SEND_EXT_CSD,SDIO_CMDTIMEOUT);
-
 
1527
 
-
 
1528
  return errorstate;
-
 
1529
}
-
 
1530
 
-
 
1531
 
-
 
1532
/**
1507
  * @}
1533
  * @}
1508
  */
1534
  */
1509
 
1535
 
1510
#endif /* HAL_SD_MODULE_ENABLED || HAL_MMC_MODULE_ENABLED */
1536
#endif /* HAL_SD_MODULE_ENABLED || HAL_MMC_MODULE_ENABLED */
1511
/**
1537
/**