Fix bitwise negations using the boolean operator
This commit is contained in:
parent
1d8ccfdfca
commit
16fbf892ba
@ -28,7 +28,7 @@ static volatile struct FLASH* regs = (struct FLASH*)FLASH_BASE_ADDRESS;
|
||||
void flash_configure(enum FlashPreset preset)
|
||||
{
|
||||
//restore default configuration
|
||||
regs->ACR.word &= !0x3f;
|
||||
regs->ACR.word &= ~0x3f;
|
||||
regs->ACR.word |= 0x30;
|
||||
|
||||
//apply new configuration
|
||||
|
||||
@ -94,7 +94,7 @@ static void apply_default_preset(void)
|
||||
while (regs->CR.HSIRDY != 0x1);
|
||||
|
||||
//set HSI as main clock source and disable prescalers
|
||||
regs->CFGR.word &= !0x077fff3;
|
||||
regs->CFGR.word &= ~0x077fff3;
|
||||
|
||||
//disable all options
|
||||
regs->CR.HSITRIM = 0x10;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user