Simple counter class, non-volatile between resets and power on/off.
Simple Counter class, used to store count array in non-volatile flash memory between resets and power on/off.
Diff: Counter.h
- Revision:
- 3:c15c22484205
- Parent:
- 2:f02ac448ecd3
--- a/Counter.h Mon Nov 12 19:08:35 2018 +0000 +++ b/Counter.h Fri Nov 16 14:51:40 2018 +0000 @@ -47,6 +47,14 @@ * */ void init(void); + /** Decrement count + * + * Simply decrement value of index + * Private to disallow access for this specific purpose; + * @param index Index of count array to be decremented + * + */ + void decrement(int index); public: @@ -80,6 +88,12 @@ * */ void increment(int index); + /** Clears Count + * + * RESETS count array + * + */ + void clear(); }; #endif \ No newline at end of file