Added a configuration option for setting the MAC channel check rate (which must be a power of two). The configuration is independent of the MAC protocol.
This commit is contained in:
parent
f06c7a8ffd
commit
181213124b
4 changed files with 18 additions and 7 deletions
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: lpp.c,v 1.29 2010/01/25 11:43:32 adamdunkels Exp $
|
||||
* $Id: lpp.c,v 1.30 2010/02/02 23:28:58 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -90,7 +90,7 @@
|
|||
#ifdef LPP_CONF_OFF_TIME
|
||||
#define OFF_TIME LPP_CONF_OFF_TIME
|
||||
#else
|
||||
#define OFF_TIME (CLOCK_SECOND / 2 - LISTEN_TIME)
|
||||
#define OFF_TIME (CLOCK_SECOND / MAC_CHANNEL_CHECK_RATE - LISTEN_TIME)
|
||||
#endif /* LPP_CONF_OFF_TIME */
|
||||
|
||||
#define PACKET_LIFETIME (LISTEN_TIME + OFF_TIME)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue