Made polite announcement times configurable, added missing right-brace

This commit is contained in:
adamdunkels 2009-03-01 10:43:57 +00:00
parent 3adf8e5807
commit aa2f7a3399

View file

@ -33,7 +33,7 @@
* *
* This file is part of the Contiki operating system. * This file is part of the Contiki operating system.
* *
* $Id: rime.c,v 1.19 2009/03/01 10:29:50 adamdunkels Exp $ * $Id: rime.c,v 1.20 2009/03/01 10:43:57 adamdunkels Exp $
*/ */
/** /**
@ -61,6 +61,19 @@ const struct mac_driver *rime_mac;
#define POLITE_ANNOUNCEMENT_CHANNEL 1 #define POLITE_ANNOUNCEMENT_CHANNEL 1
#endif /* RIME_CONF_POLITE_ANNOUNCEMENT_CHANNEL */ #endif /* RIME_CONF_POLITE_ANNOUNCEMENT_CHANNEL */
#ifdef RIME_CONF_POLITE_ANNOUNCEMENT_START_TIME
#define POLITE_ANNOUNCEMENT_START_TIME RIME_CONF_POLITE_ANNOUNCEMENT_START_TIME
#else /* RIME_CONF_POLITE_ANNOUNCEMENT_START_TIME */
#define POLITE_ANNOUNCEMENT_START_TIME CLOCK_SECOND * 8
#endif /* RIME_CONF_POLITE_ANNOUNCEMENT_START_TIME */
#ifdef RIME_CONF_POLITE_ANNOUNCEMENT_MAX_TIME
#define POLITE_ANNOUNCEMENT_MAX_TIME RIME_CONF_POLITE_ANNOUNCEMENT_MAX_TIME
#else /* RIME_CONF_POLITE_ANNOUNCEMENT_MAX_TIME */
#define POLITE_ANNOUNCEMENT_MAX_TIME CLOCK_SECOND * 64
#endif /* RIME_CONF_POLITE_ANNOUNCEMENT_MAX_TIME */
LIST(sniffers); LIST(sniffers);
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
@ -115,8 +128,8 @@ rime_init(const struct mac_driver *m)
* with announcements. * with announcements.
*/ */
polite_announcement_init(POLITE_ANNOUNCEMENT_CHANNEL, polite_announcement_init(POLITE_ANNOUNCEMENT_CHANNEL,
CLOCK_SECOND * 8, POLITE_ANNOUNCEMENT_START_TIME,
CLOCK_SECOND * 64); POLITE_ANNOUNCEMENT_MAX_TIME);
#endif /* ! RIME_CONF_NO_POLITE_ANNOUCEMENTS */ #endif /* ! RIME_CONF_NO_POLITE_ANNOUCEMENTS */
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
@ -137,6 +150,7 @@ rime_output(void)
} }
} }
} }
}
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
/** @} */ /** @} */