From a4ebe5ffd1d6e1122bad5ea1c28177528df8f62d Mon Sep 17 00:00:00 2001 From: Vasil Zlatanov Date: Wed, 3 May 2017 23:03:49 +0100 Subject: Add write method to Counter --- src/counter.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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; -- cgit v1.2.3-54-g00ecf