1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-26 23:11:19 +01:00

gnrc/lwmac: Configure queue size with the exponent and add config group

This changes the configuration macro to be the exponent of 2^n, as the
message queue size needs to be always power of 2.

Also a compile configuration documentation group is created.
This commit is contained in:
Leandro Lanzieri 2020-05-15 10:43:39 +02:00
parent 148c918ba9
commit f62623caaf
No known key found for this signature in database
GPG Key ID: 13559905E2EBEAA5

View File

@ -80,6 +80,11 @@
extern "C" {
#endif
/**
* @defgroup net_gnrc_lwmac_conf GNRC LWMAC compile configurations
* @ingroup net_gnrc_conf
* @{
*/
/**
* @brief Time between consecutive wake-ups.
*
@ -287,14 +292,26 @@ extern "C" {
#endif
/**
* @brief Default message queue size to use for the LWMAC thread.
* @brief Default message queue size to use for the LWMAC thread (as exponent of
* 2^n).
*
* As the queue size ALWAYS needs to be power of two, this option represents the
* exponent of 2^n, which will be used as the size of the queue.
*
* The value of this macro should be enough for supporting the manipulation of
* LWMAC.
*
*/
#ifndef CONFIG_GNRC_LWMAC_IPC_MSG_QUEUE_SIZE_EXP
#define CONFIG_GNRC_LWMAC_IPC_MSG_QUEUE_SIZE_EXP (3U)
#endif
/** @} */
/**
* @brief Message queue size to use for the LWMAC thread.
*/
#ifndef GNRC_LWMAC_IPC_MSG_QUEUE_SIZE
#define GNRC_LWMAC_IPC_MSG_QUEUE_SIZE (8U)
#define GNRC_LWMAC_IPC_MSG_QUEUE_SIZE (1 << CONFIG_GNRC_LWMAC_IPC_MSG_QUEUE_SIZE_EXP)
#endif
/**