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>2016-08-18 23:36:07 +0200
commit7b2d322df819e8a339cdb534e69d8e205765d3b2 (patch)
treec18a85a712285d6f3939113824eb2f2636833992 /rcc/flash.h
parent29d8f1b4e89f31e2f3b448c4d40c6c2518629686 (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();