2020-11-22 23:50:51 +01:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2020 Otto-von-Guericke-Universität Magdeburg
|
|
|
|
*
|
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
* directory for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ingroup sys_auto_init_gnrc_netif
|
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @brief common netif device initialization definitions
|
|
|
|
*
|
|
|
|
* @author Fabian Hüßler <fabian.huessler@ovgu.de>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef INIT_DEVS_H
|
|
|
|
#define INIT_DEVS_H
|
|
|
|
|
|
|
|
#include "thread.h"
|
2022-04-06 14:02:54 +02:00
|
|
|
#include "msg.h"
|
|
|
|
#include "net/gnrc/netif/conf.h" /* <- GNRC_NETIF_MSG_QUEUE_SIZE */
|
2023-03-02 01:01:30 +01:00
|
|
|
#include "macros/utils.h"
|
2020-11-22 23:50:51 +01:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2022-04-06 14:02:54 +02:00
|
|
|
/**
|
|
|
|
* @brief stack size of a netif thread
|
|
|
|
*
|
|
|
|
* Message queue was previously allocated on the stack, reduce
|
|
|
|
* stack size by default msg queue size to keep the RAM use the same
|
|
|
|
*/
|
|
|
|
#ifndef GNRC_NETIF_STACKSIZE_DEFAULT
|
|
|
|
#define GNRC_NETIF_STACKSIZE_DEFAULT (THREAD_STACKSIZE_DEFAULT - 128)
|
|
|
|
#endif
|
|
|
|
|
2020-11-22 23:50:51 +01:00
|
|
|
/**
|
|
|
|
* @brief extra stack size if ieee802154 security is enabled
|
|
|
|
*
|
|
|
|
* You may increase this value if you experience a stack overflow
|
|
|
|
* with IEEE 802.15.4 security enabled.
|
|
|
|
*/
|
2022-06-01 14:55:33 +02:00
|
|
|
#if IS_USED(MODULE_IEEE802154_SECURITY) || DOXYGEN
|
2020-11-22 23:50:51 +01:00
|
|
|
#define IEEE802154_SECURITY_EXTRA_STACKSIZE (128)
|
2022-04-06 14:02:54 +02:00
|
|
|
#else
|
|
|
|
#define IEEE802154_SECURITY_EXTRA_STACKSIZE (0)
|
|
|
|
#endif
|
2020-11-22 23:50:51 +01:00
|
|
|
|
2022-06-01 14:55:33 +02:00
|
|
|
/**
|
|
|
|
* @brief extra stack size if openDSME is enabled
|
|
|
|
*/
|
|
|
|
#if IS_USED(MODULE_OPENDSME)
|
|
|
|
#define IEEE802154_OPENDSME_EXTRA_STACKSIZE (THREAD_STACKSIZE_DEFAULT)
|
|
|
|
#else
|
|
|
|
#define IEEE802154_OPENDSME_EXTRA_STACKSIZE (0)
|
|
|
|
#endif
|
|
|
|
|
2020-11-22 23:50:51 +01:00
|
|
|
#ifndef IEEE802154_STACKSIZE_DEFAULT
|
|
|
|
/**
|
|
|
|
* @brief stack size of an ieee802154 device
|
|
|
|
*/
|
2023-03-02 01:01:30 +01:00
|
|
|
#define IEEE802154_STACKSIZE_DEFAULT (MAX(520, GNRC_NETIF_STACKSIZE_DEFAULT) + \
|
2022-06-01 14:55:33 +02:00
|
|
|
IEEE802154_SECURITY_EXTRA_STACKSIZE + \
|
|
|
|
IEEE802154_OPENDSME_EXTRA_STACKSIZE)
|
2020-11-22 23:50:51 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* INIT_DEVS_H */
|
|
|
|
/** @} */
|