aboutsummaryrefslogtreecommitdiff
path: root/ui.c
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2014-09-16 17:22:55 +0200
committerLars-Dominik Braun <lars@6xq.net>2014-09-16 17:22:55 +0200
commit69cb10f51321a2443a3314c40fb2b8556aa804c0 (patch)
tree3db35b9833327a0b18111cec23047e706dd72436 /ui.c
parentb8d4400e30dc490e543018fe4de0a9d9775f18c2 (diff)
downloadhourglass-69cb10f51321a2443a3314c40fb2b8556aa804c0.tar.gz
hourglass-69cb10f51321a2443a3314c40fb2b8556aa804c0.tar.bz2
hourglass-69cb10f51321a2443a3314c40fb2b8556aa804c0.zip
timer: Support timeouts > 8s
Diffstat (limited to 'ui.c')
-rw-r--r--ui.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/ui.c b/ui.c
index 3f3179f..7bd393d 100644
--- a/ui.c
+++ b/ui.c
@@ -298,6 +298,35 @@ void uiLoop () {
}
#endif
+#if 0
+ /* timer test mode */
+ timerStart ((uint32_t) 10*1000*1000);
+ while (1) {
+ uint32_t t;
+ while (1) {
+ t = timerHit ();
+ if (t > 0) {
+ break;
+ }
+ cpuSleep ();
+ }
+ puts ("on");
+ fwrite (&t, sizeof (t), 1, stdout);
+ pwmSet (horizonLed (0), PWM_ON);
+
+ while (1) {
+ t = timerHit ();
+ if (t > 0) {
+ break;
+ }
+ cpuSleep ();
+ }
+ puts ("off");
+ fwrite (&t, sizeof (t), 1, stdout);
+ pwmSet (horizonLed (0), PWM_OFF);
+ }
+#endif
+
while (1) {
processSensors ();