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
Fork of el17ajf by
Diff: Prefs/Prefs.h
- Revision:
- 19:370d83a8dc33
- Child:
- 20:cd96f98f5f79
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Prefs/Prefs.h Wed Apr 03 16:18:26 2019 +0000 @@ -0,0 +1,24 @@ +#ifndef PREFS_H +#define PREFS_H + +#include "mbed.h" +#include "SDFileSystem.h" + +class Prefs { +public: + enum Key { + HIGHSCORE1, HIGHSCORE2, HIGHSCORE3, + HIGHSCORE1_PLAYER, HIGHSCORE2_PLAYER, HIGHSCORE3_PLAYER, + LAST_PLAYER + }; + Prefs(); + ~Prefs(); + void setKey(Key key, int value); + int getKey(Key key); + void resetAll(); +private: + SDFileSystem * sd; + FILE * file; +}; + +#endif \ No newline at end of file