aboutsummaryrefslogtreecommitdiff
path: root/system-clock/include/flash.h
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2018-01-16 00:02:56 -0700
committerJosh Rahm <joshuarahm@gmail.com>2018-01-16 00:02:56 -0700
commit92c50db2b05818157d46e09f4dec4fa1e96f960b (patch)
treec264b9d183e9c69fb8434712347a5680a41edf3a /system-clock/include/flash.h
parent6d3197d768bf13c1402c1305050ea355f8c79fec (diff)
downloadstm32l4-92c50db2b05818157d46e09f4dec4fa1e96f960b.tar.gz
stm32l4-92c50db2b05818157d46e09f4dec4fa1e96f960b.tar.bz2
stm32l4-92c50db2b05818157d46e09f4dec4fa1e96f960b.zip
able to set the clock speed in MHz.
Diffstat (limited to 'system-clock/include/flash.h')
-rw-r--r--system-clock/include/flash.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/system-clock/include/flash.h b/system-clock/include/flash.h
new file mode 100644
index 0000000..ac63bf9
--- /dev/null
+++ b/system-clock/include/flash.h
@@ -0,0 +1,20 @@
+#ifndef H__FLASH_
+#define H__FLASH_
+
+#include "common.h"
+
+/*
+ * Header file for dealing with flash.
+ */
+
+#define FLASH_BASE 0x40022000
+
+typedef struct {
+ __IO uint32_t ac_r; /* Flash access control register. */
+
+ /* TODO fill out the rest. */
+} PACKED flash_t;
+
+#define FLASH (*(__IO flash_t*) FLASH_BASE)
+
+#endif /* H__FLASH_ */