Definitions low-level network driver interface. More...
Definitions low-level network driver interface.
Definition in file netdev.h.
#include <stdint.h>
#include <errno.h>
#include "iolist.h"
#include "net/netopt.h"
#include "kernel_defines.h"
Go to the source code of this file.
Data Structures | |
struct | netdev_radio_rx_info |
Received frame status information for most radios. More... | |
struct | netdev |
Structure to hold driver state. More... | |
struct | netdev_driver |
Structure to hold driver interface -> function mapping. More... | |
Macros | |
#define | NETDEV_INDEX_ANY (0xFF) |
Will match any device index. | |
#define | CONFIG_NETDEV_REGISTER_SIGNAL 0 |
Call netdev_register_signal when the netdev device is registered. | |
Typedefs | |
typedef struct netdev | netdev_t |
Forward declaration for netdev struct. | |
typedef void(* | netdev_event_cb_t) (netdev_t *dev, netdev_event_t event) |
Event callback for signaling event to upper layers. | |
typedef struct netdev_driver | netdev_driver_t |
Structure to hold driver interface -> function mapping. | |
Enumerations | |
enum | netdev_event_t { NETDEV_EVENT_ISR , NETDEV_EVENT_RX_STARTED , NETDEV_EVENT_RX_COMPLETE , NETDEV_EVENT_TX_STARTED , NETDEV_EVENT_TX_COMPLETE , NETDEV_EVENT_TX_COMPLETE_DATA_PENDING , NETDEV_EVENT_TX_NOACK , NETDEV_EVENT_TX_MEDIUM_BUSY , NETDEV_EVENT_LINK_UP , NETDEV_EVENT_LINK_DOWN , NETDEV_EVENT_TX_TIMEOUT , NETDEV_EVENT_RX_TIMEOUT , NETDEV_EVENT_CRC_ERROR , NETDEV_EVENT_FHSS_CHANGE_CHANNEL , NETDEV_EVENT_CAD_DONE } |
Possible event types that are send from the device driver to the upper layer. More... | |
Functions | |
void | netdev_register_signal (struct netdev *dev, netdev_type_t type, uint8_t index) |
Signal that the netdev_register function registered the device. | |
static void | netdev_register (struct netdev *dev, netdev_type_t type, uint8_t index) |
Register a device with netdev. | |
static int | netdev_get_notsup (netdev_t *dev, netopt_t opt, void *value, size_t max_len) |
Convenience function for declaring get() as not supported in general. | |
static int | netdev_set_notsup (netdev_t *dev, netopt_t opt, const void *value, size_t value_len) |
Convenience function for declaring set() as not supported in general. | |
static void | netdev_trigger_event_isr (netdev_t *netdev) |
Informs netdev there was an interrupt request from the network device. | |
Network device types | |
| |
enum | { NETDEV_TYPE_UNKNOWN , NETDEV_TYPE_TEST , NETDEV_TYPE_RAW , NETDEV_TYPE_ETHERNET , NETDEV_TYPE_IEEE802154 , NETDEV_TYPE_BLE , NETDEV_TYPE_CC110X , NETDEV_TYPE_LORA , NETDEV_TYPE_NRFMIN , NETDEV_TYPE_NRF24L01P_NG , NETDEV_TYPE_SLIP , NETDEV_TYPE_ESP_NOW } |
enum | netdev_type_t { NETDEV_ANY = 0 , NETDEV_AT86RF215 , NETDEV_AT86RF2XX , NETDEV_CC2538 , NETDEV_DOSE , NETDEV_ENC28J60 , NETDEV_KW41ZRF , NETDEV_MRF24J40 , NETDEV_NRF802154 , NETDEV_STM32_ETH , NETDEV_CC110X , NETDEV_SX127X , NETDEV_SAM0_ETH , NETDEV_ESP_NOW , NETDEV_NRF24L01P_NG , NETDEV_SOCKET_ZEP , NETDEV_SX126X , NETDEV_SX1280 , NETDEV_CC2420 , NETDEV_ETHOS , NETDEV_SLIPDEV , NETDEV_TAP , NETDEV_W5100 , NETDEV_ENCX24J600 , NETDEV_ATWINC15X0 , NETDEV_KW2XRF , NETDEV_ESP_ETH , NETDEV_ESP_WIFI , NETDEV_CDC_ECM , NETDEV_TINYUSB , NETDEV_W5500 } |
Driver types for netdev. More... | |