diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-03-05 15:42:41 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-03-05 15:42:41 +0100 |
commit | 32b799a03cf07de504a77b19432dc523166f472b (patch) | |
tree | 7461a1476ade1bfcd68a4236de35167dd402b0f4 /include/arch/msp430fr5969lp/driver | |
parent | bda22fb5f8c9267943b9653031d279fe14edcd2a (diff) |
counter: rename overflowed to overflow
Diffstat (limited to 'include/arch/msp430fr5969lp/driver')
-rw-r--r-- | include/arch/msp430fr5969lp/driver/counter.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/include/arch/msp430fr5969lp/driver/counter.h b/include/arch/msp430fr5969lp/driver/counter.h index 501808b..b95aba1 100644 --- a/include/arch/msp430fr5969lp/driver/counter.h +++ b/include/arch/msp430fr5969lp/driver/counter.h @@ -1,8 +1,11 @@ +#ifndef COUNTER_H +#define COUNTER_H + #include <msp430.h> #include <stdint.h> -typedef counter_value_t uint16_t; -typedef counter_overflowed_t uint8_t; +typedef uint16_t counter_value_t; +typedef uint8_t counter_overflow_t; class Counter { private: @@ -10,12 +13,12 @@ class Counter { public: uint16_t value; - uint8_t overflowed; + uint8_t overflow; - Counter() : overflowed(0) {} + Counter() : overflow(0) {} inline void start() { - overflowed = 0; + overflow = 0; TA2CTL = TASSEL__SMCLK | ID__1 | MC__CONTINUOUS; TA2EX0 = 0; TA2CTL |= TACLR; @@ -28,3 +31,5 @@ class Counter { }; extern Counter counter; + +#endif |