Loading...
Searching...
No Matches

Interface definitions for the GRETH Ethernet driver. More...

Detailed Description

Interface definitions for the GRETH Ethernet driver.

Author
Matvii Ivashchenko

Definition in file greth.h.

#include <stdint.h>
#include <stdbool.h>
#include "net/netdev.h"
#include "net/netdev/eth.h"
+ Include dependency graph for greth.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  greth_desc_t
 GRETH buffer descriptor (8 bytes, must be kept at natural alignment) More...
 
struct  greth_params_t
 GRETH driver parameters (board-level configuration) More...
 
struct  greth_t
 GRETH driver device descriptor. More...
 

Functions

void greth_setup (greth_t *dev, const greth_params_t *params, uint8_t index)
 Set up the GRETH device descriptor.
 

Driver configuration constants

#define CONFIG_GRETH_RX_DESC_NUM   (8U)
 Number of RX descriptors (and pre-allocated RX buffers)
 
#define CONFIG_GRETH_TX_DESC_NUM   (4U)
 Number of TX descriptors.
 
#define GRETH_MAX_FRAME_LEN   (1518U)
 Maximum Ethernet frame size (excluding FCS added by MAC)
 
#define GRETH_BUF_SIZE   (1536U)
 RX/TX buffer size — rounded up to 32-byte boundary.
 
#define GRETH_ANEG_TIMEOUT   (100000U)
 PHY auto-negotiate timeout in poll iterations.