Fix style issues in STM peripheral drivers

This commit is contained in:
2022-07-16 12:46:52 +02:00
parent d5780500f3
commit 14ea4d22fe
9 changed files with 292 additions and 275 deletions

View File

@@ -76,12 +76,14 @@ int stm_option_bytes_program(const struct option_bytes *opts)
reg |= (opts->read_protection << 8) & FLASH_OPTCR_RDP;
reg |= (opts->wdg_sw << 5) & FLASH_OPTCR_WDG_SW;
while (FLASH->SR & FLASH_SR_BSY);
while (FLASH->SR & FLASH_SR_BSY)
;
FLASH->OPTCR = reg;
FLASH->OPTCR |= FLASH_OPTCR_OPTSTRT;
__DSB();
while (FLASH->SR & FLASH_SR_BSY);
while (FLASH->SR & FLASH_SR_BSY)
;
FLASH->OPTCR |= FLASH_OPTCR_OPTLOCK;