flash based config testing

Dependencies:   mbed

Committer:
bwang
Date:
Thu Mar 02 07:04:47 2017 +0000
Revision:
1:df6bbacb7bb9
Parent:
PreferenceWriter.h@0:941e150e78b6
now with configuration terminal!

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bwang 0:941e150e78b6 1 #ifndef __PREFERENCE_WRITER_H
bwang 0:941e150e78b6 2 #define __PREFERENCE_WRITER_H
bwang 0:941e150e78b6 3
bwang 0:941e150e78b6 4 #include "mbed.h"
bwang 0:941e150e78b6 5 #include "FlashWriter.h"
bwang 0:941e150e78b6 6
bwang 0:941e150e78b6 7 class PreferenceWriter {
bwang 0:941e150e78b6 8 public:
bwang 0:941e150e78b6 9 PreferenceWriter(uint32_t sector);
bwang 0:941e150e78b6 10 void open();
bwang 1:df6bbacb7bb9 11 bool ready();
bwang 0:941e150e78b6 12 void write(int x, int index);
bwang 0:941e150e78b6 13 void write(float x, int index);
bwang 0:941e150e78b6 14 void flush();
bwang 0:941e150e78b6 15 void load();
bwang 0:941e150e78b6 16 void close();
bwang 0:941e150e78b6 17 private:
bwang 0:941e150e78b6 18 FlashWriter *writer;
bwang 0:941e150e78b6 19 uint32_t __sector;
bwang 1:df6bbacb7bb9 20 bool __ready;
bwang 0:941e150e78b6 21 };
bwang 0:941e150e78b6 22
bwang 0:941e150e78b6 23 #endif