From 03cd533712c59e86651d6d10a7b74cd79c2d88df Mon Sep 17 00:00:00 2001 From: nvt-se Date: Tue, 7 Apr 2009 11:29:08 +0000 Subject: [PATCH] made LISTEN_TIME and OFF_TIME configurable. --- core/net/mac/lpp.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/core/net/mac/lpp.c b/core/net/mac/lpp.c index 0a576a5fa..18e6fc663 100644 --- a/core/net/mac/lpp.c +++ b/core/net/mac/lpp.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: lpp.c,v 1.19 2009/04/06 22:50:35 adamdunkels Exp $ + * $Id: lpp.c,v 1.20 2009/04/07 11:29:08 nvt-se Exp $ */ /** @@ -108,8 +108,17 @@ static struct ctimer timer; static uint8_t is_listening = 0; static clock_time_t off_time_adjustment = 0; +#ifdef LPP_CONF_LISTEN_TIME +#define LISTEN_TIME LPP_CONF_LISTEN_TIME +#else #define LISTEN_TIME (CLOCK_SECOND / 64) +#endif /** LP_CONF_LISTEN_TIME */ + +#ifdef LPP_CONF_OFF_TIME +#define OFF_TIME LPP_CONF_OFF_TIME +#else #define OFF_TIME (CLOCK_SECOND / 4) +#endif /* LPP_CONF_OFF_TIME */ /* If CLOCK_SECOND is less than 4, we may end up with an OFF_TIME that is 0 which will make compilation fail due to a modulo operation in