|
|
|
@ -38,6 +38,9 @@
|
|
|
|
|
#include "net/gnrc/mac/types.h" |
|
|
|
|
#include "net/ieee802154.h" |
|
|
|
|
#include "net/gnrc/mac/mac.h" |
|
|
|
|
#ifdef MODULE_GNRC_MAC |
|
|
|
|
#include "net/csma_sender.h" |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus |
|
|
|
|
extern "C" { |
|
|
|
@ -66,6 +69,17 @@ extern "C" {
|
|
|
|
|
*/ |
|
|
|
|
#define GNRC_NETDEV_MAC_INFO_RX_STARTED (0x0004U) |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Flag to track if a device has enabled CSMA for transmissions |
|
|
|
|
* |
|
|
|
|
* 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. |
|
|
|
|
*/ |
|
|
|
|
#define GNRC_NETDEV_MAC_INFO_CSMA_ENABLED (0x0100U) |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Structure holding GNRC netdev adapter state |
|
|
|
|
* |
|
|
|
@ -118,6 +132,11 @@ typedef struct gnrc_netdev {
|
|
|
|
|
*/ |
|
|
|
|
uint8_t l2_addr_len; |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief device's software CSMA configuration |
|
|
|
|
*/ |
|
|
|
|
csma_sender_conf_t csma_conf; |
|
|
|
|
|
|
|
|
|
#if ((GNRC_MAC_RX_QUEUE_SIZE != 0) || (GNRC_MAC_DISPATCH_BUFFER_SIZE != 0)) || defined(DOXYGEN) |
|
|
|
|
/**
|
|
|
|
|
* @brief MAC internal object which stores reception parameters, queues, and |
|
|
|
|