diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2012-08-07 16:50:46 +0200 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2012-08-07 16:50:46 +0200 |
commit | e586c178073b9a0fee90d5fc8e795d266ebd7b7d (patch) | |
tree | ca9a9c40bab37d5af440c80833755223e2bdd946 /rcc/flash.cpp |
Initial import.
Most sources are split off from suzumebachi project revision 2fc77d2 as is with some path changes. New build rules introduced.
Diffstat (limited to 'rcc/flash.cpp')
-rw-r--r-- | rcc/flash.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/rcc/flash.cpp b/rcc/flash.cpp new file mode 100644 index 0000000..2b0fb69 --- /dev/null +++ b/rcc/flash.cpp @@ -0,0 +1,17 @@ +#include "flash.h" + +void flash_init() { + #if defined(STM32F1) + + // Set flash latency. + FLASH.ACR = 0x12; + + #elif defined(STM32F4) + + // Set flash latency. + FLASH.ACR = 0x105; + + while(FLASH.ACR != 0x105); + + #endif +} |