From f2f7c169ea62b510e03a8f259f5d9ea0e7a7e8b4 Mon Sep 17 00:00:00 2001 From: dak664 Date: Tue, 3 Aug 2010 20:01:21 +0000 Subject: [PATCH] Reduce RIME max time to fit in 16 bit timer --- platform/avr-raven/contiki-conf.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/platform/avr-raven/contiki-conf.h b/platform/avr-raven/contiki-conf.h index c2e4883de..d2ffcb023 100644 --- a/platform/avr-raven/contiki-conf.h +++ b/platform/avr-raven/contiki-conf.h @@ -43,12 +43,20 @@ #ifndef __CONTIKI_CONF_H__ #define __CONTIKI_CONF_H__ -/* MCU, Clock rate, ticks per second */ +/* MCU and clock rate */ +#define MCU_MHZ 8 #define PLATFORM PLATFORM_AVR #define RAVEN_REVISION RAVEN_D -#define MCU_MHZ 8 + +/* Clock ticks per second */ #define CLOCK_CONF_SECOND 125 +/* Since clock_time_t is 16 bits, maximum interval is 524 seconds */ +#define RIME_CONF_BROADCAST_ANNOUNCEMENT_MAX_TIME CLOCK_CONF_SECOND * 524UL /*Default uses 600*/ + +/* Maximum time interval (used for timers) */ +#define INFINITE_TIME 0xffff + /* COM port to be used for SLIP connection */ #define SLIP_PORT RS232_PORT_0