From 862b815f87cc57a0c15fc2a70fbbb6400a2a940f Mon Sep 17 00:00:00 2001 From: Anton Potapov Date: Tue, 3 May 2022 16:41:17 +0300 Subject: [PATCH] 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 b8e98f351f3..2e2b02fd252 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