Fix gcc 5.4 compiler warnings (#3681)
The order preference in flash_driver would evaluate ! before & but I think checking the bit first is what was intended
This commit is contained in:
committed by
Bertrand Songis
parent
9ea048f2ad
commit
a908d73f1f
@@ -37,7 +37,7 @@ void unlockFlash()
|
||||
|
||||
void lockFlash()
|
||||
{
|
||||
while (!FLASH->SR & FLASH_SR_BSY);
|
||||
while (!(FLASH->SR & FLASH_SR_BSY));
|
||||
FLASH->CR |= FLASH_CR_LOCK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user