From 4717cf0a1d6c210a362e8bdf63265c4910e2c8cc Mon Sep 17 00:00:00 2001 From: JF Date: Sun, 24 May 2020 20:30:06 +0200 Subject: Add driver for writing into the internal flash. Write the OK flag for mcuboot using this driver. --- src/drivers/InternalFlash.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/drivers/InternalFlash.h (limited to 'src/drivers/InternalFlash.h') 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 + +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 -- cgit v1.2.3