File syn_port_eth.h¶
FileList > port > syn_port_eth.h
Go to the source code of this file
Ethernet HAL hardware port interface contract.
#include "syntropic/common/syn_defs.h"#include <stdbool.h>#include <stddef.h>#include <stdint.h>
Public Functions¶
| Type | Name |
|---|---|
| SYN_Status | syn_port_eth_init (const uint8_t mac_addr) Initialize low-level Ethernet MAC hardware (RMII/MII/SPI PHY). |
| SYN_Status | syn_port_eth_rx (void * buf, size_t max_len, size_t * out_len) Receive raw Ethernet frame from PHY buffer. |
| SYN_Status | syn_port_eth_tx (const void * frame, size_t len) Transmit raw Ethernet frame over PHY. |
Public Functions Documentation¶
function syn_port_eth_init¶
Initialize low-level Ethernet MAC hardware (RMII/MII/SPI PHY).
Parameters:
mac_addr6-byte hardware MAC address.
Returns:
SYN_OK on success.
function syn_port_eth_rx¶
Receive raw Ethernet frame from PHY buffer.
Parameters:
bufPointer to destination buffer.max_lenMax capacity (must be >= 1514 bytes).out_lenPointer to receive frame byte length.
Returns:
SYN_OK on success, SYN_BUSY if no frame available.
function syn_port_eth_tx¶
Transmit raw Ethernet frame over PHY.
Parameters:
framePointer to frame bytes.lenFrame length (60..1514 bytes).
Returns:
SYN_OK on success.
The documentation for this class was generated from the following file src/port/syn_port_eth.h