Unit LAN78XX

From Ultibo.org
Revision as of 04:33, 24 April 2018 by Ultibo (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Return to Unit Reference


Description


Microchip LAN78xx USB Ethernet Driver unit

The Microchip LAN78xx is a USB 3.1 to 10/100/1000 Gigabit Ethernet bridge device which supports 10BASE-T, 100BASE-TX and 1000BASE-T. Both USB 2.0 High Speed and USB 3.1 Super Speed interfaces are supported using a pair of Bulk Endpoints and an Interrupt Endpoint for signalling status changes and other events. The Raspberry Pi 3B+ contains a variant of this device called a LAN7515 which is a combination device containing a LAN78xx Gigabit Ethernet controller and two 4 port USB 2.0 compatible hubs. The hubs will be detected and bound by the default USB Hub driver when they are enumerated by the USB core.

Constants



[Expand]
LAN78XX specific constants LAN78XX_*


[Expand]
LAN78XX USB vendor request LAN78XX_USB_VENDOR_*


[Expand]
LAN78XX interrupt endpoint status LAN78XX_INT_ENP_*


[Expand]
LAN78XX TX/RX packet alignment LAN78XX_*_PKT_ALIGNMENT


[Expand]
LAN78XX TX command A LAN78XX_TX_CMD_A_*


[Expand]
LAN78XX TX command B LAN78XX_TX_CMD_B_*


[Expand]
LAN78XX RX command A LAN78XX_RX_CMD_A_*


[Expand]
LAN78XX RX command B LAN78XX_RX_CMD_B_*


[Expand]
LAN78XX RX command C LAN78XX_RX_CMD_C_*


[Expand]
LAN78XX system control and status LAN78XX_NUMBER_*


[Expand]
LAN78XX device Id and revision LAN78XX_ID_REV_*


[Expand]
LAN78XX FGPA revision LAN78XX_FPGA_REV_*


[Expand]
LAN78XX interrupt status LAN78XX_INT_STS_*


[Expand]
LAN78XX hardware configuration LAN78XX_HW_CFG_*


[Expand]
LAN78XX power management control LAN78XX_PMT_CTL_*


[Expand]
LAN78XX general purpose IO configuration 0 register LAN78XX_GPIO_CFG0_*


[Expand]
LAN78XX general purpose IO configuration 1 register LAN78XX_GPIO_CFG1_*


[Expand]
LAN78XX general purpose IO wake enable and polarity LAN78XX_GPIO_WAKE_*


[Expand]
LAN78XX data port select LAN78XX_DP_SEL_*


[Expand]
LAN78XX data port command LAN78XX_DP_CMD_*


[Expand]
LAN78XX data port address LAN78XX_DP_ADDR_*


[Expand]
LAN78XX data port data LAN78XX_DP_DATA_*


[Expand]
LAN78XX EEPROM command LAN78XX_E2P_CMD_*


[Expand]
LAN78XX EEPROM data LAN78XX_E2P_DATA_*


[Expand]
LAN78XX BOS descriptor attribute LAN78XX_BOS_ATTR_*


[Expand]
LAN78XX SS descriptor attribute LAN78XX_SS_ATTR_*


[Expand]
LAN78XX HS descriptor attribute LAN78XX_HS_ATTR_*


[Expand]
LAN78XX FS descriptor attribute LAN78XX_FS_ATTR_*


[Expand]
LAN78XX string attribute register 0 LAN78XX_STR_ATTR0_*


[Expand]
LAN78XX string attribute register 1 LAN78XX_STR_ATTR1_*


[Expand]
LAN78XX flag attribute LAN78XX_STR_FLAG_*


[Expand]
LAN78XX USB configuration register 0 LAN78XX_USB_CFG0_*


[Expand]
LAN78XX USB configuration register 1 LAN78XX_USB_CFG1_*


[Expand]
LAN78XX USB configuration register 2 LAN78XX_USB_CFG2_*


[Expand]
LAN78XX burst cap LAN78XX_BURST_CAP_*


[Expand]
LAN78XX bulk IN delay LAN78XX_BULK_IN_*


[Expand]
LAN78XX interrupt endpoint control LAN78XX_INT_EP*


[Expand]
LAN78XX pipe control LAN78XX_PIPE_CTL_*


[Expand]
LAN78XX U1 exit latency LAN78XX_U1_LATENCY_*


[Expand]
LAN78XX U2 exit latency LAN78XX_U2_LATENCY_*


[Expand]
LAN78XX USB status LAN78XX_USB_STATUS_*


[Expand]
LAN78XX USB configuration register 3 LAN78XX_USB_CFG3_*


[Expand]
LAN78XX receive filtering engine control LAN78XX_RFE_CTL_*


[Expand]
LAN78XX VLAN type LAN78XX_VLAN_TYPE_*


[Expand]
LAN78XX FIFO controller RX FIFO control LAN78XX_FCT_RX_*


[Expand]
LAN78XX FIFO controller TX FIFO control LAN78XX_FCT_TX_*


[Expand]
LAN78XX FCT RX FIFO end LAN78XX_FCT_RX_FIFO_*


[Expand]
LAN78XX FCT TX FIFO end LAN78XX_FCT_TX_FIFO_*


[Expand]
LAN78XX FCT flow control threshold LAN78XX_FCT_FLOW_*


[Expand]
LAN78XX RX datapath storage LAN78XX_RX_DP_STOR*


[Expand]
LAN78XX TX datapath storage LAN78XX_TX_DP_STOR_*


[Expand]
LAN78XX LTM belt idle register 0 LAN78XX_LTM_BELT_IDLE0_*


[Expand]
LAN78XX LTM belt idle register 1 LAN78XX_LTM_BELT_IDLE1_*


[Expand]
LAN78XX LTM belt active register 0 LAN78XX_LTM_BELT_ACT0_*


[Expand]
LAN78XX LTM belt active register 1 LAN78XX_LTM_BELT_ACT1_*


[Expand]
LAN78XX LTM inactivity timer register 0 LAN78XX_LTM_INACTIVE0_*


[Expand]
LAN78XX LTM inactivity timer register 1 LAN78XX_LTM_INACTIVE1_*


[Expand]
LAN78XX MAC control LAN78XX_MAC_CR_*


[Expand]
LAN78XX MAC receive LAN78XX_MAC_RX_*


[Expand]
LAN78XX MAC transmit LAN78XX_MAC_TX_*


[Expand]
LAN78XX flow control LAN78XX_FLOW_*


[Expand]
LAN78XX random number seed value LAN78XX_RAND_SEED_*


[Expand]
LAN78XX error status LAN78XX_ERR_STS_*


[Expand]
LAN78XX MAC receive address high LAN78XX_RX_ADDRH_*


[Expand]
LAN78XX MAC receive address low LAN78XX_RX_ADDRL_*


[Expand]
LAN78XX MII access LAN78XX_MII_ACC_*


[Expand]
LAN78XX MII data LAN78XX_MII_DATA_*


[Expand]
LAN78XX MAC RGMII ID LAN78XX_MAC_RGMII_ID_*


[Expand]
LAN78XX EEE TX LPI request delay count LAN78XX_EEE_TX_LPI_REQ_*


[Expand]
LAN78XX EEE time wait TX system LAN78XX_EEE_TW_TX_*


[Expand]
LAN78XX EEE TX LPI automatic removal delay LAN78XX_EEE_TX_LPI_REM_*


[Expand]
LAN78XX wakeup control and status LAN78XX_WUCSR_*


[Expand]
LAN78XX wakeup source LAN78XX_WK_SRC_*


[Expand]
LAN78XX wakeup filter X configuration LAN78XX_WUF_CFG0_*


[Expand]
LAN78XX wakeup filter X byte mask LAN78XX_WUF_MASK_*


[Expand]
LAN78XX MAC address perfect filter LAN78XX_MAF_*


[Expand]
LAN78XX wakeup control and status register 2 LAN78XX_WUCSR2_*


[Expand]
LAN78XX NS1 IPV6 destination address LAN78XX_NS1_IPV6_ADDR_DEST_*


[Expand]
LAN78XX NS1 IPV6 source address LAN78XX_NS1_IPV6_ADDR_SRC_*


[Expand]
LAN78XX NS1 ICMPV6 address 0 register LAN78XX_NS1_ICMPV6_ADDR_*


[Expand]
LAN78XX NS1 ICMPV6 address 1 register LAN78XX_NS1_ICMPV6_ADDR1_*


[Expand]
LAN78XX NS2 IPV6 destination address LAN78XX_NS2_IPV6_ADDR_DEST_*


[Expand]
LAN78XX NS2 IPV6 source address LAN78XX_NS2_IPV6_ADDR_SRC_*


[Expand]
LAN78XX NS2 ICMPV6 address 0 register LAN78XX_NS2_ICMPV6_ADDR0_*


[Expand]
LAN78XX NS2 ICMPV6 address 1 register LAN78XX_NS2_ICMPV6_ADDR1_*


[Expand]
LAN78XX SYN IPV4 source address LAN78XX_SYN_IPV4_ADDR_SRC_*


[Expand]
LAN78XX SYN IPV4 destination address LAN78XX_SYN_IPV4_ADDR_DEST_*


[Expand]
LAN78XX SYN IPV4 TCP ports LAN78XX_SYN_IPV4_TCP_PORTS_*


[Expand]
LAN78XX SYN IPV6 source address LAN78XX_SYN_IPV6_ADDR_SRC_*


[Expand]
LAN78XX SYN IPV6 destination address LAN78XX_SYN_IPV6_ADDR_DEST_*


[Expand]
LAN78XX SYN IPV6 TCP ports LAN78XX_SYN_IPV6_TCP_PORTS_*


[Expand]
LAN78XX ARP sender protocol address LAN78XX_ARP_SPA_*


[Expand]
LAN78XX ARP target protocol address LAN78XX_ARP_TPA_*


[Expand]
LAN78XX PHY device identifier LAN78XX_PHY_DEV_ID_*


[Expand]
LAN78XX OTP LAN78XX_OTP_*


[Expand]
LAN78XX/LAN88XX interrupt mask LAN88XX_INT_MASK_*


[Expand]
LAN78XX/LAN88XX interrupt status LAN88XX_INT_STS_*


[Expand]
LAN78XX/LAN88XX extended page LAN88XX_EXT_PAGE_*


[Expand]
LAN78XX/LAN88XX extended mode control LAN88XX_EXT_MODE_CTRL_*


[Expand]
LAN78XX/LAN88XX MMD 3 LAN88XX_MMD3_*


Type definitions



LAN78XX network

[Expand]

PLAN78XXNetwork = ^TLAN78XXNetwork;

TLAN78XXNetwork = record

LAN78XX statistics

[Expand]

PLAN78XXStatistics = ^TLAN78XXStatistics;

TLAN78XXStatistics = record


Public variables


None defined

Function declarations



Initialization functions

[Expand]
procedure LAN78XXInit;
Description: Initialize the LAN78XX unit, create and register the driver


LAN78XX network functions

[Expand]
function LAN78XXNetworkOpen(Network:PNetworkDevice):LongWord;
Description: Implementation of NetworkDeviceOpen for the LAN78XX device


[Expand]
function LAN78XXNetworkClose(Network:PNetworkDevice):LongWord;
Description: Implementation of NetworkDeviceClose for the LAN78XX device


[Expand]
function LAN78XXNetworkControl(Network:PNetworkDevice; Request:Integer; Argument1:PtrUInt; var Argument2:PtrUInt):LongWord;
Description: Implementation of NetworkDeviceControl for the LAN78XX device


[Expand]
function LAN78XXBufferAllocate(Network:PNetworkDevice; var Entry:PNetworkEntry):LongWord;
Description: Implementation of NetworkBufferAllocate for the LAN78XX device


[Expand]
function LAN78XXBufferRelease(Network:PNetworkDevice; Entry:PNetworkEntry):LongWord;
Description: Implementation of NetworkBufferRelease for the LAN78XX device


[Expand]
function LAN78XXBufferReceive(Network:PNetworkDevice; var Entry:PNetworkEntry):LongWord;
Description: Implementation of NetworkBufferReceive for the LAN78XX device


[Expand]
function LAN78XXBufferTransmit(Network:PNetworkDevice; Entry:PNetworkEntry):LongWord;
Description: Implementation of NetworkBufferTransmit for the LAN78XX device


[Expand]
procedure LAN78XXTransmitStart(Network:PLAN78XXNetwork);
Description: Transmit start function for the LAN78XX Network device


LAN78XX USB functions

[Expand]
function LAN78XXDriverBind(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;
Description: Bind the LAN78XX driver to a USB device if it is suitable


[Expand]
function LAN78XXDriverUnbind(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;
Description: Unbind the LAN78XX driver from a USB device


[Expand]
procedure LAN78XXReceiveWorker(Request:PUSBRequest);
Description: Called (by a Worker thread) to process a completed USB request from the LAN78XX bulk IN endpoint


[Expand]
procedure LAN78XXReceiveComplete(Request:PUSBRequest);
Description: Called when a USB request from the LAN78XX bulk IN endpoint completes


[Expand]
procedure LAN78XXTransmitWorker(Request:PUSBRequest);
Description: Called (by a Worker thread) to process a completed USB request to the LAN78XX bulk OUT endpoint


[Expand]
procedure LAN78XXTransmitComplete(Request:PUSBRequest);
Description: Called when a USB request to the LAN78XX bulk OUT endpoint completes


[Expand]
procedure LAN78XXInterruptWorker(Request:PUSBRequest);
Description: Called (by a Worker thread) to process a completed USB request from the LAN78XX interrupt IN endpoint


[Expand]
procedure LAN78XXInterruptComplete(Request:PUSBRequest);
Description: Called when a USB request from the LAN78XX interrupt IN endpoint completes


LAN78XX helper functions

[Expand]
function LAN78XXCheckDevice(Device:PUSBDevice):LongWord;
Description: Check the Vendor and Device ID against the supported devices


[Expand]
function LAN78XXReadRegister(Device:PUSBDevice; Index:LongWord; var Data:LongWord):LongWord;
Description: Read from a register on a LAN78XX USB Ethernet Adapter


[Expand]
function LAN78XXWriteRegister(Device:PUSBDevice; Index,Data:LongWord):LongWord;
Description: Write to a register on a LAN78XX USB Ethernet Adapter


[Expand]
function LAN78XXModifyRegister(Device:PUSBDevice; Index,Mask,Value:LongWord):LongWord;
Description: Modify the value contained in a register on a LAN78XX USB Ethernet Adapter


[Expand]
function LAN78XXSetRegisterBits(Device:PUSBDevice; Index,Value:LongWord):LongWord;
Description: Set bits in a register on a LAN78XX USB Ethernet Adapter


[Expand]
function LAN78XXClearRegisterBits(Device:PUSBDevice; Index,Value:LongWord):LongWord;
Description: Clear bits in a register on a LAN78XX USB Ethernet Adapter


[Expand]
function LAN78XXPHYRead(Device:PUSBDevice; Index:LongWord; var Value:Word):LongWord;
Description: Read a register from the MII Management serial interface on a LAN78XX USB Ethernet Adapter


[Expand]
function LAN78XXPHYWrite(Device:PUSBDevice; Index:LongWord; Value:Word):LongWord;
Description: Write a register to the MII Management serial interface on a LAN78XX USB Ethernet Adapter


[Expand]
function LAN78XXPHYInitialize(Device:PUSBDevice):LongWord;
Description: Initialize default MII Management serial interface options on a LAN78XX USB Ethernet Adapter


[Expand]
function LAN78XXPHYWaitNotBusy(Device:PUSBDevice):LongWord;
Description: Wait for the MII Management serial interface to be not busy on a LAN78XX USB Ethernet Adapter


[Expand]
function LAN78XXReadEEPROM(Device:PUSBDevice; Offset,Length:LongWord; Data:PByte):LongWord;
Description: Read from the EEPROM (if present) on a LAN78XX USB Ethernet Adapter


[Expand]
function LAN78XXReadRawEEPROM(Device:PUSBDevice; Offset,Length:LongWord; Data:PByte):LongWord;
Description: Read from the EEPROM (if present) without signature check on a LAN78XX USB Ethernet Adapter


[Expand]
function LAN78XXReadOTP(Device:PUSBDevice; Offset,Length:LongWord; Data:PByte):LongWord;
Description: Read from the OTP (if present) on a LAN78XX USB Ethernet Adapter


[Expand]
function LAN78XXReadRawOTP(Device:PUSBDevice; Offset,Length:LongWord; Data:PByte):LongWord;
Description: Read from the OTP (if present) without signature check on a LAN78XX USB Ethernet Adapter


[Expand]
function LAN78XXGetStatistics(Device:PUSBDevice; var Statistics:TLAN78XXStatistics):LongWord;
Description: Get the statistics from a LAN78XX USB Ethernet Adapter


[Expand]
function LAN78XXGetMacAddress(Device:PUSBDevice; Address:PHardwareAddress):LongWord;
Description: Get the MAC address of a LAN78XX USB Ethernet Adapter


[Expand]
function LAN78XXSetMacAddress(Device:PUSBDevice; Address:PHardwareAddress):LongWord;
Description: Set the MAC address of a LAN78XX USB Ethernet Adapter


Return to Unit Reference