From ba3368694957832fec042dc435b55009f89c9d19 Mon Sep 17 00:00:00 2001 From: Akshai M Date: Sun, 24 May 2020 16:21:28 +0530 Subject: [PATCH] gnrc/mac : Model as bool GNRC_MAC_ENABLE_DUTYCYCLE_RECORD Modelled GNRC_MAC_ENABLE_DUTYCYCLE_RECORD as bool. Introduced CONFIG_GNRC_MAC_DISABLE_DUTYCYCLE_RECORD to invert the logic. Tagged GNRC_MAC_ENABLE_DUTYCYCLE_RECORD for deprecation. --- sys/include/net/gnrc/mac/mac.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sys/include/net/gnrc/mac/mac.h b/sys/include/net/gnrc/mac/mac.h index cf6684f2cd..2905c067c1 100644 --- a/sys/include/net/gnrc/mac/mac.h +++ b/sys/include/net/gnrc/mac/mac.h @@ -21,6 +21,8 @@ * @author Shuguo Zhuo */ +#include "kernel_defines.h" + #ifndef NET_GNRC_MAC_MAC_H #define NET_GNRC_MAC_MAC_H @@ -90,14 +92,27 @@ extern "C" { #define GNRC_MAC_TX_QUEUE_SIZE (1 << CONFIG_GNRC_MAC_TX_QUEUE_SIZE_EXP) #endif +/** + * @brief Disable MAC radio duty-cycle recording and displaying. + */ +#ifdef DOXYGEN +#define CONFIG_GNRC_MAC_DISABLE_DUTYCYCLE_RECORD +#endif + /** * @brief Enable/disable MAC radio duty-cycle recording and displaying. * * Set "1" to enable, set "0" to disable. + * @deprecated Use inverse @ref CONFIG_GNRC_MAC_DISABLE_DUTYCYCLE_RECORD + * instead. Will be removed after 2021.01 release. */ #ifndef GNRC_MAC_ENABLE_DUTYCYCLE_RECORD +#if IS_ACTIVE(CONFIG_GNRC_MAC_DISABLE_DUTYCYCLE_RECORD) +#define GNRC_MAC_ENABLE_DUTYCYCLE_RECORD (0) +#else #define GNRC_MAC_ENABLE_DUTYCYCLE_RECORD (1U) #endif +#endif #ifdef __cplusplus }