18#ifndef __HAL_DRIVER_${SERIES/ETH_IP}_ETH_H__
19#define __HAL_DRIVER_${SERIES/ETH_IP}_ETH_H__
25#if VSF_HAL_USE_ETH == ENABLED
34#include "../../__device.h"
46#if defined(__VSF_HAL_${ETH_IP}_ETH_CLASS_IMPLEMENT)
47# define __VSF_CLASS_IMPLEMENT__
48#elif defined(__VSF_HAL_${ETH_IP}_ETH_CLASS_INHERIT__)
49# define __VSF_CLASS_INHERIT__
66#ifndef VSF_${ETH_IP}_ETH_CFG_MULTI_CLASS
67# define VSF_${ETH_IP}_ETH_CFG_MULTI_CLASS VSF_ETH_CFG_MULTI_CLASS
90#define VSF_ETH_CFG_REIMPLEMENT_TYPE_PHY_MODE ENABLED
91#define VSF_ETH_CFG_REIMPLEMENT_TYPE_MODE ENABLED
92#define VSF_ETH_CFG_REIMPLEMENT_TYPE_IRQ_MASK ENABLED
93#define VSF_ETH_CFG_REIMPLEMENT_TYPE_CTRL ENABLED
94#define VSF_ETH_CFG_REIMPLEMENT_TYPE_CFG ENABLED
95#define VSF_ETH_CFG_REIMPLEMENT_TYPE_STATUS ENABLED
96#define VSF_ETH_CFG_REIMPLEMENT_TYPE_CAPABILITY ENABLED
97#define VSF_ETH_CFG_REIMPLEMENT_TYPE_BUF_MODE ENABLED
98#define VSF_ETH_CFG_REIMPLEMENT_TYPE_BUF_DESC ENABLED
99#define VSF_ETH_CFG_REIMPLEMENT_TYPE_SEND_BUF_DESC ENABLED
100#define VSF_ETH_CFG_REIMPLEMENT_TYPE_RECV_BUF_DESC ENABLED
101#define VSF_ETH_CFG_REIMPLEMENT_TYPE_SG_BUF_DESC ENABLED
109#if VSF_${ETH_IP}_CFG_MULTI_CLASS == ENABLED
128#if VSF_ETH_CFG_REIMPLEMENT_TYPE_PHY_MODE == ENABLED
141#if VSF_ETH_CFG_REIMPLEMENT_TYPE_MODE == ENABLED
150#if VSF_ETH_CFG_REIMPLEMENT_TYPE_IRQ_MASK == ENABLED
164#if VSF_ETH_CFG_REIMPLEMENT_TYPE_CTRL == ENABLED
172#if VSF_ETH_CFG_REIMPLEMENT_TYPE_CFG == ENABLED
189#if VSF_ETH_CFG_REIMPLEMENT_TYPE_STATUS == ENABLED
202#if VSF_ETH_CFG_REIMPLEMENT_TYPE_CAPABILITY == ENABLED
204#if VSF_ETH_CFG_INHERIT_HAL_CAPABILITY == ENABLED
224#if VSF_ETH_CFG_REIMPLEMENT_TYPE_BUF_MODE == ENABLED
233#if VSF_ETH_CFG_REIMPLEMENT_TYPE_BUF_DESC == ENABLED
241#if VSF_ETH_CFG_REIMPLEMENT_TYPE_SEND_BUF_DESC == ENABLED
245#if VSF_ETH_CFG_REIMPLEMENT_TYPE_RECV_BUF_DESC == ENABLED
249#if VSF_ETH_CFG_REIMPLEMENT_TYPE_SG_SEND_BUF == DISABLED
253#if VSF_ETH_CFG_REIMPLEMENT_TYPE_SG_RECV_BUF == DISABLED
273#undef __VSF_HAL_${ETH_IP}_ETH_CLASS_IMPLEMENT
274#undef __VSF_HAL_${ETH_IP}_ETH_CLASS_INHERIT__
vsf_arch_prio_t
Definition cortex_a_generic.h:88
vsf_eth_buf_desc_t vsf_eth_recv_buf_desc_t
Definition eth.h:246
vsf_eth_irq_mask_t
Definition eth.h:151
@ VSF_ETH_IRQ_MASK_ERROR
Definition eth.h:157
@ VSF_ETH_IRQ_MASK_RX_AVAILABLE
Definition eth.h:152
@ VSF_ETH_IRQ_MASK_PHY_LINK_CHANGE
Definition eth.h:156
@ VSF_ETH_IRQ_MASK_SG_TX_COMPLETE
Definition eth.h:155
@ VSF_ETH_IRQ_MASK_SG_RX_AVAILABLE
Definition eth.h:154
@ VSF_ETH_IRQ_MASK_OVERFLOW
Definition eth.h:158
@ VSF_ETH_IRQ_MASK_TX_COMPLETE
Definition eth.h:153
vsf_eth_ctrl_t
Definition eth.h:165
@ VSF_ETH_CTRL_GET_MAC_ADDRESS
Definition eth.h:166
vsf_eth_buf_mode_t
Definition eth.h:225
@ VSF_ETH_BUF_MODE_TX_CHECKSUM_OFFLOAD
Definition eth.h:226
@ VSF_ETH_BUF_MODE_RX_CHECKSUM_OFFLOAD
Definition eth.h:227
vsf_eth_isr_t isr
Definition eth.h:123
vsf_eth_mode_t
Definition eth.h:142
@ VSF_ETH_MODE_TX_CHECKSUM_OFFLOAD
Definition eth.h:143
@ VSF_ETH_MODE_RX_CHECKSUM_OFFLOAD
Definition eth.h:144
vsf_eth_phy_mode_t
Definition eth.h:129
@ VSF_ETH_PHY_MODE_SPEED_1000M
Definition eth.h:132
@ VSF_ETH_PHY_MODE_SPEED_100M
Definition eth.h:131
@ VSF_ETH_PHY_MODE_SPEED_10M
Definition eth.h:130
@ VSF_ETH_PHY_MODE_DUPLEX_HALF
Definition eth.h:134
@ VSF_ETH_PHY_MODE_DUPLEX_FULL
Definition eth.h:135
vsf_eth_buf_desc_t vsf_eth_send_sg_buf_desc_t
Definition eth.h:250
vsf_eth_buf_desc_t vsf_eth_send_buf_desc_t
Definition eth.h:242
vsf_eth_buf_desc_t vsf_eth_recv_sg_buf_desc_t
Definition eth.h:254
void vsf_eth_isr_handler_t(void *target_ptr, vsf_eth_t *eth_ptr, vsf_eth_irq_mask_t irq_mask)
Definition eth.h:174
#define vsf_class(__name)
Definition ooc_class.h:48
const i_spi_t vsf_spi_irq_mask_t irq_mask
Definition spi_interface.h:38
unsigned uint32_t
Definition stdint.h:9
unsigned char uint8_t
Definition stdint.h:5
Definition vsf_template_eth.h:636
void * payload
Definition vsf_template_eth.h:638
vsf_eth_buf_mode_t mode
Definition vsf_template_eth.h:637
uint32_t size
Definition eth.h:237
Predefined VSF ETH capability that can be reimplemented in specific hal drivers. The vsf_eth_capabili...
Definition vsf_template_eth.h:596
uint32_t is_send_buf_releasable_immediately
Definition vsf_template_eth.h:613
uint32_t is_sg_send_buf_releasable_immediately
Definition vsf_template_eth.h:620
inherit(vsf_peripheral_capability_t) vsf_eth_mode_t support_modes
vsf_eth_phy_mode_t support_phy_modes
Supported PHY modes, refer to vsf_eth_phy_mode_t.
Definition vsf_template_eth.h:602
uint32_t value
Definition vsf_template_eth.h:606
vsf_eth_irq_mask_t support_irq_mask
Supported IRQ masks, refer to vsf_eth_irq_mask_t.
Definition vsf_template_eth.h:603
ETH configuration structure.
Definition vsf_template_eth.h:556
uint8_t mac_address[6]
MAC address, 6 bytes.
Definition vsf_template_eth.h:559
vsf_eth_phy_mode_t phy_mode
PHY mode, refer to vsf_eth_phy_mode_t.
Definition vsf_template_eth.h:558
vsf_eth_isr_t isr
ETH interrupt configuration, refer to vsf_eth_isr_t.
Definition vsf_template_eth.h:560
vsf_eth_mode_t mode
ETH mode, refer to vsf_eth_mode_t.
Definition vsf_template_eth.h:557
ETH interrupt configuration structure.
Definition vsf_template_eth.h:543
vsf_eth_isr_handler_t * handler_fn
Interrupt handler function pointer.
Definition vsf_template_eth.h:544
void * target_ptr
User-defined target pointer.
Definition vsf_template_eth.h:545
vsf_arch_prio_t prio
Interrupt priority.
Definition vsf_template_eth.h:546
ETH status information structure Contains the current status of ETH operations and FIFO thresholds.
Definition vsf_template_eth.h:573
uint32_t is_tx_ready
TX is ready to accept data.
Definition vsf_template_eth.h:579
uint32_t is_rx_available
RX data is available.
Definition vsf_template_eth.h:578
ETH instance structure, used for ETH Multi Class support, not needed in non Multi Class mode.
Definition vsf_template_eth.h:711
Definition vsf_template_hal_driver.h:203
Definition vsf_template_hal_driver.h:196
vk_av_control_value_t value
Definition vsf_audio.h:171
vsf_eth_irq_mask_t
Definition vsf_template_eth.h:497
vsf_eth_ctrl_t
Definition vsf_template_eth.h:668
vsf_eth_buf_mode_t
Definition vsf_template_eth.h:627
vsf_eth_mode_t
Predefined VSF ETH modes that can be reimplemented in specific HAL drivers.The following modes must b...
Definition vsf_template_eth.h:378
vsf_eth_phy_mode_t
Predefined VSF ETH modes that can be reimplemented in specific HAL drivers.The following modes must b...
Definition vsf_template_eth.h:319