From d0400d63dfca33d3839fafc1553357150cd19eca Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 15 Nov 2018 16:06:11 +0100 Subject: MSP430: Add "counter" driver --- src/arch/msp430fr5969lp/Makefile.inc | 4 ++++ src/arch/msp430fr5969lp/driver/counter.cc | 7 +++++++ 2 files changed, 11 insertions(+) create mode 100644 src/arch/msp430fr5969lp/driver/counter.cc (limited to 'src/arch') diff --git a/src/arch/msp430fr5969lp/Makefile.inc b/src/arch/msp430fr5969lp/Makefile.inc index 49e0725..6c4b62a 100644 --- a/src/arch/msp430fr5969lp/Makefile.inc +++ b/src/arch/msp430fr5969lp/Makefile.inc @@ -49,6 +49,10 @@ ifneq ($(findstring timer,${arch_drivers}), ) CXX_TARGETS += src/arch/msp430fr5969lp/driver/timer.cc endif +ifneq ($(findstring counter,${arch_drivers}), ) + CXX_TARGETS += src/arch/msp430fr5969lp/driver/counter.cc +endif + ifneq (${cpu_freq}, ) COMMON_FLAGS += -DF_CPU=${cpu_freq}UL else diff --git a/src/arch/msp430fr5969lp/driver/counter.cc b/src/arch/msp430fr5969lp/driver/counter.cc new file mode 100644 index 0000000..62ac778 --- /dev/null +++ b/src/arch/msp430fr5969lp/driver/counter.cc @@ -0,0 +1,7 @@ +#include "driver/counter.h" + +#if defined(TIMER_CYCLES) +#warn "timer_cycles and counter are mutually exclusive. Expect odd behaviour." +#endif + +Counter counter; -- cgit v1.2.3