Loading...
Searching...
No Matches
esp_eth_netdev.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018 Gunar Schorcht
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
9#pragma once
10
20
21#include <stdbool.h>
22
23#include "mutex.h"
24#include "net/ethernet.h"
25#include "net/netdev.h"
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
35
39typedef struct {
41
42 void *eth_driver;
43
44 uint16_t rx_len;
45 uint16_t tx_len;
46
49
50 uint32_t event;
51 bool link_up;
52
54
56
57#ifdef __cplusplus
58}
59#endif
60
Definitions low-level network driver interface.
const netdev_driver_t esp_eth_driver
Reference to the netdev device driver struct.
Definitions for Ethernet.
struct netdev netdev_t
Forward declaration for netdev struct.
Definition netdev.h:288
struct netdev_driver netdev_driver_t
Structure to hold driver interface -> function mapping.
#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
uint8_t rx_buf[ETHERNET_MAX_LEN]
receive buffer
void * eth_driver
EMAC driver handle.
bool link_up
indicates whether link is up
uint16_t rx_len
number of bytes received
uint8_t tx_buf[ETHERNET_MAX_LEN]
transmit buffer
uint32_t event
received event
Mutex structure.
Definition mutex.h:39