From 49012588461f1a43e9e476f676d946d91c3df9e7 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Sun, 29 Mar 2015 21:37:03 +0200 Subject: Added STM32L0 support. --- rcc/flash.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'rcc/flash.h') diff --git a/rcc/flash.h b/rcc/flash.h index abb3484..d53fa2c 100644 --- a/rcc/flash.h +++ b/rcc/flash.h @@ -4,18 +4,33 @@ #include struct FLASH_t { + #if defined(STM32F1) || defined(STM32F3) volatile uint32_t ACR; volatile uint32_t KEYR; volatile uint32_t OPTKEYR; volatile uint32_t SR; volatile uint32_t CR; - #if defined(STM32F1) || defined(STM32F3) volatile uint32_t AR; volatile uint32_t RESERVED; volatile uint32_t OBR; volatile uint32_t WRPR; #elif defined(STM32F4) + volatile uint32_t ACR; + volatile uint32_t KEYR; + volatile uint32_t OPTKEYR; + volatile uint32_t SR; + volatile uint32_t CR; volatile uint32_t OPTCR; + #elif defined(STM32L0) + volatile uint32_t ACR; + volatile uint32_t PECR; + volatile uint32_t PDKEYR; + volatile uint32_t PKEYR; + volatile uint32_t PRGKEYR; + volatile uint32_t OPTKEYR; + volatile uint32_t SR; + volatile uint32_t OPTR; + volatile uint32_t WRPROT; #endif }; @@ -23,6 +38,8 @@ struct FLASH_t { static FLASH_t& FLASH = *(FLASH_t*)0x40022000; #elif defined(STM32F4) static FLASH_t& FLASH = *(FLASH_t*)0x40023c00; +#elif defined(STM32L0) +static FLASH_t& FLASH = *(FLASH_t*)0x40022000; #endif void flash_init(); -- cgit v1.2.3