STM32F4_HAL_MMC erase command check is wrong. == has higher precedence than &

pull/4851/head
Jan Jongboom 2017-08-03 12:59:52 +02:00
parent acdd7dd424
commit 54929f6aee
1 changed files with 1 additions and 1 deletions

View File

@ -1316,7 +1316,7 @@ HAL_StatusTypeDef HAL_MMC_Erase(MMC_HandleTypeDef *hmmc, uint32_t BlockStartAdd,
hmmc->State = HAL_MMC_STATE_BUSY;
/* Check if the card command class supports erase command */
if((hmmc->MmcCard.Class) & SDIO_CCCC_ERASE == 0U)
if(((hmmc->MmcCard.Class) & SDIO_CCCC_ERASE) == 0U)
{
/* Clear all the static flags */
__HAL_MMC_CLEAR_FLAG(hmmc, SDIO_STATIC_FLAGS);