summaryrefslogtreecommitdiff
path: root/rcc/flash.h
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2015-03-29 21:37:03 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2015-03-29 21:37:03 +0200
commit49012588461f1a43e9e476f676d946d91c3df9e7 (patch)
treed9e6ab6bf279889ca660ddb86f3942d41e54bf3e /rcc/flash.h
parent7b4ba03bc45dfed09759b9d0f99f6ddfde51ac43 (diff)
Added STM32L0 support.
Diffstat (limited to 'rcc/flash.h')
-rw-r--r--rcc/flash.h19
1 files changed, 18 insertions, 1 deletions
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 <stdint.h>
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();