diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2014-09-16 17:22:55 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2014-09-16 17:22:55 +0200 |
commit | 69cb10f51321a2443a3314c40fb2b8556aa804c0 (patch) | |
tree | 3db35b9833327a0b18111cec23047e706dd72436 /ui.c | |
parent | b8d4400e30dc490e543018fe4de0a9d9775f18c2 (diff) | |
download | hourglass-69cb10f51321a2443a3314c40fb2b8556aa804c0.tar.gz hourglass-69cb10f51321a2443a3314c40fb2b8556aa804c0.tar.bz2 hourglass-69cb10f51321a2443a3314c40fb2b8556aa804c0.zip |
timer: Support timeouts > 8s
Diffstat (limited to 'ui.c')
-rw-r--r-- | ui.c | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -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 (); |