Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed-dev-f303 FastPWM3
Diff: PreferenceWriter/PreferenceWriter.h
- Revision:
 - 23:2adf23ee0305
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PreferenceWriter/PreferenceWriter.h	Wed Apr 05 20:54:16 2017 +0000
@@ -0,0 +1,23 @@
+#ifndef __PREFERENCE_WRITER_H
+#define __PREFERENCE_WRITER_H
+
+#include "mbed.h"
+#include "FlashWriter.h"
+
+class PreferenceWriter {
+public:
+    PreferenceWriter(uint32_t sector);
+    void open();
+    bool ready();
+    void write(int x, int index);
+    void write(float x, int index);
+    void flush();
+    void load();
+    void close();
+private:
+    FlashWriter *writer;
+    uint32_t __sector;
+    bool __ready;
+};
+
+#endif
\ No newline at end of file