1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

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.
This commit is contained in:
Akshai M 2020-05-24 16:21:28 +05:30
parent 75e0632caf
commit ba33686949

View File

@ -21,6 +21,8 @@
* @author Shuguo Zhuo <shuguo.zhuo@inria.fr> * @author Shuguo Zhuo <shuguo.zhuo@inria.fr>
*/ */
#include "kernel_defines.h"
#ifndef NET_GNRC_MAC_MAC_H #ifndef NET_GNRC_MAC_MAC_H
#define 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) #define GNRC_MAC_TX_QUEUE_SIZE (1 << CONFIG_GNRC_MAC_TX_QUEUE_SIZE_EXP)
#endif #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. * @brief Enable/disable MAC radio duty-cycle recording and displaying.
* *
* Set "1" to enable, set "0" to disable. * 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 #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) #define GNRC_MAC_ENABLE_DUTYCYCLE_RECORD (1U)
#endif #endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }