Skip to content

Commit

Permalink
drivers: flash: stm32: Update SR define
Browse files Browse the repository at this point in the history
Following update of stm32wb package, FLASH_FLAG_SR_ERROR
has been renamed to FLASH_FLAG_SR_ERRORS.
Update driver to fix compilation issue.


Signed-off-by: Erwan Gouriou <[email protected]>
  • Loading branch information
erwango authored and galak committed Jan 15, 2020
1 parent 7165803 commit fc85361
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/flash/flash_stm32wbx.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,12 @@ int flash_stm32_check_status(struct device *dev)
u32_t error = 0;

/* Save Flash errors */
error = (regs->sr & FLASH_FLAG_SR_ERROR);
error = (regs->sr & FLASH_FLAG_SR_ERRORS);
error |= (regs->eccr & FLASH_FLAG_ECCC);

/* Clear systematic Option and Enginneering bits validity error */
if (error & FLASH_FLAG_OPTVERR) {
regs->sr |= FLASH_FLAG_SR_ERROR;
regs->sr |= FLASH_FLAG_SR_ERRORS;
return 0;
}

Expand Down

0 comments on commit fc85361

Please sign in to comment.