ADSP-SC589 Ethernet MAC driver (EMAC1 instance) More...
#include "core/nic.h"Go to the source code of this file.
Data Structures | |
| struct | Sc589Eth2TxDmaDesc |
| Enhanced TX DMA descriptor. More... | |
| struct | Sc589Eth2RxDmaDesc |
| Enhanced RX DMA descriptor. More... | |
Macros | |
| #define | SC589_ETH2_TX_BUFFER_COUNT 3 |
| #define | SC589_ETH2_TX_BUFFER_SIZE 1536 |
| #define | SC589_ETH2_RX_BUFFER_COUNT 6 |
| #define | SC589_ETH2_RX_BUFFER_SIZE 1536 |
| #define | SC589_ETH2_IRQ_PRIORITY 0 |
| #define | SC589_ETH2_RAM_SECTION ".l2_uncached_data" |
| #define | EMAC1_SPU_PID 56 |
| #define | ENUM_EMAC_SMI_ADDR_CR_DIV42 (0 << BITP_EMAC_SMI_ADDR_CR) |
| #define | ENUM_EMAC_SMI_ADDR_CR_DIV62 (1 << BITP_EMAC_SMI_ADDR_CR) |
| #define | ENUM_EMAC_SMI_ADDR_CR_DIV16 (2 << BITP_EMAC_SMI_ADDR_CR) |
| #define | ENUM_EMAC_SMI_ADDR_CR_DIV26 (3 << BITP_EMAC_SMI_ADDR_CR) |
| #define | ENUM_EMAC_DMA_BUSMODE_RPBL_1 (1 << BITP_EMAC_DMA0_BUSMODE_RPBL) |
| #define | ENUM_EMAC_DMA_BUSMODE_RPBL_2 (2 << BITP_EMAC_DMA0_BUSMODE_RPBL) |
| #define | ENUM_EMAC_DMA_BUSMODE_RPBL_4 (4 << BITP_EMAC_DMA0_BUSMODE_RPBL) |
| #define | ENUM_EMAC_DMA_BUSMODE_RPBL_8 (8 << BITP_EMAC_DMA0_BUSMODE_RPBL) |
| #define | ENUM_EMAC_DMA_BUSMODE_RPBL_16 (16 << BITP_EMAC_DMA0_BUSMODE_RPBL) |
| #define | ENUM_EMAC_DMA_BUSMODE_RPBL_32 (32 << BITP_EMAC_DMA0_BUSMODE_RPBL) |
| #define | ENUM_EMAC_DMA_BUSMODE_PBL_1 (1 << BITP_EMAC_DMA0_BUSMODE_PBL) |
| #define | ENUM_EMAC_DMA_BUSMODE_PBL_2 (2 << BITP_EMAC_DMA0_BUSMODE_PBL) |
| #define | ENUM_EMAC_DMA_BUSMODE_PBL_4 (4 << BITP_EMAC_DMA0_BUSMODE_PBL) |
| #define | ENUM_EMAC_DMA_BUSMODE_PBL_8 (8 << BITP_EMAC_DMA0_BUSMODE_PBL) |
| #define | ENUM_EMAC_DMA_BUSMODE_PBL_16 (16 << BITP_EMAC_DMA0_BUSMODE_PBL) |
| #define | ENUM_EMAC_DMA_BUSMODE_PBL_32 (32 << BITP_EMAC_DMA0_BUSMODE_PBL) |
| #define | EMAC_TDES0_OWN 0x80000000 |
| #define | EMAC_TDES0_IC 0x40000000 |
| #define | EMAC_TDES0_LS 0x20000000 |
| #define | EMAC_TDES0_FS 0x10000000 |
| #define | EMAC_TDES0_DC 0x08000000 |
| #define | EMAC_TDES0_DP 0x04000000 |
| #define | EMAC_TDES0_TTSE 0x02000000 |
| #define | EMAC_TDES0_CRCR 0x01000000 |
| #define | EMAC_TDES0_CIC 0x00C00000 |
| #define | EMAC_TDES0_TER 0x00200000 |
| #define | EMAC_TDES0_TCH 0x00100000 |
| #define | EMAC_TDES0_VLIC 0x000C0000 |
| #define | EMAC_TDES0_TTSS 0x00020000 |
| #define | EMAC_TDES0_IHE 0x00010000 |
| #define | EMAC_TDES0_ES 0x00008000 |
| #define | EMAC_TDES0_JT 0x00004000 |
| #define | EMAC_TDES0_FF 0x00002000 |
| #define | EMAC_TDES0_IPE 0x00001000 |
| #define | EMAC_TDES0_LCA 0x00000800 |
| #define | EMAC_TDES0_NC 0x00000400 |
| #define | EMAC_TDES0_LCO 0x00000200 |
| #define | EMAC_TDES0_EC 0x00000100 |
| #define | EMAC_TDES0_VF 0x00000080 |
| #define | EMAC_TDES0_CC 0x00000078 |
| #define | EMAC_TDES0_ED 0x00000004 |
| #define | EMAC_TDES0_UF 0x00000002 |
| #define | EMAC_TDES0_DB 0x00000001 |
| #define | EMAC_TDES1_SAIC 0xE0000000 |
| #define | EMAC_TDES1_TBS2 0x1FFF0000 |
| #define | EMAC_TDES1_TBS1 0x00001FFF |
| #define | EMAC_TDES2_TBAP1 0xFFFFFFFF |
| #define | EMAC_TDES3_TBAP2 0xFFFFFFFF |
| #define | EMAC_RDES0_OWN 0x80000000 |
| #define | EMAC_RDES0_AFM 0x40000000 |
| #define | EMAC_RDES0_FL 0x3FFF0000 |
| #define | EMAC_RDES0_ES 0x00008000 |
| #define | EMAC_RDES0_DE 0x00004000 |
| #define | EMAC_RDES0_SAF 0x00002000 |
| #define | EMAC_RDES0_LE 0x00001000 |
| #define | EMAC_RDES0_OE 0x00000800 |
| #define | EMAC_RDES0_VLAN 0x00000400 |
| #define | EMAC_RDES0_FS 0x00000200 |
| #define | EMAC_RDES0_LS 0x00000100 |
| #define | EMAC_RDES0_TSV 0x00000080 |
| #define | EMAC_RDES0_LCO 0x00000040 |
| #define | EMAC_RDES0_FT 0x00000020 |
| #define | EMAC_RDES0_RWT 0x00000010 |
| #define | EMAC_RDES0_RE 0x00000008 |
| #define | EMAC_RDES0_DBE 0x00000004 |
| #define | EMAC_RDES0_CE 0x00000002 |
| #define | EMAC_RDES0_ESA 0x00000001 |
| #define | EMAC_RDES1_DIC 0x80000000 |
| #define | EMAC_RDES1_RBS2 0x1FFF0000 |
| #define | EMAC_RDES1_RER 0x00008000 |
| #define | EMAC_RDES1_RCH 0x00004000 |
| #define | EMAC_RDES1_RBS1 0x00001FFF |
| #define | EMAC_RDES2_RBAP1 0xFFFFFFFF |
| #define | EMAC_RDES3_RBAP2 0xFFFFFFFF |
Functions | |
| error_t | sc589Eth2Init (NetInterface *interface) |
| ADSP-SC589 Ethernet MAC initialization. More... | |
| void | sc589Eth2InitGpio (NetInterface *interface) |
| GPIO configuration. More... | |
| void | sc589Eth2InitDmaDesc (NetInterface *interface) |
| Initialize DMA descriptor lists. More... | |
| void | sc589Eth2Tick (NetInterface *interface) |
| ADSP-SC589 Ethernet MAC timer handler. More... | |
| void | sc589Eth2EnableIrq (NetInterface *interface) |
| Enable interrupts. More... | |
| void | sc589Eth2DisableIrq (NetInterface *interface) |
| Disable interrupts. More... | |
| void | sc589Eth2IrqHandler (uint32_t id, void *param) |
| ADSP-SC589 Ethernet MAC interrupt service routine. More... | |
| void | sc589Eth2EventHandler (NetInterface *interface) |
| ADSP-SC589 Ethernet MAC event handler. More... | |
| error_t | sc589Eth2SendPacket (NetInterface *interface, const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary) |
| Send a packet. More... | |
| error_t | sc589Eth2ReceivePacket (NetInterface *interface) |
| Receive a packet. More... | |
| error_t | sc589Eth2UpdateMacAddrFilter (NetInterface *interface) |
| Configure MAC address filtering. More... | |
| error_t | sc589Eth2UpdateMacConfig (NetInterface *interface) |
| Adjust MAC configuration parameters for proper operation. More... | |
| void | sc589Eth2WritePhyReg (uint8_t opcode, uint8_t phyAddr, uint8_t regAddr, uint16_t data) |
| Write PHY register. More... | |
| uint16_t | sc589Eth2ReadPhyReg (uint8_t opcode, uint8_t phyAddr, uint8_t regAddr) |
| Read PHY register. More... | |
| uint32_t | sc589Eth2CalcCrc (const void *data, size_t length) |
| CRC calculation. More... | |
Variables | |
| const NicDriver | sc589Eth2Driver |
| ADSP-SC589 Ethernet MAC driver (EMAC1 instance) More... | |
Detailed Description
ADSP-SC589 Ethernet MAC driver (EMAC1 instance)
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2026 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneTCP Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.6.0
Definition in file sc589_eth2_driver.h.
Macro Definition Documentation
◆ EMAC1_SPU_PID
| #define EMAC1_SPU_PID 56 |
Definition at line 78 of file sc589_eth2_driver.h.
◆ EMAC_RDES0_AFM
| #define EMAC_RDES0_AFM 0x40000000 |
Definition at line 137 of file sc589_eth2_driver.h.
◆ EMAC_RDES0_CE
| #define EMAC_RDES0_CE 0x00000002 |
Definition at line 153 of file sc589_eth2_driver.h.
◆ EMAC_RDES0_DBE
| #define EMAC_RDES0_DBE 0x00000004 |
Definition at line 152 of file sc589_eth2_driver.h.
◆ EMAC_RDES0_DE
| #define EMAC_RDES0_DE 0x00004000 |
Definition at line 140 of file sc589_eth2_driver.h.
◆ EMAC_RDES0_ES
| #define EMAC_RDES0_ES 0x00008000 |
Definition at line 139 of file sc589_eth2_driver.h.
◆ EMAC_RDES0_ESA
| #define EMAC_RDES0_ESA 0x00000001 |
Definition at line 154 of file sc589_eth2_driver.h.
◆ EMAC_RDES0_FL
| #define EMAC_RDES0_FL 0x3FFF0000 |
Definition at line 138 of file sc589_eth2_driver.h.
◆ EMAC_RDES0_FS
| #define EMAC_RDES0_FS 0x00000200 |
Definition at line 145 of file sc589_eth2_driver.h.
◆ EMAC_RDES0_FT
| #define EMAC_RDES0_FT 0x00000020 |
Definition at line 149 of file sc589_eth2_driver.h.
◆ EMAC_RDES0_LCO
| #define EMAC_RDES0_LCO 0x00000040 |
Definition at line 148 of file sc589_eth2_driver.h.
◆ EMAC_RDES0_LE
| #define EMAC_RDES0_LE 0x00001000 |
Definition at line 142 of file sc589_eth2_driver.h.
◆ EMAC_RDES0_LS
| #define EMAC_RDES0_LS 0x00000100 |
Definition at line 146 of file sc589_eth2_driver.h.
◆ EMAC_RDES0_OE
| #define EMAC_RDES0_OE 0x00000800 |
Definition at line 143 of file sc589_eth2_driver.h.
◆ EMAC_RDES0_OWN
| #define EMAC_RDES0_OWN 0x80000000 |
Definition at line 136 of file sc589_eth2_driver.h.
◆ EMAC_RDES0_RE
| #define EMAC_RDES0_RE 0x00000008 |
Definition at line 151 of file sc589_eth2_driver.h.
◆ EMAC_RDES0_RWT
| #define EMAC_RDES0_RWT 0x00000010 |
Definition at line 150 of file sc589_eth2_driver.h.
◆ EMAC_RDES0_SAF
| #define EMAC_RDES0_SAF 0x00002000 |
Definition at line 141 of file sc589_eth2_driver.h.
◆ EMAC_RDES0_TSV
| #define EMAC_RDES0_TSV 0x00000080 |
Definition at line 147 of file sc589_eth2_driver.h.
◆ EMAC_RDES0_VLAN
| #define EMAC_RDES0_VLAN 0x00000400 |
Definition at line 144 of file sc589_eth2_driver.h.
◆ EMAC_RDES1_DIC
| #define EMAC_RDES1_DIC 0x80000000 |
Definition at line 155 of file sc589_eth2_driver.h.
◆ EMAC_RDES1_RBS1
| #define EMAC_RDES1_RBS1 0x00001FFF |
Definition at line 159 of file sc589_eth2_driver.h.
◆ EMAC_RDES1_RBS2
| #define EMAC_RDES1_RBS2 0x1FFF0000 |
Definition at line 156 of file sc589_eth2_driver.h.
◆ EMAC_RDES1_RCH
| #define EMAC_RDES1_RCH 0x00004000 |
Definition at line 158 of file sc589_eth2_driver.h.
◆ EMAC_RDES1_RER
| #define EMAC_RDES1_RER 0x00008000 |
Definition at line 157 of file sc589_eth2_driver.h.
◆ EMAC_RDES2_RBAP1
| #define EMAC_RDES2_RBAP1 0xFFFFFFFF |
Definition at line 160 of file sc589_eth2_driver.h.
◆ EMAC_RDES3_RBAP2
| #define EMAC_RDES3_RBAP2 0xFFFFFFFF |
Definition at line 161 of file sc589_eth2_driver.h.
◆ EMAC_TDES0_CC
| #define EMAC_TDES0_CC 0x00000078 |
Definition at line 125 of file sc589_eth2_driver.h.
◆ EMAC_TDES0_CIC
| #define EMAC_TDES0_CIC 0x00C00000 |
Definition at line 110 of file sc589_eth2_driver.h.
◆ EMAC_TDES0_CRCR
| #define EMAC_TDES0_CRCR 0x01000000 |
Definition at line 109 of file sc589_eth2_driver.h.
◆ EMAC_TDES0_DB
| #define EMAC_TDES0_DB 0x00000001 |
Definition at line 128 of file sc589_eth2_driver.h.
◆ EMAC_TDES0_DC
| #define EMAC_TDES0_DC 0x08000000 |
Definition at line 106 of file sc589_eth2_driver.h.
◆ EMAC_TDES0_DP
| #define EMAC_TDES0_DP 0x04000000 |
Definition at line 107 of file sc589_eth2_driver.h.
◆ EMAC_TDES0_EC
| #define EMAC_TDES0_EC 0x00000100 |
Definition at line 123 of file sc589_eth2_driver.h.
◆ EMAC_TDES0_ED
| #define EMAC_TDES0_ED 0x00000004 |
Definition at line 126 of file sc589_eth2_driver.h.
◆ EMAC_TDES0_ES
| #define EMAC_TDES0_ES 0x00008000 |
Definition at line 116 of file sc589_eth2_driver.h.
◆ EMAC_TDES0_FF
| #define EMAC_TDES0_FF 0x00002000 |
Definition at line 118 of file sc589_eth2_driver.h.
◆ EMAC_TDES0_FS
| #define EMAC_TDES0_FS 0x10000000 |
Definition at line 105 of file sc589_eth2_driver.h.
◆ EMAC_TDES0_IC
| #define EMAC_TDES0_IC 0x40000000 |
Definition at line 103 of file sc589_eth2_driver.h.
◆ EMAC_TDES0_IHE
| #define EMAC_TDES0_IHE 0x00010000 |
Definition at line 115 of file sc589_eth2_driver.h.
◆ EMAC_TDES0_IPE
| #define EMAC_TDES0_IPE 0x00001000 |
Definition at line 119 of file sc589_eth2_driver.h.
◆ EMAC_TDES0_JT
| #define EMAC_TDES0_JT 0x00004000 |
Definition at line 117 of file sc589_eth2_driver.h.
◆ EMAC_TDES0_LCA
| #define EMAC_TDES0_LCA 0x00000800 |
Definition at line 120 of file sc589_eth2_driver.h.
◆ EMAC_TDES0_LCO
| #define EMAC_TDES0_LCO 0x00000200 |
Definition at line 122 of file sc589_eth2_driver.h.
◆ EMAC_TDES0_LS
| #define EMAC_TDES0_LS 0x20000000 |
Definition at line 104 of file sc589_eth2_driver.h.
◆ EMAC_TDES0_NC
| #define EMAC_TDES0_NC 0x00000400 |
Definition at line 121 of file sc589_eth2_driver.h.
◆ EMAC_TDES0_OWN
| #define EMAC_TDES0_OWN 0x80000000 |
Definition at line 102 of file sc589_eth2_driver.h.
◆ EMAC_TDES0_TCH
| #define EMAC_TDES0_TCH 0x00100000 |
Definition at line 112 of file sc589_eth2_driver.h.
◆ EMAC_TDES0_TER
| #define EMAC_TDES0_TER 0x00200000 |
Definition at line 111 of file sc589_eth2_driver.h.
◆ EMAC_TDES0_TTSE
| #define EMAC_TDES0_TTSE 0x02000000 |
Definition at line 108 of file sc589_eth2_driver.h.
◆ EMAC_TDES0_TTSS
| #define EMAC_TDES0_TTSS 0x00020000 |
Definition at line 114 of file sc589_eth2_driver.h.
◆ EMAC_TDES0_UF
| #define EMAC_TDES0_UF 0x00000002 |
Definition at line 127 of file sc589_eth2_driver.h.
◆ EMAC_TDES0_VF
| #define EMAC_TDES0_VF 0x00000080 |
Definition at line 124 of file sc589_eth2_driver.h.
◆ EMAC_TDES0_VLIC
| #define EMAC_TDES0_VLIC 0x000C0000 |
Definition at line 113 of file sc589_eth2_driver.h.
◆ EMAC_TDES1_SAIC
| #define EMAC_TDES1_SAIC 0xE0000000 |
Definition at line 129 of file sc589_eth2_driver.h.
◆ EMAC_TDES1_TBS1
| #define EMAC_TDES1_TBS1 0x00001FFF |
Definition at line 131 of file sc589_eth2_driver.h.
◆ EMAC_TDES1_TBS2
| #define EMAC_TDES1_TBS2 0x1FFF0000 |
Definition at line 130 of file sc589_eth2_driver.h.
◆ EMAC_TDES2_TBAP1
| #define EMAC_TDES2_TBAP1 0xFFFFFFFF |
Definition at line 132 of file sc589_eth2_driver.h.
◆ EMAC_TDES3_TBAP2
| #define EMAC_TDES3_TBAP2 0xFFFFFFFF |
Definition at line 133 of file sc589_eth2_driver.h.
◆ ENUM_EMAC_DMA_BUSMODE_PBL_1
| #define ENUM_EMAC_DMA_BUSMODE_PBL_1 (1 << BITP_EMAC_DMA0_BUSMODE_PBL) |
Definition at line 94 of file sc589_eth2_driver.h.
◆ ENUM_EMAC_DMA_BUSMODE_PBL_16
| #define ENUM_EMAC_DMA_BUSMODE_PBL_16 (16 << BITP_EMAC_DMA0_BUSMODE_PBL) |
Definition at line 98 of file sc589_eth2_driver.h.
◆ ENUM_EMAC_DMA_BUSMODE_PBL_2
| #define ENUM_EMAC_DMA_BUSMODE_PBL_2 (2 << BITP_EMAC_DMA0_BUSMODE_PBL) |
Definition at line 95 of file sc589_eth2_driver.h.
◆ ENUM_EMAC_DMA_BUSMODE_PBL_32
| #define ENUM_EMAC_DMA_BUSMODE_PBL_32 (32 << BITP_EMAC_DMA0_BUSMODE_PBL) |
Definition at line 99 of file sc589_eth2_driver.h.
◆ ENUM_EMAC_DMA_BUSMODE_PBL_4
| #define ENUM_EMAC_DMA_BUSMODE_PBL_4 (4 << BITP_EMAC_DMA0_BUSMODE_PBL) |
Definition at line 96 of file sc589_eth2_driver.h.
◆ ENUM_EMAC_DMA_BUSMODE_PBL_8
| #define ENUM_EMAC_DMA_BUSMODE_PBL_8 (8 << BITP_EMAC_DMA0_BUSMODE_PBL) |
Definition at line 97 of file sc589_eth2_driver.h.
◆ ENUM_EMAC_DMA_BUSMODE_RPBL_1
| #define ENUM_EMAC_DMA_BUSMODE_RPBL_1 (1 << BITP_EMAC_DMA0_BUSMODE_RPBL) |
Definition at line 87 of file sc589_eth2_driver.h.
◆ ENUM_EMAC_DMA_BUSMODE_RPBL_16
| #define ENUM_EMAC_DMA_BUSMODE_RPBL_16 (16 << BITP_EMAC_DMA0_BUSMODE_RPBL) |
Definition at line 91 of file sc589_eth2_driver.h.
◆ ENUM_EMAC_DMA_BUSMODE_RPBL_2
| #define ENUM_EMAC_DMA_BUSMODE_RPBL_2 (2 << BITP_EMAC_DMA0_BUSMODE_RPBL) |
Definition at line 88 of file sc589_eth2_driver.h.
◆ ENUM_EMAC_DMA_BUSMODE_RPBL_32
| #define ENUM_EMAC_DMA_BUSMODE_RPBL_32 (32 << BITP_EMAC_DMA0_BUSMODE_RPBL) |
Definition at line 92 of file sc589_eth2_driver.h.
◆ ENUM_EMAC_DMA_BUSMODE_RPBL_4
| #define ENUM_EMAC_DMA_BUSMODE_RPBL_4 (4 << BITP_EMAC_DMA0_BUSMODE_RPBL) |
Definition at line 89 of file sc589_eth2_driver.h.
◆ ENUM_EMAC_DMA_BUSMODE_RPBL_8
| #define ENUM_EMAC_DMA_BUSMODE_RPBL_8 (8 << BITP_EMAC_DMA0_BUSMODE_RPBL) |
Definition at line 90 of file sc589_eth2_driver.h.
◆ ENUM_EMAC_SMI_ADDR_CR_DIV16
| #define ENUM_EMAC_SMI_ADDR_CR_DIV16 (2 << BITP_EMAC_SMI_ADDR_CR) |
Definition at line 83 of file sc589_eth2_driver.h.
◆ ENUM_EMAC_SMI_ADDR_CR_DIV26
| #define ENUM_EMAC_SMI_ADDR_CR_DIV26 (3 << BITP_EMAC_SMI_ADDR_CR) |
Definition at line 84 of file sc589_eth2_driver.h.
◆ ENUM_EMAC_SMI_ADDR_CR_DIV42
| #define ENUM_EMAC_SMI_ADDR_CR_DIV42 (0 << BITP_EMAC_SMI_ADDR_CR) |
Definition at line 81 of file sc589_eth2_driver.h.
◆ ENUM_EMAC_SMI_ADDR_CR_DIV62
| #define ENUM_EMAC_SMI_ADDR_CR_DIV62 (1 << BITP_EMAC_SMI_ADDR_CR) |
Definition at line 82 of file sc589_eth2_driver.h.
◆ SC589_ETH2_IRQ_PRIORITY
| #define SC589_ETH2_IRQ_PRIORITY 0 |
Definition at line 67 of file sc589_eth2_driver.h.
◆ SC589_ETH2_RAM_SECTION
| #define SC589_ETH2_RAM_SECTION ".l2_uncached_data" |
Definition at line 74 of file sc589_eth2_driver.h.
◆ SC589_ETH2_RX_BUFFER_COUNT
| #define SC589_ETH2_RX_BUFFER_COUNT 6 |
Definition at line 53 of file sc589_eth2_driver.h.
◆ SC589_ETH2_RX_BUFFER_SIZE
| #define SC589_ETH2_RX_BUFFER_SIZE 1536 |
Definition at line 60 of file sc589_eth2_driver.h.
◆ SC589_ETH2_TX_BUFFER_COUNT
| #define SC589_ETH2_TX_BUFFER_COUNT 3 |
Definition at line 39 of file sc589_eth2_driver.h.
◆ SC589_ETH2_TX_BUFFER_SIZE
| #define SC589_ETH2_TX_BUFFER_SIZE 1536 |
Definition at line 46 of file sc589_eth2_driver.h.
Function Documentation
◆ sc589Eth2CalcCrc()
| uint32_t sc589Eth2CalcCrc | ( | const void * | data, |
| size_t | length | ||
| ) |
CRC calculation.
- Parameters
-
[in] data Pointer to the data over which to calculate the CRC [in] length Number of bytes to process
- Returns
- Resulting CRC value
Definition at line 879 of file sc589_eth2_driver.c.
◆ sc589Eth2DisableIrq()
| void sc589Eth2DisableIrq | ( | NetInterface * | interface | ) |
Disable interrupts.
- Parameters
-
[in] interface Underlying network interface
Definition at line 391 of file sc589_eth2_driver.c.
◆ sc589Eth2EnableIrq()
| void sc589Eth2EnableIrq | ( | NetInterface * | interface | ) |
Enable interrupts.
- Parameters
-
[in] interface Underlying network interface
Definition at line 363 of file sc589_eth2_driver.c.
◆ sc589Eth2EventHandler()
| void sc589Eth2EventHandler | ( | NetInterface * | interface | ) |
ADSP-SC589 Ethernet MAC event handler.
- Parameters
-
[in] interface Underlying network interface
Definition at line 473 of file sc589_eth2_driver.c.
◆ sc589Eth2Init()
| error_t sc589Eth2Init | ( | NetInterface * | interface | ) |
ADSP-SC589 Ethernet MAC initialization.
- Parameters
-
[in] interface Underlying network interface
- Returns
- Error code
Definition at line 119 of file sc589_eth2_driver.c.
◆ sc589Eth2InitDmaDesc()
| void sc589Eth2InitDmaDesc | ( | NetInterface * | interface | ) |
Initialize DMA descriptor lists.
- Parameters
-
[in] interface Underlying network interface
Definition at line 269 of file sc589_eth2_driver.c.
◆ sc589Eth2InitGpio()
| void sc589Eth2InitGpio | ( | NetInterface * | interface | ) |
GPIO configuration.
- Parameters
-
[in] interface Underlying network interface
Definition at line 223 of file sc589_eth2_driver.c.
◆ sc589Eth2IrqHandler()
| void sc589Eth2IrqHandler | ( | uint32_t | id, |
| void * | param | ||
| ) |
ADSP-SC589 Ethernet MAC interrupt service routine.
- Parameters
-
id Interrupt identifier param Unused parameter
Definition at line 420 of file sc589_eth2_driver.c.
◆ sc589Eth2ReadPhyReg()
| uint16_t sc589Eth2ReadPhyReg | ( | uint8_t | opcode, |
| uint8_t | phyAddr, | ||
| uint8_t | regAddr | ||
| ) |
Read PHY register.
- Parameters
-
[in] opcode Access type (2 bits) [in] phyAddr PHY address (5 bits) [in] regAddr Register address (5 bits)
- Returns
- Register value
Definition at line 833 of file sc589_eth2_driver.c.
◆ sc589Eth2ReceivePacket()
| error_t sc589Eth2ReceivePacket | ( | NetInterface * | interface | ) |
Receive a packet.
- Parameters
-
[in] interface Underlying network interface
- Returns
- Error code
Definition at line 562 of file sc589_eth2_driver.c.
◆ sc589Eth2SendPacket()
| error_t sc589Eth2SendPacket | ( | NetInterface * | interface, |
| const NetBuffer * | buffer, | ||
| size_t | offset, | ||
| NetTxAncillary * | ancillary | ||
| ) |
Send a packet.
- Parameters
-
[in] interface Underlying network interface [in] buffer Multi-part buffer containing the data to send [in] offset Offset to the first data byte [in] ancillary Additional options passed to the stack along with the packet
- Returns
- Error code
Definition at line 498 of file sc589_eth2_driver.c.
◆ sc589Eth2Tick()
| void sc589Eth2Tick | ( | NetInterface * | interface | ) |
ADSP-SC589 Ethernet MAC timer handler.
This routine is periodically called by the TCP/IP stack to handle periodic operations such as polling the link state
- Parameters
-
[in] interface Underlying network interface
Definition at line 338 of file sc589_eth2_driver.c.
◆ sc589Eth2UpdateMacAddrFilter()
| error_t sc589Eth2UpdateMacAddrFilter | ( | NetInterface * | interface | ) |
Configure MAC address filtering.
- Parameters
-
[in] interface Underlying network interface
- Returns
- Error code
Definition at line 634 of file sc589_eth2_driver.c.
◆ sc589Eth2UpdateMacConfig()
| error_t sc589Eth2UpdateMacConfig | ( | NetInterface * | interface | ) |
Adjust MAC configuration parameters for proper operation.
- Parameters
-
[in] interface Underlying network interface
- Returns
- Error code
Definition at line 748 of file sc589_eth2_driver.c.
◆ sc589Eth2WritePhyReg()
| void sc589Eth2WritePhyReg | ( | uint8_t | opcode, |
| uint8_t | phyAddr, | ||
| uint8_t | regAddr, | ||
| uint16_t | data | ||
| ) |
Write PHY register.
- Parameters
-
[in] opcode Access type (2 bits) [in] phyAddr PHY address (5 bits) [in] regAddr Register address (5 bits) [in] data Register value
Definition at line 791 of file sc589_eth2_driver.c.
Variable Documentation
◆ sc589Eth2Driver
|
extern |
ADSP-SC589 Ethernet MAC driver (EMAC1 instance)
Definition at line 92 of file sc589_eth2_driver.c.
