Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/thirdpin/libopencm3.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Palsson <karlp@tweak.net.au>2018-07-23 00:00:23 +0300
committerKarl Palsson <karlp@tweak.net.au>2018-07-29 23:31:17 +0300
commitc5a3350a7d1d01a6477c3d16e80700ecf313be2d (patch)
treedd9085984ebbc68091b22bc79475c87b57e14845
parent4517ec81fd8ce2003f5344d271c69bdc5b829ee6 (diff)
stm32l: flash: rename option unlock keys or consistency
Paves the way for using common code.
-rw-r--r--include/libopencm3/stm32/common/flash_common_l01.h4
-rw-r--r--lib/stm32/common/flash_common_l01.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/include/libopencm3/stm32/common/flash_common_l01.h b/include/libopencm3/stm32/common/flash_common_l01.h
index 39a031cd..8333df57 100644
--- a/include/libopencm3/stm32/common/flash_common_l01.h
+++ b/include/libopencm3/stm32/common/flash_common_l01.h
@@ -84,8 +84,8 @@
#define FLASH_PRGKEYR_PRGKEY2 ((uint32_t)0x13141516)
/* Option byte key register (FLASH_OPTKEYR) */
-#define FLASH_OPTKEYR_OPTKEY1 ((uint32_t)0xFBEAD9C8)
-#define FLASH_OPTKEYR_OPTKEY2 ((uint32_t)0x24252627)
+#define FLASH_OPTKEYR_KEY1 ((uint32_t)0xFBEAD9C8)
+#define FLASH_OPTKEYR_KEY2 ((uint32_t)0x24252627)
/* --- FLASH_SR values ----------------------------------------------------- */
#define FLASH_SR_OPTVERR (1 << 11)
diff --git a/lib/stm32/common/flash_common_l01.c b/lib/stm32/common/flash_common_l01.c
index 86ec743a..7ca1f48d 100644
--- a/lib/stm32/common/flash_common_l01.c
+++ b/lib/stm32/common/flash_common_l01.c
@@ -72,8 +72,8 @@ void flash_lock_progmem(void)
*/
void flash_unlock_option_bytes(void)
{
- FLASH_OPTKEYR = FLASH_OPTKEYR_OPTKEY1;
- FLASH_OPTKEYR = FLASH_OPTKEYR_OPTKEY2;
+ FLASH_OPTKEYR = FLASH_OPTKEYR_KEY1;
+ FLASH_OPTKEYR = FLASH_OPTKEYR_KEY2;
}
void flash_lock_option_bytes(void)