summaryrefslogtreecommitdiff
path: root/src/app/ledblink
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2017-12-14 09:35:32 +0100
committerDaniel Friesel <derf@finalrewind.org>2017-12-14 09:35:32 +0100
commit693afffd7b89507916ecd759767b0b7e947dca60 (patch)
tree386783d9faded12240a3fd06eada7dc3dfd867c1 /src/app/ledblink
parente9bebe253fdecee009414bdce7ccdfba83f980e6 (diff)
msp430fr5969lp: Add TIMER_S support
Diffstat (limited to 'src/app/ledblink')
-rw-r--r--src/app/ledblink/main.cc17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/app/ledblink/main.cc b/src/app/ledblink/main.cc
index 740309b..75c9116 100644
--- a/src/app/ledblink/main.cc
+++ b/src/app/ledblink/main.cc
@@ -3,6 +3,13 @@
#include "driver/stdout.h"
#include "driver/uptime.h"
+#ifndef TIMER_CYCLES
+#error makeflag timer_cycles=1 required
+#endif
+#ifndef TIMER_S
+#error makeflag timer_s=1 required
+#endif
+
/*
void check_command(unsigned char argc, char** argv)
{
@@ -89,7 +96,7 @@ void check_command(unsigned char argc, char** argv)
void loop(void)
{
gpio.led_toggle(1);
- kout << dec << uptime.get() << endl;
+ kout << dec << uptime.get_s() << endl;
}
int main(void)
@@ -101,10 +108,10 @@ int main(void)
gpio.led_on(0);
kout << "Hello, World!" << endl;
kout << "Test, World!" << endl;
- kout << dec << uptime.get() << endl;
- kout << dec << uptime.get() << endl;
- kout << dec << uptime.get() << endl;
- kout << dec << uptime.get() << endl;
+ kout << dec << uptime.get_cycles() << endl;
+ kout << dec << uptime.get_cycles() << endl;
+ kout << dec << uptime.get_cycles() << endl;
+ kout << dec << uptime.get_cycles() << endl;
arch.idle_loop();