diff options
author | Vasil Zlatanov <v@skozl.com> | 2017-05-03 23:03:49 +0100 |
---|---|---|
committer | Vasil Zlatanov <v@skozl.com> | 2017-05-03 23:03:49 +0100 |
commit | a4ebe5ffd1d6e1122bad5ea1c28177528df8f62d (patch) | |
tree | 6564dac0551108ac509a4d760653e0c00b62bc32 | |
parent | 8f5d8626ff7be8237e227d18f8151a8ad1f72f43 (diff) | |
download | e2-switch-a4ebe5ffd1d6e1122bad5ea1c28177528df8f62d.tar.gz e2-switch-a4ebe5ffd1d6e1122bad5ea1c28177528df8f62d.tar.bz2 e2-switch-a4ebe5ffd1d6e1122bad5ea1c28177528df8f62d.zip |
Add write method to Counter
-rw-r--r-- | src/counter.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/counter.h b/src/counter.h index e0126db..978974d 100644 --- a/src/counter.h +++ b/src/counter.h @@ -13,6 +13,10 @@ public: int read() { return _count; } + + int write(int new_count) { + _count = new_count; + } private: InterruptIn _interrupt; |