1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

gnrc/gomach : Move GNRC_GOMACH_CP_RANDOM_END_US to 'CONIFG_'

This commit is contained in:
Akshai M 2020-05-19 17:44:45 +05:30
parent e6da0bab49
commit 1505ea8e11
2 changed files with 5 additions and 5 deletions

View File

@ -111,12 +111,12 @@ extern "C" {
* *
* Currently, GoMacH's WP is actually composed of * Currently, GoMacH's WP is actually composed of
* @ref CONFIG_GNRC_GOMACH_CP_DURATION_US and (+) * @ref CONFIG_GNRC_GOMACH_CP_DURATION_US and (+)
* @ref GNRC_GOMACH_CP_RANDOM_END_US. We currently introduced this random * @ref CONFIG_GNRC_GOMACH_CP_RANDOM_END_US. We currently introduced this random
* period to avoid beacon collision amongneighbor nodes. This macro may be * period to avoid beacon collision among neighbor nodes. This macro may be
* removed in the future. * removed in the future.
*/ */
#ifndef GNRC_GOMACH_CP_RANDOM_END_US #ifndef CONFIG_GNRC_GOMACH_CP_RANDOM_END_US
#define GNRC_GOMACH_CP_RANDOM_END_US (1U * US_PER_MS) #define CONFIG_GNRC_GOMACH_CP_RANDOM_END_US (1U * US_PER_MS)
#endif #endif
/** /**

View File

@ -1482,7 +1482,7 @@ static void gomach_listen_init(gnrc_netif_t *netif)
gnrc_gomach_set_enter_new_cycle(netif, false); gnrc_gomach_set_enter_new_cycle(netif, false);
/* Set listen period timeout. */ /* Set listen period timeout. */
uint32_t listen_period = random_uint32_range(0, GNRC_GOMACH_CP_RANDOM_END_US) + uint32_t listen_period = random_uint32_range(0, CONFIG_GNRC_GOMACH_CP_RANDOM_END_US) +
CONFIG_GNRC_GOMACH_CP_DURATION_US; CONFIG_GNRC_GOMACH_CP_DURATION_US;
gnrc_gomach_set_timeout(netif, GNRC_GOMACH_TIMEOUT_CP_END, listen_period); gnrc_gomach_set_timeout(netif, GNRC_GOMACH_TIMEOUT_CP_END, listen_period);
gnrc_gomach_set_timeout(netif, GNRC_GOMACH_TIMEOUT_CP_MAX, GNRC_GOMACH_CP_DURATION_MAX_US); gnrc_gomach_set_timeout(netif, GNRC_GOMACH_TIMEOUT_CP_MAX, GNRC_GOMACH_CP_DURATION_MAX_US);