diff --git a/sys/include/net/gnrc/gomach/types.h b/sys/include/net/gnrc/gomach/types.h index 6386070c82..8a0f0114d4 100644 --- a/sys/include/net/gnrc/gomach/types.h +++ b/sys/include/net/gnrc/gomach/types.h @@ -84,15 +84,6 @@ extern "C" { */ #define GNRC_GOMACH_TYPE_KNOWN (1U) -/** - * @brief Enable/disable duty-cycle record and print out. - * - * Set "1" to enable, set "0" to disable. - */ -#ifndef GNRC_GOMACH_ENABLE_DUTYCYLE_RECORD -#define GNRC_GOMACH_ENABLE_DUTYCYLE_RECORD (0U) -#endif - /** * @brief State-machine states of Broadcast procedure of GoMacH. */ @@ -304,8 +295,7 @@ typedef struct gomach { uint8_t rx_pkt_lqi; /**< LQI of latest received packet */ - -#if (GNRC_GOMACH_ENABLE_DUTYCYLE_RECORD == 1) +#if (GNRC_MAC_ENABLE_DUTYCYCLE_RECORD == 1) /* Parameters for recording duty-cycle */ uint64_t last_radio_on_time_ticks; /**< The last time in ticks when radio is on */ diff --git a/sys/include/net/gnrc/mac/mac.h b/sys/include/net/gnrc/mac/mac.h index ad06600539..983e1dd59b 100644 --- a/sys/include/net/gnrc/mac/mac.h +++ b/sys/include/net/gnrc/mac/mac.h @@ -56,6 +56,15 @@ extern "C" { #define GNRC_MAC_TX_QUEUE_SIZE (8U) #endif +/** + * @brief Enable/disable MAC radio duty-cycle recording and displaying. + * + * Set "1" to enable, set "0" to disable. + */ +#ifndef GNRC_MAC_ENABLE_DUTYCYCLE_RECORD +#define GNRC_MAC_ENABLE_DUTYCYCLE_RECORD (1U) +#endif + #ifdef __cplusplus } #endif diff --git a/sys/net/gnrc/link_layer/gomach/gomach.c b/sys/net/gnrc/link_layer/gomach/gomach.c index b73f25dc26..e1ecf5b1dd 100644 --- a/sys/net/gnrc/link_layer/gomach/gomach.c +++ b/sys/net/gnrc/link_layer/gomach/gomach.c @@ -2194,7 +2194,7 @@ static void _gomach_init(gnrc_netif_t *netif) netif->mac.tx.t2u_fail_count = 0; -#if (GNRC_GOMACH_ENABLE_DUTYCYLE_RECORD == 1) +#if (GNRC_MAC_ENABLE_DUTYCYCLE_RECORD == 1) /* Start duty cycle recording */ netif->mac.prot.gomach.system_start_time_ticks = xtimer_now_usec64(); netif->mac.prot.gomach.last_radio_on_time_ticks =