summaryrefslogtreecommitdiff
path: root/src/drivers/InternalFlash.h
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-05-24 20:30:06 +0200
committerJF <jf@codingfield.com>2020-05-24 20:30:06 +0200
commit4717cf0a1d6c210a362e8bdf63265c4910e2c8cc (patch)
tree910a75143df2fa141451b419d26470a060b748c4 /src/drivers/InternalFlash.h
parent00451ef05b7b793c7cd098cc3834c6874c51e56e (diff)
Add driver for writing into the internal flash.
Write the OK flag for mcuboot using this driver.
Diffstat (limited to 'src/drivers/InternalFlash.h')
-rw-r--r--src/drivers/InternalFlash.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/drivers/InternalFlash.h b/src/drivers/InternalFlash.h
new file mode 100644
index 00000000..fd25bf46
--- /dev/null
+++ b/src/drivers/InternalFlash.h
@@ -0,0 +1,15 @@
+#pragma once
+
+#include <cstdint>
+
+namespace Pinetime {
+ namespace Drivers {
+ class InternalFlash {
+ public:
+ static void ErasePage(uint32_t address);
+ static void WriteWord(uint32_t address, uint32_t value);
+ private:
+ static inline void Wait();
+ };
+ }
+} \ No newline at end of file