Skip to content

Commit 1125294

Browse files
janjongboomadbridge
authored andcommitted
STM32F4_HAL_MMC erase command check is wrong. == has higher precedence than &
1 parent a937ccb commit 1125294

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

targets/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal_mmc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1316,7 +1316,7 @@ HAL_StatusTypeDef HAL_MMC_Erase(MMC_HandleTypeDef *hmmc, uint32_t BlockStartAdd,
13161316
hmmc->State = HAL_MMC_STATE_BUSY;
13171317

13181318
/* Check if the card command class supports erase command */
1319-
if((hmmc->MmcCard.Class) & SDIO_CCCC_ERASE == 0U)
1319+
if(((hmmc->MmcCard.Class) & SDIO_CCCC_ERASE) == 0U)
13201320
{
13211321
/* Clear all the static flags */
13221322
__HAL_MMC_CLEAR_FLAG(hmmc, SDIO_STATIC_FLAGS);

0 commit comments

Comments
 (0)