Moved the definition of the channel check rate used by the radio duty

cycling layer. This definition was previously held in net/mac/mac.h,
with the name MAC_CONF_CHANNEL_CHECK_RATE. But since the rate is used
by the radio duty cycling layer, it makes more sense to change its
name to reflect this. Also, the configuration option should be tied to
the netstack configuration instead.

So the new configuration option is called
NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE.
This commit is contained in:
adamdunkels 2010-10-03 20:37:32 +00:00
parent d70783528f
commit ae88ed04f1
5 changed files with 26 additions and 24 deletions

View file

@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: netstack.h,v 1.5 2010/03/01 13:30:21 nifi Exp $
* $Id: netstack.h,v 1.6 2010/10/03 20:37:32 adamdunkels Exp $
*/
/**
@ -67,6 +67,20 @@
#endif /* NETSTACK_CONF_RDC */
#endif /* NETSTACK_RDC */
#ifndef NETSTACK_RDC_CHANNEL_CHECK_RATE
#ifdef NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE
#define NETSTACK_RDC_CHANNEL_CHECK_RATE NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE
#else /* NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE */
#define NETSTACK_RDC_CHANNEL_CHECK_RATE 4
#endif /* NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE */
#endif /* NETSTACK_RDC_CHANNEL_CHECK_RATE */
#if (NETSTACK_RDC_CHANNEL_CHECK_RATE & (NETSTACK_RDC_CHANNEL_CHECK_RATE - 1)) != 0
#error NETSTACK_RDC_CONF_CHANNEL_CHECK_RATE must be a power of two (i.e., 1, 2, 4, 8, 16, 32, 64, ...).
#error Change NETSTACK_RDC_CONF_CHANNEL_CHECK_RATE in contiki-conf.h, project-conf.h or in your Makefile.
#endif
#ifndef NETSTACK_RADIO
#ifdef NETSTACK_CONF_RADIO
#define NETSTACK_RADIO NETSTACK_CONF_RADIO