esp_eth_netdev.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2018 Gunar Schorcht
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
18 #include <stdbool.h>
19 
20 #include "mutex.h"
21 #include "net/ethernet.h"
22 #include "net/netdev.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
31 extern const netdev_driver_t esp_eth_driver;
32 
36 typedef struct {
39  void *eth_driver;
41  uint16_t rx_len;
42  uint16_t tx_len;
44  uint8_t rx_buf[ETHERNET_MAX_LEN];
45  uint8_t tx_buf[ETHERNET_MAX_LEN];
47  uint32_t event;
48  bool link_up;
53 
54 #ifdef __cplusplus
55 }
56 #endif
57 
Definitions low-level network driver interface.
const netdev_driver_t esp_eth_driver
Reference to the netdev device driver struct.
Definitions for Ethernet.
#define ETHERNET_MAX_LEN
maximum number of bytes in an ethernet frame (with FCF)
Definition: ethernet.h:46
Mutex for thread synchronization.
Device descriptor for ESP-ETH devices.
mutex_t dev_lock
device is already in use
uint16_t tx_len
number of bytes in transmit buffer
netdev_t netdev
netdev parent struct
void * eth_driver
EMAC driver handle.
bool link_up
indicates whether link is up
uint16_t rx_len
number of bytes received
uint32_t event
received event
Mutex structure.
Definition: mutex.h:39
Structure to hold driver interface -> function mapping.
Definition: netdev.h:426
Structure to hold driver state.
Definition: netdev.h:365