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

gnrc/gomach: Configure queue size with exponent and add config doc 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:36:25 +02:00
parent 4998b90395
commit 148c918ba9
No known key found for this signature in database
GPG Key ID: 13559905E2EBEAA5

View File

@ -48,6 +48,11 @@
extern "C" { extern "C" {
#endif #endif
/**
* @defgroup net_gnrc_gomach_conf GNRC GoMacH compile configuration
* @ingroup net_gnrc_conf
* @{
*/
/** /**
* @brief The default duration of GoMacH's wake-up period (WP). * @brief The default duration of GoMacH's wake-up period (WP).
* *
@ -342,13 +347,25 @@ extern "C" {
#endif #endif
/** /**
* @brief Default message queue size to use for the GoMacH thread. * @brief Default message queue size to use for the GoMacH 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 * The value of this macro should be enough for supporting the manipulation of
* GoMacH. * GoMacH.
*/ */
#ifndef CONFIG_GNRC_GOMACH_IPC_MSG_QUEUE_SIZE_EXP
#define CONFIG_GNRC_GOMACH_IPC_MSG_QUEUE_SIZE_EXP (3U)
#endif
/** @} */
/**
* @brief Message queue size to use for the GoMacH thread.
*/
#ifndef GNRC_GOMACH_IPC_MSG_QUEUE_SIZE #ifndef GNRC_GOMACH_IPC_MSG_QUEUE_SIZE
#define GNRC_GOMACH_IPC_MSG_QUEUE_SIZE (8U) #define GNRC_GOMACH_IPC_MSG_QUEUE_SIZE (1 << CONFIG_GNRC_GOMACH_IPC_MSG_QUEUE_SIZE_EXP)
#endif #endif
/** /**