Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
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
75
#ifndef NET_GNRC_LWMAC_LWMAC_H
76
#define NET_GNRC_LWMAC_LWMAC_H
77
78
#include "
net/gnrc/netif.h
"
79
80
#ifdef __cplusplus
81
extern
"C"
{
82
#endif
83
104
#ifndef CONFIG_GNRC_LWMAC_WAKEUP_INTERVAL_US
105
#define CONFIG_GNRC_LWMAC_WAKEUP_INTERVAL_US (200LU *US_PER_MS)
106
#endif
107
120
#ifndef GNRC_LWMAC_PREAMBLE_DURATION_US
121
#define GNRC_LWMAC_PREAMBLE_DURATION_US ((13LU * CONFIG_GNRC_LWMAC_WAKEUP_INTERVAL_US) / 10)
122
#endif
123
140
#ifndef CONFIG_GNRC_LWMAC_TIME_BETWEEN_WR_US
141
#define CONFIG_GNRC_LWMAC_TIME_BETWEEN_WR_US (5U *US_PER_MS)
142
#endif
143
158
#ifndef GNRC_LWMAC_WAKEUP_DURATION_US
159
#define GNRC_LWMAC_WAKEUP_DURATION_US (CONFIG_GNRC_LWMAC_TIME_BETWEEN_WR_US * 2)
160
#endif
161
174
#ifndef GNRC_LWMAC_BROADCAST_DURATION_US
175
#define GNRC_LWMAC_BROADCAST_DURATION_US ((CONFIG_GNRC_LWMAC_WAKEUP_INTERVAL_US * 11) / 10)
176
#endif
177
192
#ifndef GNRC_LWMAC_TIME_BETWEEN_BROADCAST_US
193
#define GNRC_LWMAC_TIME_BETWEEN_BROADCAST_US (CONFIG_GNRC_LWMAC_TIME_BETWEEN_WR_US)
194
#endif
195
205
#ifndef CONFIG_GNRC_LWMAC_WR_PREPARATION_US
206
#define CONFIG_GNRC_LWMAC_WR_PREPARATION_US ((3U *US_PER_MS))
207
#endif
208
226
#ifndef CONFIG_GNRC_LWMAC_DATA_DELAY_US
227
#define CONFIG_GNRC_LWMAC_DATA_DELAY_US (10U *US_PER_MS)
228
#endif
229
238
#ifndef CONFIG_GNRC_LWMAC_DATA_CSMA_RETRIES
239
#define CONFIG_GNRC_LWMAC_DATA_CSMA_RETRIES (3U)
240
#endif
241
254
#ifndef CONFIG_GNRC_LWMAC_MAX_DATA_TX_RETRIES
255
#define CONFIG_GNRC_LWMAC_MAX_DATA_TX_RETRIES (3U)
256
#endif
257
285
#ifndef GNRC_LWMAC_MAX_TX_BURST_PKT_NUM
286
#define GNRC_LWMAC_MAX_TX_BURST_PKT_NUM \
287
(CONFIG_GNRC_LWMAC_WAKEUP_INTERVAL_US / GNRC_LWMAC_WAKEUP_DURATION_US)
288
#endif
289
302
#ifndef CONFIG_GNRC_LWMAC_MAX_RX_EXTENSION_NUM
303
#define CONFIG_GNRC_LWMAC_MAX_RX_EXTENSION_NUM (3U)
304
#endif
305
315
#ifndef CONFIG_GNRC_LWMAC_BROADCAST_CSMA_RETRIES
316
#define CONFIG_GNRC_LWMAC_BROADCAST_CSMA_RETRIES (3U)
317
#endif
329
#ifndef CONFIG_GNRC_LWMAC_RADIO_REINIT_THRESHOLD
330
#define CONFIG_GNRC_LWMAC_RADIO_REINIT_THRESHOLD (10U)
331
#endif
332
348
int
gnrc_netif_lwmac_create
(
gnrc_netif_t
*netif,
char
*stack,
int
stacksize,
349
char
priority,
const
char
*name,
netdev_t
*dev);
350
#ifdef __cplusplus
351
}
352
#endif
353
354
#endif
/* NET_GNRC_LWMAC_LWMAC_H */
netif.h
Definition for GNRC's network interfaces.
gnrc_netif_lwmac_create
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.
gnrc_netif_t
Representation of a network interface.
Definition
netif.h:135
netdev
Structure to hold driver state.
Definition
netdev.h:363
Generated on Fri Nov 15 2024 21:03:04 by
1.9.8