You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/05/03 15:07:24 UTC
[incubator-nuttx] branch master updated: Restore lost flash define for stm32.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 862b815f87 Restore lost flash define for stm32.
862b815f87 is described below
commit 862b815f87cc57a0c15fc2a70fbbb6400a2a940f
Author: Anton Potapov <a....@geoscan.aero>
AuthorDate: Tue May 3 16:41:17 2022 +0300
Restore lost flash define for stm32.
---
arch/arm/src/stm32/hardware/stm32_flash.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/src/stm32/hardware/stm32_flash.h b/arch/arm/src/stm32/hardware/stm32_flash.h
index b8e98f351f..2e2b02fd25 100644
--- a/arch/arm/src/stm32/hardware/stm32_flash.h
+++ b/arch/arm/src/stm32/hardware/stm32_flash.h
@@ -592,6 +592,7 @@
# define FLASH_OPTCR_WDG_SW (1 << 5) /* Bit 5: WDG_SW */
# define FLASH_OPTCR_RDP_SHIFT (8) /* Bits 8-15: Read protect */
# define FLASH_OPTCR_RDP_MASK (0xff << FLASH_OPTCR_RDP_SHIFT)
+# define FLASH_OPTCR_RDP(n) ((uint32_t)(n) << FLASH_OPTCR_RDP_SHIFT)
# define FLASH_OPTCR_NWRP_SHIFT (16) /* Bits 16-27: Not write protect */
# define FLASH_OPTCR_NWRP_MASK (0xfff << FLASH_OPTCR_NWRP_SHIFT)
#endif