Loading...
Searching...
No Matches

Low-level Ethernet driver interface for the EFM32. More...

Detailed Description

Low-level Ethernet driver interface for the EFM32.

Author
Bas Stottelaar basst.nosp@m.otte.nosp@m.laar@.nosp@m.gmai.nosp@m.l.com

Definition in file eth.h.

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "iolist.h"
+ Include dependency graph for eth.h:

Go to the source code of this file.

Functions

int efm32_eth_init (const uint8_t *mac)
 Initialize the ETH peripheral and PHY.
 
int efm32_eth_send (const iolist_t *iolist)
 Submit a frame for transmission.
 
int efm32_eth_recv (void *buf, size_t max_len)
 Receive a frame from the RX ring.
 
void efm32_eth_get_mac (uint8_t out[6])
 Read the currently programmed MAC address.
 
void efm32_eth_set_mac (const uint8_t mac[6])
 Program a new MAC address.
 
bool efm32_eth_link_up (void)
 Read the PHY link status (BMSR.LINK)
 
bool efm32_eth_rx_pending (void)
 Return true if the RX ring contains at least one unconsumed frame.
 
int efm32_eth_tx_status (void)
 Query the completion status of the most recent transmission.
 
void efm32_eth_set_promiscuous (bool enable)
 Enable or disable promiscuous mode.
 
bool efm32_eth_get_promiscuous (void)
 Return the current promiscuous mode setting.
 
void efm32_eth_set_link_speed (uint16_t speed)
 Configure the MAC for a given link speed and duplex.
 
int efm32_eth_start_auto_negotiation (void)
 Start PHY auto-negotiation.
 
void efm32_eth_complete_auto_negotiation (void)
 Complete auto-negotiation and apply speed/duplex to the MAC.