lwmac.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Daniel Krebs
3  * 2016 INRIA
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
73 #ifndef NET_GNRC_LWMAC_LWMAC_H
74 #define NET_GNRC_LWMAC_LWMAC_H
75 
76 #include "net/gnrc/netif.h"
77 
78 #ifdef __cplusplus
79 extern "C" {
80 #endif
81 
102 #ifndef CONFIG_GNRC_LWMAC_WAKEUP_INTERVAL_US
103 #define CONFIG_GNRC_LWMAC_WAKEUP_INTERVAL_US (200LU *US_PER_MS)
104 #endif
105 
118 #ifndef GNRC_LWMAC_PREAMBLE_DURATION_US
119 #define GNRC_LWMAC_PREAMBLE_DURATION_US ((13LU * CONFIG_GNRC_LWMAC_WAKEUP_INTERVAL_US) / 10)
120 #endif
121 
138 #ifndef CONFIG_GNRC_LWMAC_TIME_BETWEEN_WR_US
139 #define CONFIG_GNRC_LWMAC_TIME_BETWEEN_WR_US (5U *US_PER_MS)
140 #endif
141 
156 #ifndef GNRC_LWMAC_WAKEUP_DURATION_US
157 #define GNRC_LWMAC_WAKEUP_DURATION_US (CONFIG_GNRC_LWMAC_TIME_BETWEEN_WR_US * 2)
158 #endif
159 
172 #ifndef GNRC_LWMAC_BROADCAST_DURATION_US
173 #define GNRC_LWMAC_BROADCAST_DURATION_US ((CONFIG_GNRC_LWMAC_WAKEUP_INTERVAL_US * 11) / 10)
174 #endif
175 
190 #ifndef GNRC_LWMAC_TIME_BETWEEN_BROADCAST_US
191 #define GNRC_LWMAC_TIME_BETWEEN_BROADCAST_US (CONFIG_GNRC_LWMAC_TIME_BETWEEN_WR_US)
192 #endif
193 
203 #ifndef CONFIG_GNRC_LWMAC_WR_PREPARATION_US
204 #define CONFIG_GNRC_LWMAC_WR_PREPARATION_US ((3U *US_PER_MS))
205 #endif
206 
224 #ifndef CONFIG_GNRC_LWMAC_DATA_DELAY_US
225 #define CONFIG_GNRC_LWMAC_DATA_DELAY_US (10U *US_PER_MS)
226 #endif
227 
236 #ifndef CONFIG_GNRC_LWMAC_DATA_CSMA_RETRIES
237 #define CONFIG_GNRC_LWMAC_DATA_CSMA_RETRIES (3U)
238 #endif
239 
252 #ifndef CONFIG_GNRC_LWMAC_MAX_DATA_TX_RETRIES
253 #define CONFIG_GNRC_LWMAC_MAX_DATA_TX_RETRIES (3U)
254 #endif
255 
283 #ifndef GNRC_LWMAC_MAX_TX_BURST_PKT_NUM
284 #define GNRC_LWMAC_MAX_TX_BURST_PKT_NUM \
285  (CONFIG_GNRC_LWMAC_WAKEUP_INTERVAL_US / GNRC_LWMAC_WAKEUP_DURATION_US)
286 #endif
287 
300 #ifndef CONFIG_GNRC_LWMAC_MAX_RX_EXTENSION_NUM
301 #define CONFIG_GNRC_LWMAC_MAX_RX_EXTENSION_NUM (3U)
302 #endif
303 
313 #ifndef CONFIG_GNRC_LWMAC_BROADCAST_CSMA_RETRIES
314 #define CONFIG_GNRC_LWMAC_BROADCAST_CSMA_RETRIES (3U)
315 #endif
327 #ifndef CONFIG_GNRC_LWMAC_RADIO_REINIT_THRESHOLD
328 #define CONFIG_GNRC_LWMAC_RADIO_REINIT_THRESHOLD (10U)
329 #endif
330 
346 int gnrc_netif_lwmac_create(gnrc_netif_t *netif, char *stack, int stacksize,
347  char priority, const char *name, netdev_t *dev);
348 #ifdef __cplusplus
349 }
350 #endif
351 
352 #endif /* NET_GNRC_LWMAC_LWMAC_H */
Definition for GNRC's network interfaces.
int gnrc_netif_lwmac_create(gnrc_netif_t *netif, char *stack, int stacksize, char priority, const char *name, netdev_t *dev)
Creates an IEEE 802.15.4 LWMAC network interface.
Representation of a network interface.
Definition: netif.h:135
Structure to hold driver state.
Definition: netdev.h:361