Fix bitwise negations using the boolean operator

This commit is contained in:
Steins7 2023-05-08 20:52:18 +02:00
parent 1d8ccfdfca
commit 16fbf892ba
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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;