Adaption layer for GNRC on top of Netdev

Provides the glue code for Generic (GNRC) network stack on top of Network Device Driver API. More...

Detailed Description

Files

file  sys/include/net/gnrc/netdev/eth.h
 netdev gnrc ethernet glue code interface
 
file  sys/include/net/gnrc/netdev/ieee802154.h
 netdev gnrc IEEE 802.15.4 glue code interface
 
file  xbee_adpt.h
 GNRC to XBee netdev glue code interface.
 
file  sys/include/net/gnrc/netdev.h
 netdev-GNRC glue code interface
 

Data Structures

struct  gnrc_netdev
 Structure holding GNRC netdev adapter state. More...
 

Macros

#define GNRC_NETDEV_MAC_PRIO   (THREAD_PRIORITY_MAIN - 5)
 Default priority for adaption layer's threads.
 
#define NETDEV_MSG_TYPE_EVENT   0x1234
 Type for msg_t if device fired an event.
 
#define GNRC_NETDEV_MAC_INFO_TX_FEEDBACK_MASK   (0x0003U)
 Mask for gnrc_mac_tx_feedback_t.
 
#define GNRC_NETDEV_MAC_INFO_RX_STARTED   (0x0004U)
 Flag to track if a transmission might have corrupted a received packet.
 
#define GNRC_NETDEV_MAC_INFO_CSMA_ENABLED   (0x0100U)
 Flag to track if a device has enabled CSMA for transmissions. More...
 

Typedefs

typedef struct gnrc_netdev gnrc_netdev_t
 Structure holding GNRC netdev adapter state. More...
 

Functions

kernel_pid_t gnrc_netdev_init (char *stack, int stacksize, char priority, const char *name, gnrc_netdev_t *gnrc_netdev)
 Initialize GNRC netdev handler thread. More...
 

Macro Definition Documentation

◆ GNRC_NETDEV_MAC_INFO_CSMA_ENABLED

#define GNRC_NETDEV_MAC_INFO_CSMA_ENABLED   (0x0100U)

If gnrc_mac is used, the user should be noticed that the send() function of gnrc_netdev will be affected with the state of this flag, since gnrc_mac accordingly adapts the send() function. If the device doesn't support on-chip CSMA and this flag is set for requiring CSMA transmission, then, the device will run software CSMA using csma_sender APIs.

Definition at line 81 of file sys/include/net/gnrc/netdev.h.

Typedef Documentation

◆ gnrc_netdev_t

typedef struct gnrc_netdev gnrc_netdev_t

This structure is supposed to hold any state parameters needed to use a netdev device from GNRC.

It can be extended

Function Documentation

◆ gnrc_netdev_init()

kernel_pid_t gnrc_netdev_init ( char *  stack,
int  stacksize,
char  priority,
const char *  name,
gnrc_netdev_t gnrc_netdev 
)
Parameters
[in]stackptr to preallocated stack buffer
[in]stacksizesize of stack buffer
[in]prioritypriority of thread
[in]namename of thread
[in]gnrc_netdevptr to netdev device to handle in created thread
Returns
pid of created thread
KERNEL_PID_UNDEF on error