lpc175x_eth_driver.h File Reference

LPC1758 Ethernet MAC driver. More...

#include "core/nic.h"

Go to the source code of this file.

Data Structures

struct  Lpc175xTxDesc
 Transmit descriptor. More...
 
struct  Lpc175xTxStatus
 Transmit status. More...
 
struct  Lpc175xRxDesc
 Receive descriptor. More...
 
struct  Lpc175xRxStatus
 Receive status. More...
 

Macros

#define LPC175X_ETH_TX_BUFFER_COUNT   2
 
#define LPC175X_ETH_TX_BUFFER_SIZE   1536
 
#define LPC175X_ETH_RX_BUFFER_COUNT   4
 
#define LPC175X_ETH_RX_BUFFER_SIZE   1536
 
#define LPC175X_ETH_IRQ_PRIORITY_GROUPING   2
 
#define LPC175X_ETH_IRQ_GROUP_PRIORITY   24
 
#define LPC175X_ETH_IRQ_SUB_PRIORITY   0
 
#define LPC175X_ETH_MDC_GPIO   LPC_GPIO2
 
#define LPC175X_ETH_MDC_MASK   (1 << 8)
 
#define LPC175X_ETH_MDIO_GPIO   LPC_GPIO2
 
#define LPC175X_ETH_MDIO_MASK   (1 << 9)
 
#define MAC1_SOFT_RESET   0x00008000
 
#define MAC1_SIMULATION_RESET   0x00004000
 
#define MAC1_RESET_MCS_RX   0x00000800
 
#define MAC1_RESET_RX   0x00000400
 
#define MAC1_RESET_MCS_TX   0x00000200
 
#define MAC1_RESET_TX   0x00000100
 
#define MAC1_LOOPBACK   0x00000010
 
#define MAC1_TX_FLOW_CONTROL   0x00000008
 
#define MAC1_RX_FLOW_CONTROL   0x00000004
 
#define MAC1_PASS_ALL_FRAMES   0x00000002
 
#define MAC1_RECEIVE_ENABLE   0x00000001
 
#define MAC2_EXCESS_DEFER   0x00004000
 
#define MAC2_BACK_PRESSURE_NO_BACKOFF   0x00002000
 
#define MAC2_NO_BACKOFF   0x00001000
 
#define MAC2_LONG_PREAMBLE_ENFORCEMENT   0x00000200
 
#define MAC2_PURE_PREAMBLE_ENFORCEMENT   0x00000100
 
#define MAC2_AUTO_DETECT_PAD_ENABLE   0x00000080
 
#define MAC2_VLAN_PAD_ENABLE   0x00000040
 
#define MAC2_PAD_CRC_ENABLE   0x00000020
 
#define MAC2_CRC_ENABLE   0x00000010
 
#define MAC2_DELAYED_CRC   0x00000008
 
#define MAC2_HUGE_FRAME_ENABLE   0x00000004
 
#define MAC2_FRAME_LENGTH_CHECKING   0x00000002
 
#define MAC2_FULL_DUPLEX   0x00000001
 
#define IPGT_BACK_TO_BACK_IPG   0x0000007F
 
#define IPGT_HALF_DUPLEX   0x00000012
 
#define IPGT_FULL_DUPLEX   0x00000015
 
#define IPGR_NON_BACK_TO_BACK_IPG1   0x00007F00
 
#define IPGR_NON_BACK_TO_BACK_IPG2   0x0000007F
 
#define IPGR_DEFAULT_VALUE   0x00000C12
 
#define CLRT_COLLISION_WINDOW   0x00003F00
 
#define CLRT_RETRANSMISSION_MAXIMUM   0x00003F00
 
#define CLRT_DEFAULT_VALUE   0x0000370F
 
#define MAXF_MAXIMUM_FRAME_LENGTH   0x0000FFFF
 
#define SUPP_SPEED   0x00000100
 
#define TEST_BACKPRESSURE   0x00000004
 
#define TEST_PAUSE   0x00000002
 
#define TEST_SHORTCUT_PAUSE_QUANTA   0x00000001
 
#define MCFG_RESET_MII_MGMT   0x00008000
 
#define MCFG_CLOCK   SELECT 0x0000003C
 
#define MCFG_SUPPRESS_PREAMBLE   0x00000002
 
#define MCFG_SCAN_INCREMENT   0x00000001
 
#define MCFG_CLOCK_SELECT_DIV4   0x00000000
 
#define MCFG_CLOCK_SELECT_DIV6   0x00000008
 
#define MCFG_CLOCK_SELECT_DIV8   0x0000000C
 
#define MCFG_CLOCK_SELECT_DIV10   0x00000010
 
#define MCFG_CLOCK_SELECT_DIV14   0x00000014
 
#define MCFG_CLOCK_SELECT_DIV20   0x00000018
 
#define MCFG_CLOCK_SELECT_DIV28   0x0000001C
 
#define MCFG_CLOCK_SELECT_DIV36   0x00000020
 
#define MCFG_CLOCK_SELECT_DIV40   0x00000024
 
#define MCFG_CLOCK_SELECT_DIV44   0x00000028
 
#define MCFG_CLOCK_SELECT_DIV48   0x0000002C
 
#define MCFG_CLOCK_SELECT_DIV52   0x00000030
 
#define MCFG_CLOCK_SELECT_DIV56   0x00000034
 
#define MCFG_CLOCK_SELECT_DIV60   0x00000038
 
#define MCFG_CLOCK_SELECT_DIV64   0x0000003C
 
#define MCMD_SCAN   0x00000002
 
#define MCMD_READ   0x00000001
 
#define MADR_PHY_ADDRESS   0x00001F00
 
#define MADR_REGISTER_ADDRESS   0x0000001F
 
#define MWTD_WRITE_DATA   0x0000FFFF
 
#define MRDD_READ_DATA   0x0000FFFF
 
#define MIND_MII_LINK_FAIL   0x00000008
 
#define MIND_NOT_VALID   0x00000004
 
#define MIND_SCANNING   0x00000002
 
#define MIND_BUSY   0x00000001
 
#define COMMAND_FULL_DUPLEX   0x00000400
 
#define COMMAND_RMII   0x00000200
 
#define COMMAND_TX_FLOW_CONTROL   0x00000100
 
#define COMMAND_PASS_RX_FILTER   0x00000080
 
#define COMMAND_PASS_RUNT_FRAME   0x00000040
 
#define COMMAND_RX_RESET   0x00000020
 
#define COMMAND_TX_RESET   0x00000010
 
#define COMMAND_REG_RESET   0x00000008
 
#define COMMAND_TX_ENABLE   0x00000002
 
#define COMMAND_RX_ENABLE   0x00000001
 
#define STATUS_TX   0x00000002
 
#define STATUS_RX   0x00000001
 
#define TSV0_VLAN   0x80000000
 
#define TSV0_BACKPRESSURE   0x40000000
 
#define TSV0_PAUSE   0x20000000
 
#define TSV0_CONTROL_FRAME   0x10000000
 
#define TSV0_TOTAL_BYTES   0x0FFFF000
 
#define TSV0_UNDERRUN   0x00000800
 
#define TSV0_GIANT   0x00000400
 
#define TSV0_LATE_COLLISION   0x00000200
 
#define TSV0_EXCESSIVE_COLLISION   0x00000100
 
#define TSV0_EXCESSIVE_DEFER   0x00000080
 
#define TSV0_PACKET_DEFER   0x00000040
 
#define TSV0_BROADCAST   0x00000020
 
#define TSV0_MULTICAST   0x00000010
 
#define TSV0_DONE   0x00000008
 
#define TSV0_LENGTH_OUT_OF_RANGE   0x00000004
 
#define TSV0_LENGTH_CHECK_ERROR   0x00000002
 
#define TSV0_CRC_ERROR   0x00000001
 
#define TSV1_TRANSMIT_COLLISION_COUNT   0x000F0000
 
#define TSV1_TRANSMIT_BYTE_COUNT   0x0000FFFF
 
#define RSV_VLAN   0x40000000
 
#define RSV_UNSUPPORTED_OPCODE   0x20000000
 
#define RSV_PAUSE   0x10000000
 
#define RSV_CONTROL_FRAME   0x08000000
 
#define RSV_DRIBBLE_NIBBLE   0x04000000
 
#define RSV_BROADCAST   0x02000000
 
#define RSV_MULTICAST   0x01000000
 
#define RSV_RECEIVE_OK   0x00800000
 
#define RSV_LENGTH_OUT_OF_RANGE   0x00400000
 
#define RSV_LENGTH_CHECK_ERROR   0x00200000
 
#define RSV_CRC_ERROR   0x00100000
 
#define RSV_RECEIVE_CODE_VIOLATION   0x00080000
 
#define RSV_CARRIER_EVENT_PREV_SEEN   0x00040000
 
#define RSV_RXDV_EVENT_PREV_SEEN   0x00020000
 
#define RSV_PACKET_PREVIOUSLY_IGNORED   0x00010000
 
#define RSV_RECEIVED_BYTE_COUNT   0x0000FFFF
 
#define FCC_PAUSE_TIMER   0xFFFF0000
 
#define FCC_MIRROR_COUNTER   0x0000FFFF
 
#define FCS_MIRROR_COUNTER_CURRENT   0x0000FFFF
 
#define RFC_RX_FILTER_EN_WOL   0x00002000
 
#define RFC_MAGIC_PACKET_EN_WOL   0x00001000
 
#define RFC_ACCEPT_PERFECT_EN   0x00000020
 
#define RFC_ACCEPT_MULTICAST_HASH_EN   0x00000010
 
#define RFC_ACCEPT_UNICAST_HASH_EN   0x00000008
 
#define RFC_ACCEPT_MULTICAST_EN   0x00000004
 
#define RFC_ACCEPT_BROADCAST_EN   0x00000002
 
#define RFC_ACCEPT_UNICAST_EN   0x00000001
 
#define RFWS_MAGIC_PACKET_WOL   0x00000100
 
#define RFWS_RX_FILTER_WOL   0x00000080
 
#define RFWS_ACCEPT_PERFECT_WOL   0x00000020
 
#define RFWS_ACCEPT_MULTICAST_HASH_WOL   0x00000010
 
#define RFWS_ACCEPT_UNICAST_HASH_WOL   0x00000008
 
#define RFWS_ACCEPT_MULTICAST_WOL   0x00000004
 
#define RFWS_ACCEPT_BROADCAST_WOL   0x00000002
 
#define RFWS_ACCEPT_UNICAST_WOL   0x00000001
 
#define INT_WAKEUP   0x00002000
 
#define INT_SOFT_INT   0x00001000
 
#define INT_TX_DONE   0x00000080
 
#define INT_TX_FINISHED   0x00000040
 
#define INT_TX_ERROR   0x00000020
 
#define INT_TX_UNDERRUN   0x00000010
 
#define INT_RX_DONE   0x00000008
 
#define INT_RX_FINISHED   0x00000004
 
#define INT_RX_ERROR   0x00000002
 
#define INT_RX_OVERRUN   0x00000001
 
#define TX_CTRL_INTERRUPT   0x80000000
 
#define TX_CTRL_LAST   0x40000000
 
#define TX_CTRL_CRC   0x20000000
 
#define TX_CTRL_PAD   0x10000000
 
#define TX_CTRL_HUGE   0x08000000
 
#define TX_CTRL_OVERRIDE   0x04000000
 
#define TX_CTRL_SIZE   0x000007FF
 
#define TX_STATUS_ERROR   0x80000000
 
#define TX_STATUS_NO_DESCRIPTOR   0x40000000
 
#define TX_STATUS_UNDERRUN   0x20000000
 
#define TX_STATUS_LATE_COLLISION   0x10000000
 
#define TX_STATUS_EXCESSIVE_COLLISION   0x08000000
 
#define TX_STATUS_EXCESSIVE_DEFER   0x04000000
 
#define TX_STATUS_DEFER   0x02000000
 
#define TX_STATUS_COLLISION_COUNT   0x01E00000
 
#define RX_CTRL_INTERRUPT   0x80000000
 
#define RX_CTRL_SIZE   0x000007FF
 
#define RX_STATUS_ERROR   0x80000000
 
#define RX_STATUS_LAST_FLAG   0x40000000
 
#define RX_STATUS_NO_DESCRIPTOR   0x20000000
 
#define RX_STATUS_OVERRUN   0x10000000
 
#define RX_STATUS_ALIGNMENT_ERROR   0x08000000
 
#define RX_STATUS_RANGE_ERROR   0x04000000
 
#define RX_STATUS_LENGTH_ERROR   0x02000000
 
#define RX_STATUS_SYMBOL_ERROR   0x01000000
 
#define RX_STATUS_CRC_ERROR   0x00800000
 
#define RX_STATUS_BROADCAST   0x00400000
 
#define RX_STATUS_MULTICAST   0x00200000
 
#define RX_STATUS_FAIL_FILTER   0x00100000
 
#define RX_STATUS_VLAN   0x00080000
 
#define RX_STATUS_CONTROL_FRAME   0x00040000
 
#define RX_STATUS_SIZE   0x000007FF
 
#define RX_HASH_CRC_DA   0x001FF000
 
#define RX_HASH_CRC_SA   0x000001FF
 

Functions

error_t lpc175xEthInit (NetInterface *interface)
 LPC175x Ethernet MAC initialization. More...
 
void lpc175xEthInitGpio (NetInterface *interface)
 GPIO configuration. More...
 
void lpc175xEthInitDesc (NetInterface *interface)
 Initialize TX and RX descriptors. More...
 
void lpc175xEthTick (NetInterface *interface)
 LPC175x Ethernet MAC timer handler. More...
 
void lpc175xEthEnableIrq (NetInterface *interface)
 Enable interrupts. More...
 
void lpc175xEthDisableIrq (NetInterface *interface)
 Disable interrupts. More...
 
void lpc175xEthEventHandler (NetInterface *interface)
 LPC175x Ethernet MAC event handler. More...
 
error_t lpc175xEthSendPacket (NetInterface *interface, const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary)
 Send a packet. More...
 
error_t lpc175xEthReceivePacket (NetInterface *interface)
 Receive a packet. More...
 
error_t lpc175xEthUpdateMacAddrFilter (NetInterface *interface)
 Configure MAC address filtering. More...
 
error_t lpc175xEthUpdateMacConfig (NetInterface *interface)
 Adjust MAC configuration parameters for proper operation. More...
 
void lpc175xEthWritePhyReg (uint8_t opcode, uint8_t phyAddr, uint8_t regAddr, uint16_t data)
 Write PHY register. More...
 
uint16_t lpc175xEthReadPhyReg (uint8_t opcode, uint8_t phyAddr, uint8_t regAddr)
 Read PHY register. More...
 
void lpc175xEthWriteSmi (uint32_t data, uint_t length)
 SMI write operation. More...
 
uint32_t lpc175xEthReadSmi (uint_t length)
 SMI read operation. More...
 
uint32_t lpc175xEthCalcCrc (const void *data, size_t length)
 CRC calculation. More...
 

Variables

const NicDriver lpc175xEthDriver
 LPC175x Ethernet MAC driver. More...
 

Detailed Description

LPC1758 Ethernet MAC driver.

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2010-2024 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.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.4.4

Definition in file lpc175x_eth_driver.h.

Macro Definition Documentation

◆ CLRT_COLLISION_WINDOW

#define CLRT_COLLISION_WINDOW   0x00003F00

Definition at line 143 of file lpc175x_eth_driver.h.

◆ CLRT_DEFAULT_VALUE

#define CLRT_DEFAULT_VALUE   0x0000370F

Definition at line 145 of file lpc175x_eth_driver.h.

◆ CLRT_RETRANSMISSION_MAXIMUM

#define CLRT_RETRANSMISSION_MAXIMUM   0x00003F00

Definition at line 144 of file lpc175x_eth_driver.h.

◆ COMMAND_FULL_DUPLEX

#define COMMAND_FULL_DUPLEX   0x00000400

Definition at line 201 of file lpc175x_eth_driver.h.

◆ COMMAND_PASS_RUNT_FRAME

#define COMMAND_PASS_RUNT_FRAME   0x00000040

Definition at line 205 of file lpc175x_eth_driver.h.

◆ COMMAND_PASS_RX_FILTER

#define COMMAND_PASS_RX_FILTER   0x00000080

Definition at line 204 of file lpc175x_eth_driver.h.

◆ COMMAND_REG_RESET

#define COMMAND_REG_RESET   0x00000008

Definition at line 208 of file lpc175x_eth_driver.h.

◆ COMMAND_RMII

#define COMMAND_RMII   0x00000200

Definition at line 202 of file lpc175x_eth_driver.h.

◆ COMMAND_RX_ENABLE

#define COMMAND_RX_ENABLE   0x00000001

Definition at line 210 of file lpc175x_eth_driver.h.

◆ COMMAND_RX_RESET

#define COMMAND_RX_RESET   0x00000020

Definition at line 206 of file lpc175x_eth_driver.h.

◆ COMMAND_TX_ENABLE

#define COMMAND_TX_ENABLE   0x00000002

Definition at line 209 of file lpc175x_eth_driver.h.

◆ COMMAND_TX_FLOW_CONTROL

#define COMMAND_TX_FLOW_CONTROL   0x00000100

Definition at line 203 of file lpc175x_eth_driver.h.

◆ COMMAND_TX_RESET

#define COMMAND_TX_RESET   0x00000010

Definition at line 207 of file lpc175x_eth_driver.h.

◆ FCC_MIRROR_COUNTER

#define FCC_MIRROR_COUNTER   0x0000FFFF

Definition at line 259 of file lpc175x_eth_driver.h.

◆ FCC_PAUSE_TIMER

#define FCC_PAUSE_TIMER   0xFFFF0000

Definition at line 258 of file lpc175x_eth_driver.h.

◆ FCS_MIRROR_COUNTER_CURRENT

#define FCS_MIRROR_COUNTER_CURRENT   0x0000FFFF

Definition at line 262 of file lpc175x_eth_driver.h.

◆ INT_RX_DONE

#define INT_RX_DONE   0x00000008

Definition at line 291 of file lpc175x_eth_driver.h.

◆ INT_RX_ERROR

#define INT_RX_ERROR   0x00000002

Definition at line 293 of file lpc175x_eth_driver.h.

◆ INT_RX_FINISHED

#define INT_RX_FINISHED   0x00000004

Definition at line 292 of file lpc175x_eth_driver.h.

◆ INT_RX_OVERRUN

#define INT_RX_OVERRUN   0x00000001

Definition at line 294 of file lpc175x_eth_driver.h.

◆ INT_SOFT_INT

#define INT_SOFT_INT   0x00001000

Definition at line 286 of file lpc175x_eth_driver.h.

◆ INT_TX_DONE

#define INT_TX_DONE   0x00000080

Definition at line 287 of file lpc175x_eth_driver.h.

◆ INT_TX_ERROR

#define INT_TX_ERROR   0x00000020

Definition at line 289 of file lpc175x_eth_driver.h.

◆ INT_TX_FINISHED

#define INT_TX_FINISHED   0x00000040

Definition at line 288 of file lpc175x_eth_driver.h.

◆ INT_TX_UNDERRUN

#define INT_TX_UNDERRUN   0x00000010

Definition at line 290 of file lpc175x_eth_driver.h.

◆ INT_WAKEUP

#define INT_WAKEUP   0x00002000

Definition at line 285 of file lpc175x_eth_driver.h.

◆ IPGR_DEFAULT_VALUE

#define IPGR_DEFAULT_VALUE   0x00000C12

Definition at line 140 of file lpc175x_eth_driver.h.

◆ IPGR_NON_BACK_TO_BACK_IPG1

#define IPGR_NON_BACK_TO_BACK_IPG1   0x00007F00

Definition at line 138 of file lpc175x_eth_driver.h.

◆ IPGR_NON_BACK_TO_BACK_IPG2

#define IPGR_NON_BACK_TO_BACK_IPG2   0x0000007F

Definition at line 139 of file lpc175x_eth_driver.h.

◆ IPGT_BACK_TO_BACK_IPG

#define IPGT_BACK_TO_BACK_IPG   0x0000007F

Definition at line 133 of file lpc175x_eth_driver.h.

◆ IPGT_FULL_DUPLEX

#define IPGT_FULL_DUPLEX   0x00000015

Definition at line 135 of file lpc175x_eth_driver.h.

◆ IPGT_HALF_DUPLEX

#define IPGT_HALF_DUPLEX   0x00000012

Definition at line 134 of file lpc175x_eth_driver.h.

◆ LPC175X_ETH_IRQ_GROUP_PRIORITY

#define LPC175X_ETH_IRQ_GROUP_PRIORITY   24

Definition at line 74 of file lpc175x_eth_driver.h.

◆ LPC175X_ETH_IRQ_PRIORITY_GROUPING

#define LPC175X_ETH_IRQ_PRIORITY_GROUPING   2

Definition at line 67 of file lpc175x_eth_driver.h.

◆ LPC175X_ETH_IRQ_SUB_PRIORITY

#define LPC175X_ETH_IRQ_SUB_PRIORITY   0

Definition at line 81 of file lpc175x_eth_driver.h.

◆ LPC175X_ETH_MDC_GPIO

#define LPC175X_ETH_MDC_GPIO   LPC_GPIO2

Definition at line 88 of file lpc175x_eth_driver.h.

◆ LPC175X_ETH_MDC_MASK

#define LPC175X_ETH_MDC_MASK   (1 << 8)

Definition at line 92 of file lpc175x_eth_driver.h.

◆ LPC175X_ETH_MDIO_GPIO

#define LPC175X_ETH_MDIO_GPIO   LPC_GPIO2

Definition at line 97 of file lpc175x_eth_driver.h.

◆ LPC175X_ETH_MDIO_MASK

#define LPC175X_ETH_MDIO_MASK   (1 << 9)

Definition at line 101 of file lpc175x_eth_driver.h.

◆ LPC175X_ETH_RX_BUFFER_COUNT

#define LPC175X_ETH_RX_BUFFER_COUNT   4

Definition at line 53 of file lpc175x_eth_driver.h.

◆ LPC175X_ETH_RX_BUFFER_SIZE

#define LPC175X_ETH_RX_BUFFER_SIZE   1536

Definition at line 60 of file lpc175x_eth_driver.h.

◆ LPC175X_ETH_TX_BUFFER_COUNT

#define LPC175X_ETH_TX_BUFFER_COUNT   2

Definition at line 39 of file lpc175x_eth_driver.h.

◆ LPC175X_ETH_TX_BUFFER_SIZE

#define LPC175X_ETH_TX_BUFFER_SIZE   1536

Definition at line 46 of file lpc175x_eth_driver.h.

◆ MAC1_LOOPBACK

#define MAC1_LOOPBACK   0x00000010

Definition at line 111 of file lpc175x_eth_driver.h.

◆ MAC1_PASS_ALL_FRAMES

#define MAC1_PASS_ALL_FRAMES   0x00000002

Definition at line 114 of file lpc175x_eth_driver.h.

◆ MAC1_RECEIVE_ENABLE

#define MAC1_RECEIVE_ENABLE   0x00000001

Definition at line 115 of file lpc175x_eth_driver.h.

◆ MAC1_RESET_MCS_RX

#define MAC1_RESET_MCS_RX   0x00000800

Definition at line 107 of file lpc175x_eth_driver.h.

◆ MAC1_RESET_MCS_TX

#define MAC1_RESET_MCS_TX   0x00000200

Definition at line 109 of file lpc175x_eth_driver.h.

◆ MAC1_RESET_RX

#define MAC1_RESET_RX   0x00000400

Definition at line 108 of file lpc175x_eth_driver.h.

◆ MAC1_RESET_TX

#define MAC1_RESET_TX   0x00000100

Definition at line 110 of file lpc175x_eth_driver.h.

◆ MAC1_RX_FLOW_CONTROL

#define MAC1_RX_FLOW_CONTROL   0x00000004

Definition at line 113 of file lpc175x_eth_driver.h.

◆ MAC1_SIMULATION_RESET

#define MAC1_SIMULATION_RESET   0x00004000

Definition at line 106 of file lpc175x_eth_driver.h.

◆ MAC1_SOFT_RESET

#define MAC1_SOFT_RESET   0x00008000

Definition at line 105 of file lpc175x_eth_driver.h.

◆ MAC1_TX_FLOW_CONTROL

#define MAC1_TX_FLOW_CONTROL   0x00000008

Definition at line 112 of file lpc175x_eth_driver.h.

◆ MAC2_AUTO_DETECT_PAD_ENABLE

#define MAC2_AUTO_DETECT_PAD_ENABLE   0x00000080

Definition at line 123 of file lpc175x_eth_driver.h.

◆ MAC2_BACK_PRESSURE_NO_BACKOFF

#define MAC2_BACK_PRESSURE_NO_BACKOFF   0x00002000

Definition at line 119 of file lpc175x_eth_driver.h.

◆ MAC2_CRC_ENABLE

#define MAC2_CRC_ENABLE   0x00000010

Definition at line 126 of file lpc175x_eth_driver.h.

◆ MAC2_DELAYED_CRC

#define MAC2_DELAYED_CRC   0x00000008

Definition at line 127 of file lpc175x_eth_driver.h.

◆ MAC2_EXCESS_DEFER

#define MAC2_EXCESS_DEFER   0x00004000

Definition at line 118 of file lpc175x_eth_driver.h.

◆ MAC2_FRAME_LENGTH_CHECKING

#define MAC2_FRAME_LENGTH_CHECKING   0x00000002

Definition at line 129 of file lpc175x_eth_driver.h.

◆ MAC2_FULL_DUPLEX

#define MAC2_FULL_DUPLEX   0x00000001

Definition at line 130 of file lpc175x_eth_driver.h.

◆ MAC2_HUGE_FRAME_ENABLE

#define MAC2_HUGE_FRAME_ENABLE   0x00000004

Definition at line 128 of file lpc175x_eth_driver.h.

◆ MAC2_LONG_PREAMBLE_ENFORCEMENT

#define MAC2_LONG_PREAMBLE_ENFORCEMENT   0x00000200

Definition at line 121 of file lpc175x_eth_driver.h.

◆ MAC2_NO_BACKOFF

#define MAC2_NO_BACKOFF   0x00001000

Definition at line 120 of file lpc175x_eth_driver.h.

◆ MAC2_PAD_CRC_ENABLE

#define MAC2_PAD_CRC_ENABLE   0x00000020

Definition at line 125 of file lpc175x_eth_driver.h.

◆ MAC2_PURE_PREAMBLE_ENFORCEMENT

#define MAC2_PURE_PREAMBLE_ENFORCEMENT   0x00000100

Definition at line 122 of file lpc175x_eth_driver.h.

◆ MAC2_VLAN_PAD_ENABLE

#define MAC2_VLAN_PAD_ENABLE   0x00000040

Definition at line 124 of file lpc175x_eth_driver.h.

◆ MADR_PHY_ADDRESS

#define MADR_PHY_ADDRESS   0x00001F00

Definition at line 185 of file lpc175x_eth_driver.h.

◆ MADR_REGISTER_ADDRESS

#define MADR_REGISTER_ADDRESS   0x0000001F

Definition at line 186 of file lpc175x_eth_driver.h.

◆ MAXF_MAXIMUM_FRAME_LENGTH

#define MAXF_MAXIMUM_FRAME_LENGTH   0x0000FFFF

Definition at line 148 of file lpc175x_eth_driver.h.

◆ MCFG_CLOCK

#define MCFG_CLOCK   SELECT 0x0000003C

Definition at line 160 of file lpc175x_eth_driver.h.

◆ MCFG_CLOCK_SELECT_DIV10

#define MCFG_CLOCK_SELECT_DIV10   0x00000010

Definition at line 167 of file lpc175x_eth_driver.h.

◆ MCFG_CLOCK_SELECT_DIV14

#define MCFG_CLOCK_SELECT_DIV14   0x00000014

Definition at line 168 of file lpc175x_eth_driver.h.

◆ MCFG_CLOCK_SELECT_DIV20

#define MCFG_CLOCK_SELECT_DIV20   0x00000018

Definition at line 169 of file lpc175x_eth_driver.h.

◆ MCFG_CLOCK_SELECT_DIV28

#define MCFG_CLOCK_SELECT_DIV28   0x0000001C

Definition at line 170 of file lpc175x_eth_driver.h.

◆ MCFG_CLOCK_SELECT_DIV36

#define MCFG_CLOCK_SELECT_DIV36   0x00000020

Definition at line 171 of file lpc175x_eth_driver.h.

◆ MCFG_CLOCK_SELECT_DIV4

#define MCFG_CLOCK_SELECT_DIV4   0x00000000

Definition at line 164 of file lpc175x_eth_driver.h.

◆ MCFG_CLOCK_SELECT_DIV40

#define MCFG_CLOCK_SELECT_DIV40   0x00000024

Definition at line 172 of file lpc175x_eth_driver.h.

◆ MCFG_CLOCK_SELECT_DIV44

#define MCFG_CLOCK_SELECT_DIV44   0x00000028

Definition at line 173 of file lpc175x_eth_driver.h.

◆ MCFG_CLOCK_SELECT_DIV48

#define MCFG_CLOCK_SELECT_DIV48   0x0000002C

Definition at line 174 of file lpc175x_eth_driver.h.

◆ MCFG_CLOCK_SELECT_DIV52

#define MCFG_CLOCK_SELECT_DIV52   0x00000030

Definition at line 175 of file lpc175x_eth_driver.h.

◆ MCFG_CLOCK_SELECT_DIV56

#define MCFG_CLOCK_SELECT_DIV56   0x00000034

Definition at line 176 of file lpc175x_eth_driver.h.

◆ MCFG_CLOCK_SELECT_DIV6

#define MCFG_CLOCK_SELECT_DIV6   0x00000008

Definition at line 165 of file lpc175x_eth_driver.h.

◆ MCFG_CLOCK_SELECT_DIV60

#define MCFG_CLOCK_SELECT_DIV60   0x00000038

Definition at line 177 of file lpc175x_eth_driver.h.

◆ MCFG_CLOCK_SELECT_DIV64

#define MCFG_CLOCK_SELECT_DIV64   0x0000003C

Definition at line 178 of file lpc175x_eth_driver.h.

◆ MCFG_CLOCK_SELECT_DIV8

#define MCFG_CLOCK_SELECT_DIV8   0x0000000C

Definition at line 166 of file lpc175x_eth_driver.h.

◆ MCFG_RESET_MII_MGMT

#define MCFG_RESET_MII_MGMT   0x00008000

Definition at line 159 of file lpc175x_eth_driver.h.

◆ MCFG_SCAN_INCREMENT

#define MCFG_SCAN_INCREMENT   0x00000001

Definition at line 162 of file lpc175x_eth_driver.h.

◆ MCFG_SUPPRESS_PREAMBLE

#define MCFG_SUPPRESS_PREAMBLE   0x00000002

Definition at line 161 of file lpc175x_eth_driver.h.

◆ MCMD_READ

#define MCMD_READ   0x00000001

Definition at line 182 of file lpc175x_eth_driver.h.

◆ MCMD_SCAN

#define MCMD_SCAN   0x00000002

Definition at line 181 of file lpc175x_eth_driver.h.

◆ MIND_BUSY

#define MIND_BUSY   0x00000001

Definition at line 198 of file lpc175x_eth_driver.h.

◆ MIND_MII_LINK_FAIL

#define MIND_MII_LINK_FAIL   0x00000008

Definition at line 195 of file lpc175x_eth_driver.h.

◆ MIND_NOT_VALID

#define MIND_NOT_VALID   0x00000004

Definition at line 196 of file lpc175x_eth_driver.h.

◆ MIND_SCANNING

#define MIND_SCANNING   0x00000002

Definition at line 197 of file lpc175x_eth_driver.h.

◆ MRDD_READ_DATA

#define MRDD_READ_DATA   0x0000FFFF

Definition at line 192 of file lpc175x_eth_driver.h.

◆ MWTD_WRITE_DATA

#define MWTD_WRITE_DATA   0x0000FFFF

Definition at line 189 of file lpc175x_eth_driver.h.

◆ RFC_ACCEPT_BROADCAST_EN

#define RFC_ACCEPT_BROADCAST_EN   0x00000002

Definition at line 271 of file lpc175x_eth_driver.h.

◆ RFC_ACCEPT_MULTICAST_EN

#define RFC_ACCEPT_MULTICAST_EN   0x00000004

Definition at line 270 of file lpc175x_eth_driver.h.

◆ RFC_ACCEPT_MULTICAST_HASH_EN

#define RFC_ACCEPT_MULTICAST_HASH_EN   0x00000010

Definition at line 268 of file lpc175x_eth_driver.h.

◆ RFC_ACCEPT_PERFECT_EN

#define RFC_ACCEPT_PERFECT_EN   0x00000020

Definition at line 267 of file lpc175x_eth_driver.h.

◆ RFC_ACCEPT_UNICAST_EN

#define RFC_ACCEPT_UNICAST_EN   0x00000001

Definition at line 272 of file lpc175x_eth_driver.h.

◆ RFC_ACCEPT_UNICAST_HASH_EN

#define RFC_ACCEPT_UNICAST_HASH_EN   0x00000008

Definition at line 269 of file lpc175x_eth_driver.h.

◆ RFC_MAGIC_PACKET_EN_WOL

#define RFC_MAGIC_PACKET_EN_WOL   0x00001000

Definition at line 266 of file lpc175x_eth_driver.h.

◆ RFC_RX_FILTER_EN_WOL

#define RFC_RX_FILTER_EN_WOL   0x00002000

Definition at line 265 of file lpc175x_eth_driver.h.

◆ RFWS_ACCEPT_BROADCAST_WOL

#define RFWS_ACCEPT_BROADCAST_WOL   0x00000002

Definition at line 281 of file lpc175x_eth_driver.h.

◆ RFWS_ACCEPT_MULTICAST_HASH_WOL

#define RFWS_ACCEPT_MULTICAST_HASH_WOL   0x00000010

Definition at line 278 of file lpc175x_eth_driver.h.

◆ RFWS_ACCEPT_MULTICAST_WOL

#define RFWS_ACCEPT_MULTICAST_WOL   0x00000004

Definition at line 280 of file lpc175x_eth_driver.h.

◆ RFWS_ACCEPT_PERFECT_WOL

#define RFWS_ACCEPT_PERFECT_WOL   0x00000020

Definition at line 277 of file lpc175x_eth_driver.h.

◆ RFWS_ACCEPT_UNICAST_HASH_WOL

#define RFWS_ACCEPT_UNICAST_HASH_WOL   0x00000008

Definition at line 279 of file lpc175x_eth_driver.h.

◆ RFWS_ACCEPT_UNICAST_WOL

#define RFWS_ACCEPT_UNICAST_WOL   0x00000001

Definition at line 282 of file lpc175x_eth_driver.h.

◆ RFWS_MAGIC_PACKET_WOL

#define RFWS_MAGIC_PACKET_WOL   0x00000100

Definition at line 275 of file lpc175x_eth_driver.h.

◆ RFWS_RX_FILTER_WOL

#define RFWS_RX_FILTER_WOL   0x00000080

Definition at line 276 of file lpc175x_eth_driver.h.

◆ RSV_BROADCAST

#define RSV_BROADCAST   0x02000000

Definition at line 245 of file lpc175x_eth_driver.h.

◆ RSV_CARRIER_EVENT_PREV_SEEN

#define RSV_CARRIER_EVENT_PREV_SEEN   0x00040000

Definition at line 252 of file lpc175x_eth_driver.h.

◆ RSV_CONTROL_FRAME

#define RSV_CONTROL_FRAME   0x08000000

Definition at line 243 of file lpc175x_eth_driver.h.

◆ RSV_CRC_ERROR

#define RSV_CRC_ERROR   0x00100000

Definition at line 250 of file lpc175x_eth_driver.h.

◆ RSV_DRIBBLE_NIBBLE

#define RSV_DRIBBLE_NIBBLE   0x04000000

Definition at line 244 of file lpc175x_eth_driver.h.

◆ RSV_LENGTH_CHECK_ERROR

#define RSV_LENGTH_CHECK_ERROR   0x00200000

Definition at line 249 of file lpc175x_eth_driver.h.

◆ RSV_LENGTH_OUT_OF_RANGE

#define RSV_LENGTH_OUT_OF_RANGE   0x00400000

Definition at line 248 of file lpc175x_eth_driver.h.

◆ RSV_MULTICAST

#define RSV_MULTICAST   0x01000000

Definition at line 246 of file lpc175x_eth_driver.h.

◆ RSV_PACKET_PREVIOUSLY_IGNORED

#define RSV_PACKET_PREVIOUSLY_IGNORED   0x00010000

Definition at line 254 of file lpc175x_eth_driver.h.

◆ RSV_PAUSE

#define RSV_PAUSE   0x10000000

Definition at line 242 of file lpc175x_eth_driver.h.

◆ RSV_RECEIVE_CODE_VIOLATION

#define RSV_RECEIVE_CODE_VIOLATION   0x00080000

Definition at line 251 of file lpc175x_eth_driver.h.

◆ RSV_RECEIVE_OK

#define RSV_RECEIVE_OK   0x00800000

Definition at line 247 of file lpc175x_eth_driver.h.

◆ RSV_RECEIVED_BYTE_COUNT

#define RSV_RECEIVED_BYTE_COUNT   0x0000FFFF

Definition at line 255 of file lpc175x_eth_driver.h.

◆ RSV_RXDV_EVENT_PREV_SEEN

#define RSV_RXDV_EVENT_PREV_SEEN   0x00020000

Definition at line 253 of file lpc175x_eth_driver.h.

◆ RSV_UNSUPPORTED_OPCODE

#define RSV_UNSUPPORTED_OPCODE   0x20000000

Definition at line 241 of file lpc175x_eth_driver.h.

◆ RSV_VLAN

#define RSV_VLAN   0x40000000

Definition at line 240 of file lpc175x_eth_driver.h.

◆ RX_CTRL_INTERRUPT

#define RX_CTRL_INTERRUPT   0x80000000

Definition at line 316 of file lpc175x_eth_driver.h.

◆ RX_CTRL_SIZE

#define RX_CTRL_SIZE   0x000007FF

Definition at line 317 of file lpc175x_eth_driver.h.

◆ RX_HASH_CRC_DA

#define RX_HASH_CRC_DA   0x001FF000

Definition at line 337 of file lpc175x_eth_driver.h.

◆ RX_HASH_CRC_SA

#define RX_HASH_CRC_SA   0x000001FF

Definition at line 338 of file lpc175x_eth_driver.h.

◆ RX_STATUS_ALIGNMENT_ERROR

#define RX_STATUS_ALIGNMENT_ERROR   0x08000000

Definition at line 324 of file lpc175x_eth_driver.h.

◆ RX_STATUS_BROADCAST

#define RX_STATUS_BROADCAST   0x00400000

Definition at line 329 of file lpc175x_eth_driver.h.

◆ RX_STATUS_CONTROL_FRAME

#define RX_STATUS_CONTROL_FRAME   0x00040000

Definition at line 333 of file lpc175x_eth_driver.h.

◆ RX_STATUS_CRC_ERROR

#define RX_STATUS_CRC_ERROR   0x00800000

Definition at line 328 of file lpc175x_eth_driver.h.

◆ RX_STATUS_ERROR

#define RX_STATUS_ERROR   0x80000000

Definition at line 320 of file lpc175x_eth_driver.h.

◆ RX_STATUS_FAIL_FILTER

#define RX_STATUS_FAIL_FILTER   0x00100000

Definition at line 331 of file lpc175x_eth_driver.h.

◆ RX_STATUS_LAST_FLAG

#define RX_STATUS_LAST_FLAG   0x40000000

Definition at line 321 of file lpc175x_eth_driver.h.

◆ RX_STATUS_LENGTH_ERROR

#define RX_STATUS_LENGTH_ERROR   0x02000000

Definition at line 326 of file lpc175x_eth_driver.h.

◆ RX_STATUS_MULTICAST

#define RX_STATUS_MULTICAST   0x00200000

Definition at line 330 of file lpc175x_eth_driver.h.

◆ RX_STATUS_NO_DESCRIPTOR

#define RX_STATUS_NO_DESCRIPTOR   0x20000000

Definition at line 322 of file lpc175x_eth_driver.h.

◆ RX_STATUS_OVERRUN

#define RX_STATUS_OVERRUN   0x10000000

Definition at line 323 of file lpc175x_eth_driver.h.

◆ RX_STATUS_RANGE_ERROR

#define RX_STATUS_RANGE_ERROR   0x04000000

Definition at line 325 of file lpc175x_eth_driver.h.

◆ RX_STATUS_SIZE

#define RX_STATUS_SIZE   0x000007FF

Definition at line 334 of file lpc175x_eth_driver.h.

◆ RX_STATUS_SYMBOL_ERROR

#define RX_STATUS_SYMBOL_ERROR   0x01000000

Definition at line 327 of file lpc175x_eth_driver.h.

◆ RX_STATUS_VLAN

#define RX_STATUS_VLAN   0x00080000

Definition at line 332 of file lpc175x_eth_driver.h.

◆ STATUS_RX

#define STATUS_RX   0x00000001

Definition at line 214 of file lpc175x_eth_driver.h.

◆ STATUS_TX

#define STATUS_TX   0x00000002

Definition at line 213 of file lpc175x_eth_driver.h.

◆ SUPP_SPEED

#define SUPP_SPEED   0x00000100

Definition at line 151 of file lpc175x_eth_driver.h.

◆ TEST_BACKPRESSURE

#define TEST_BACKPRESSURE   0x00000004

Definition at line 154 of file lpc175x_eth_driver.h.

◆ TEST_PAUSE

#define TEST_PAUSE   0x00000002

Definition at line 155 of file lpc175x_eth_driver.h.

◆ TEST_SHORTCUT_PAUSE_QUANTA

#define TEST_SHORTCUT_PAUSE_QUANTA   0x00000001

Definition at line 156 of file lpc175x_eth_driver.h.

◆ TSV0_BACKPRESSURE

#define TSV0_BACKPRESSURE   0x40000000

Definition at line 218 of file lpc175x_eth_driver.h.

◆ TSV0_BROADCAST

#define TSV0_BROADCAST   0x00000020

Definition at line 228 of file lpc175x_eth_driver.h.

◆ TSV0_CONTROL_FRAME

#define TSV0_CONTROL_FRAME   0x10000000

Definition at line 220 of file lpc175x_eth_driver.h.

◆ TSV0_CRC_ERROR

#define TSV0_CRC_ERROR   0x00000001

Definition at line 233 of file lpc175x_eth_driver.h.

◆ TSV0_DONE

#define TSV0_DONE   0x00000008

Definition at line 230 of file lpc175x_eth_driver.h.

◆ TSV0_EXCESSIVE_COLLISION

#define TSV0_EXCESSIVE_COLLISION   0x00000100

Definition at line 225 of file lpc175x_eth_driver.h.

◆ TSV0_EXCESSIVE_DEFER

#define TSV0_EXCESSIVE_DEFER   0x00000080

Definition at line 226 of file lpc175x_eth_driver.h.

◆ TSV0_GIANT

#define TSV0_GIANT   0x00000400

Definition at line 223 of file lpc175x_eth_driver.h.

◆ TSV0_LATE_COLLISION

#define TSV0_LATE_COLLISION   0x00000200

Definition at line 224 of file lpc175x_eth_driver.h.

◆ TSV0_LENGTH_CHECK_ERROR

#define TSV0_LENGTH_CHECK_ERROR   0x00000002

Definition at line 232 of file lpc175x_eth_driver.h.

◆ TSV0_LENGTH_OUT_OF_RANGE

#define TSV0_LENGTH_OUT_OF_RANGE   0x00000004

Definition at line 231 of file lpc175x_eth_driver.h.

◆ TSV0_MULTICAST

#define TSV0_MULTICAST   0x00000010

Definition at line 229 of file lpc175x_eth_driver.h.

◆ TSV0_PACKET_DEFER

#define TSV0_PACKET_DEFER   0x00000040

Definition at line 227 of file lpc175x_eth_driver.h.

◆ TSV0_PAUSE

#define TSV0_PAUSE   0x20000000

Definition at line 219 of file lpc175x_eth_driver.h.

◆ TSV0_TOTAL_BYTES

#define TSV0_TOTAL_BYTES   0x0FFFF000

Definition at line 221 of file lpc175x_eth_driver.h.

◆ TSV0_UNDERRUN

#define TSV0_UNDERRUN   0x00000800

Definition at line 222 of file lpc175x_eth_driver.h.

◆ TSV0_VLAN

#define TSV0_VLAN   0x80000000

Definition at line 217 of file lpc175x_eth_driver.h.

◆ TSV1_TRANSMIT_BYTE_COUNT

#define TSV1_TRANSMIT_BYTE_COUNT   0x0000FFFF

Definition at line 237 of file lpc175x_eth_driver.h.

◆ TSV1_TRANSMIT_COLLISION_COUNT

#define TSV1_TRANSMIT_COLLISION_COUNT   0x000F0000

Definition at line 236 of file lpc175x_eth_driver.h.

◆ TX_CTRL_CRC

#define TX_CTRL_CRC   0x20000000

Definition at line 299 of file lpc175x_eth_driver.h.

◆ TX_CTRL_HUGE

#define TX_CTRL_HUGE   0x08000000

Definition at line 301 of file lpc175x_eth_driver.h.

◆ TX_CTRL_INTERRUPT

#define TX_CTRL_INTERRUPT   0x80000000

Definition at line 297 of file lpc175x_eth_driver.h.

◆ TX_CTRL_LAST

#define TX_CTRL_LAST   0x40000000

Definition at line 298 of file lpc175x_eth_driver.h.

◆ TX_CTRL_OVERRIDE

#define TX_CTRL_OVERRIDE   0x04000000

Definition at line 302 of file lpc175x_eth_driver.h.

◆ TX_CTRL_PAD

#define TX_CTRL_PAD   0x10000000

Definition at line 300 of file lpc175x_eth_driver.h.

◆ TX_CTRL_SIZE

#define TX_CTRL_SIZE   0x000007FF

Definition at line 303 of file lpc175x_eth_driver.h.

◆ TX_STATUS_COLLISION_COUNT

#define TX_STATUS_COLLISION_COUNT   0x01E00000

Definition at line 313 of file lpc175x_eth_driver.h.

◆ TX_STATUS_DEFER

#define TX_STATUS_DEFER   0x02000000

Definition at line 312 of file lpc175x_eth_driver.h.

◆ TX_STATUS_ERROR

#define TX_STATUS_ERROR   0x80000000

Definition at line 306 of file lpc175x_eth_driver.h.

◆ TX_STATUS_EXCESSIVE_COLLISION

#define TX_STATUS_EXCESSIVE_COLLISION   0x08000000

Definition at line 310 of file lpc175x_eth_driver.h.

◆ TX_STATUS_EXCESSIVE_DEFER

#define TX_STATUS_EXCESSIVE_DEFER   0x04000000

Definition at line 311 of file lpc175x_eth_driver.h.

◆ TX_STATUS_LATE_COLLISION

#define TX_STATUS_LATE_COLLISION   0x10000000

Definition at line 309 of file lpc175x_eth_driver.h.

◆ TX_STATUS_NO_DESCRIPTOR

#define TX_STATUS_NO_DESCRIPTOR   0x40000000

Definition at line 307 of file lpc175x_eth_driver.h.

◆ TX_STATUS_UNDERRUN

#define TX_STATUS_UNDERRUN   0x20000000

Definition at line 308 of file lpc175x_eth_driver.h.

Function Documentation

◆ lpc175xEthCalcCrc()

uint32_t lpc175xEthCalcCrc ( const void *  data,
size_t  length 
)

CRC calculation.

Parameters
[in]dataPointer to the data over which to calculate the CRC
[in]lengthNumber of bytes to process
Returns
Resulting CRC value

Definition at line 864 of file lpc175x_eth_driver.c.

◆ lpc175xEthDisableIrq()

void lpc175xEthDisableIrq ( NetInterface interface)

Disable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 360 of file lpc175x_eth_driver.c.

◆ lpc175xEthEnableIrq()

void lpc175xEthEnableIrq ( NetInterface interface)

Enable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 332 of file lpc175x_eth_driver.c.

◆ lpc175xEthEventHandler()

void lpc175xEthEventHandler ( NetInterface interface)

LPC175x Ethernet MAC event handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 447 of file lpc175x_eth_driver.c.

◆ lpc175xEthInit()

error_t lpc175xEthInit ( NetInterface interface)

LPC175x Ethernet MAC initialization.

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 121 of file lpc175x_eth_driver.c.

◆ lpc175xEthInitDesc()

void lpc175xEthInitDesc ( NetInterface interface)

Initialize TX and RX descriptors.

Parameters
[in]interfaceUnderlying network interface

Definition at line 256 of file lpc175x_eth_driver.c.

◆ lpc175xEthInitGpio()

void lpc175xEthInitGpio ( NetInterface interface)

GPIO configuration.

Parameters
[in]interfaceUnderlying network interface

Definition at line 225 of file lpc175x_eth_driver.c.

◆ lpc175xEthReadPhyReg()

uint16_t lpc175xEthReadPhyReg ( uint8_t  opcode,
uint8_t  phyAddr,
uint8_t  regAddr 
)

Read PHY register.

Parameters
[in]opcodeAccess type (2 bits)
[in]phyAddrPHY address (5 bits)
[in]regAddrRegister address (5 bits)
Returns
Register value

Definition at line 752 of file lpc175x_eth_driver.c.

◆ lpc175xEthReadSmi()

uint32_t lpc175xEthReadSmi ( uint_t  length)

SMI read operation.

Parameters
[in]lengthNumber of bits to be read
Returns
Data resulting from the MDIO read operation

Definition at line 825 of file lpc175x_eth_driver.c.

◆ lpc175xEthReceivePacket()

error_t lpc175xEthReceivePacket ( NetInterface interface)

Receive a packet.

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 568 of file lpc175x_eth_driver.c.

◆ lpc175xEthSendPacket()

error_t lpc175xEthSendPacket ( NetInterface interface,
const NetBuffer buffer,
size_t  offset,
NetTxAncillary ancillary 
)

Send a packet.

Parameters
[in]interfaceUnderlying network interface
[in]bufferMulti-part buffer containing the data to send
[in]offsetOffset to the first data byte
[in]ancillaryAdditional options passed to the stack along with the packet
Returns
Error code

Definition at line 482 of file lpc175x_eth_driver.c.

◆ lpc175xEthTick()

void lpc175xEthTick ( NetInterface interface)

LPC175x 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]interfaceUnderlying network interface

Definition at line 307 of file lpc175x_eth_driver.c.

◆ lpc175xEthUpdateMacAddrFilter()

error_t lpc175xEthUpdateMacAddrFilter ( NetInterface interface)

Configure MAC address filtering.

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 621 of file lpc175x_eth_driver.c.

◆ lpc175xEthUpdateMacConfig()

error_t lpc175xEthUpdateMacConfig ( NetInterface interface)

Adjust MAC configuration parameters for proper operation.

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 679 of file lpc175x_eth_driver.c.

◆ lpc175xEthWritePhyReg()

void lpc175xEthWritePhyReg ( uint8_t  opcode,
uint8_t  phyAddr,
uint8_t  regAddr,
uint16_t  data 
)

Write PHY register.

Parameters
[in]opcodeAccess type (2 bits)
[in]phyAddrPHY address (5 bits)
[in]regAddrRegister address (5 bits)
[in]dataRegister value

Definition at line 722 of file lpc175x_eth_driver.c.

◆ lpc175xEthWriteSmi()

void lpc175xEthWriteSmi ( uint32_t  data,
uint_t  length 
)

SMI write operation.

Parameters
[in]dataRaw data to be written
[in]lengthNumber of bits to be written

Definition at line 785 of file lpc175x_eth_driver.c.

Variable Documentation

◆ lpc175xEthDriver

const NicDriver lpc175xEthDriver
extern

LPC175x Ethernet MAC driver.

Definition at line 94 of file lpc175x_eth_driver.c.