init_devs.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 Otto-von-Guericke-Universität Magdeburg
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
19 #ifndef INIT_DEVS_H
20 #define INIT_DEVS_H
21 
22 #include "thread.h"
23 #include "msg.h"
24 #include "net/gnrc/netif/conf.h" /* <- GNRC_NETIF_MSG_QUEUE_SIZE */
25 #include "macros/utils.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
37 #ifndef GNRC_NETIF_STACKSIZE_DEFAULT
38 #define GNRC_NETIF_STACKSIZE_DEFAULT (THREAD_STACKSIZE_DEFAULT - 128)
39 #endif
40 
47 #if IS_USED(MODULE_IEEE802154_SECURITY) || DOXYGEN
48 #define IEEE802154_SECURITY_EXTRA_STACKSIZE (128)
49 #else
50 #define IEEE802154_SECURITY_EXTRA_STACKSIZE (0)
51 #endif
52 
56 #if IS_USED(MODULE_OPENDSME)
57 #define IEEE802154_OPENDSME_EXTRA_STACKSIZE (THREAD_STACKSIZE_DEFAULT)
58 #else
59 #define IEEE802154_OPENDSME_EXTRA_STACKSIZE (0)
60 #endif
61 
62 #ifndef IEEE802154_STACKSIZE_DEFAULT
66 #define IEEE802154_STACKSIZE_DEFAULT (MAX(520, GNRC_NETIF_STACKSIZE_DEFAULT) + \
67  IEEE802154_SECURITY_EXTRA_STACKSIZE + \
68  IEEE802154_OPENDSME_EXTRA_STACKSIZE)
69 #endif
70 
71 #ifdef __cplusplus
72 }
73 #endif
74 
75 #endif /* INIT_DEVS_H */
Various helper macros.
Configuration macros for Network interface API.