summaryrefslogtreecommitdiff
path: root/lightctrl.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2012-09-20 05:18:03 +0200
committerDavid Lamparter <equinox@diac24.net>2012-09-20 05:18:52 +0200
commit82e31518b134cfd90eda8c096b971903a97708c0 (patch)
tree482e855d4ef5ab96a426f0d5a293712973ad3460 /lightctrl.c
parent2bae1f8a73bdd5fca71fd3e60807d6b618e675d1 (diff)
lightctrl: 1 second system tick
Diffstat (limited to 'lightctrl.c')
-rw-r--r--lightctrl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lightctrl.c b/lightctrl.c
index 659ac26..0a46805 100644
--- a/lightctrl.c
+++ b/lightctrl.c
@@ -24,6 +24,7 @@ const uint8_t __signature[3] __attribute__((section (".signature"), used)) =
#define D_TAST 7
#include "uart.c"
+#include "tick.c"
#include "dali2.c"
#include "dali_ctl.c"
#include "dim.c"
@@ -74,6 +75,7 @@ int main(void)
PORTD &= ~(1 << D_LED1);
uart_init();
+ tick_init();
can_preinit();
dali_init();
dim_init();
@@ -138,6 +140,7 @@ int main(void)
uint8_t buffer[8] = {0, 0, 0, 0, 0, 0, 0, 0};
uint8_t base = (ctr << 1) & 070, map = dali_map[(ctr >> 2) & 7], dlc = 0;
+ uart_puttick();
uart_puts("ll");
uart_puthex(base);
uart_puts("> ");
@@ -161,6 +164,7 @@ int main(void)
case 1024:
can_send(0xe7000000, 8, (uint8_t *)&dalistat);
+ uart_puttick();
uart_puts("dali stats: ");
uart_puthex16(dalistat.rxok);
uart_puts(" ok ");