From d244dbee97d17031d4e22c06f7e31f3b17764440 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 3 Dec 2018 10:47:32 +0100 Subject: msp430 counter: Switch to new API --- include/arch/msp430fr5969lp/driver/counter.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/arch') diff --git a/include/arch/msp430fr5969lp/driver/counter.h b/include/arch/msp430fr5969lp/driver/counter.h index 851c32d..e7f0507 100644 --- a/include/arch/msp430fr5969lp/driver/counter.h +++ b/include/arch/msp430fr5969lp/driver/counter.h @@ -6,6 +6,7 @@ class Counter { Counter(const Counter ©); public: + uint16_t value; uint8_t overflowed; Counter() : overflowed(0) {} @@ -17,9 +18,9 @@ class Counter { TA2CTL |= TACLR; } - inline uint16_t stop() { + inline void stop() { TA2CTL = 0; - return TA2R; + value = TA2R; } }; -- cgit v1.2.3