summaryrefslogtreecommitdiff
path: root/dali_ctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'dali_ctl.c')
-rw-r--r--dali_ctl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/dali_ctl.c b/dali_ctl.c
index ed23ce1..b5eb66b 100644
--- a/dali_ctl.c
+++ b/dali_ctl.c
@@ -41,6 +41,8 @@ static void dali_search_byte(uint16_t cmd)
uint8_t bit = 0x80;
while (bit) {
+ wdt_reset();
+
dali_twice(cmd | (dali_s_byte & ~bit));
if (dali_compare()) {
_delay_ms(1);
@@ -92,6 +94,8 @@ static void dali_search(void)
do {
dali_search_single();
if (!dali_s_notfound) {
+ wdt_reset();
+
uart_puts("dali scan found\t\t");
uart_puthex(dali_sh);
uart_puthex(dali_sm);
@@ -130,10 +134,14 @@ static void dali_search(void)
dali_map[addr >> 3] |= 1 << (addr & 0x7);
} else
uart_puts(" error\n");
+
+ wdt_reset();
dali_send(DALI_C_WITHDRAW);
}
} while (!dali_s_notfound);
+ wdt_reset();
+
dali_twice(DALI_C_TERMINATE);
uart_puts("dali scan end\n");