Loading include/arch/msp430fr5994lp/driver/counter.h +2 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ #include <stdint.h> typedef uint16_t counter_value_t; typedef uint8_t counter_overflow_t; typedef uint16_t counter_overflow_t; class Counter { private: Loading @@ -13,7 +13,7 @@ class Counter { public: uint16_t value; volatile uint8_t overflow; volatile uint16_t overflow; Counter() : overflow(0) {} Loading src/arch/msp430fr5994lp/driver/counter.cc +1 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ Counter counter; __attribute__((interrupt(TIMER2_A1_VECTOR))) void handle_timer2_overflow() { if (TA2IV == 0x0e) { if (counter.overflow < 255) { if (counter.overflow < 65535) { counter.overflow++; } } Loading Loading
include/arch/msp430fr5994lp/driver/counter.h +2 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ #include <stdint.h> typedef uint16_t counter_value_t; typedef uint8_t counter_overflow_t; typedef uint16_t counter_overflow_t; class Counter { private: Loading @@ -13,7 +13,7 @@ class Counter { public: uint16_t value; volatile uint8_t overflow; volatile uint16_t overflow; Counter() : overflow(0) {} Loading
src/arch/msp430fr5994lp/driver/counter.cc +1 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ Counter counter; __attribute__((interrupt(TIMER2_A1_VECTOR))) void handle_timer2_overflow() { if (TA2IV == 0x0e) { if (counter.overflow < 255) { if (counter.overflow < 65535) { counter.overflow++; } } Loading