Unit SMSC95XX

From Ultibo.org
Jump to: navigation, search

Return to Unit Reference


Description


SMSC LAN95xx USB Ethernet Driver unit

The SMSC LAN95xx has an integrated USB Hub and is technically a compound device. Here we instead use the vendor Id and product Id of the vendor specific class device attached to the hub that is the device we actually need to communicate with. The hub will be detected and bound by the default USB Hub driver when it is enumerated by the USB core.

Constants



[Expand]
SMSC95XX specific constants SMSC95XX_*


[Expand]
SMSC95XX device Id MSC95XX_DEVICE_ID_*


[Expand]
SMSC95XX transmit and receive SMSC95XX_TX_*


[Expand]
SMSC95XX USB packet size SMSC95XX_*_USB_PKT_SIZE


[Expand]
SMSC95XX burst size SMSC95XX_DEFAULT_*_BURST_CAP_SIZE


[Expand]
SMSC95XX transmit command SMSC95XX_TX_COMMAND_*


[Expand]
SMSC95XX receive status SMSC95XX_RX_STATUS_*


[Expand]
SMSC95XX Id revision SMSC95XX_ID_REVISION_*


[Expand]
SMSC95XX interrupt status SMSC95XX_INTERRUPT_STATUS_*


[Expand]
SMSC95XX receive configuration SMSC95XX_RX_CONFIG_*


[Expand]
SMSC95XX transmit configuration SMSC95XX_TX_CONFIG_*


[Expand]
SMSC95XX hardware configuration SMSC95XX_HW_CONFIG_*


[Expand]
SMSC95XX RX FIFO SMSC95XX_RX_FIFO_*


[Expand]
SMSC95XX power management control SMSC95XX_PM_CONTROL_*


[Expand]
SMSC95XX LED GPIO configuration SMSC95XX_LED_GPIO_CONFIG_*


[Expand]
SMSC95XX GPIO configuration SMSC95XX_GPIO_CONFIG_*


[Expand]
SMSC95XX advanced flow control configuration SMSC95XX_AFC_CONFIG_*


[Expand]
SMSC95XX EEPROM command SMSC95XX_E2P_COMMAND_*


[Expand]
SMSC95XX EEPROM data SMSC95XX_E2P_DATA_*


[Expand]
SMSC95XX burst cap SMSC95XX_BURST_CAP_*


[Expand]
SMSC95XX GPIO wake SMSC95XX_GPIO_WAKE_*


[Expand]
SMSC95XX interrupt endpoint control SMSC95XX_INT_EP_CONTROL_*


[Expand]
SMSC95XX bulk in delay SMSC95XX_BULK_IN_DELAY_*


[Expand]
SMSC95XX media access control SMSC95XX_MAC_CONTROL_*


[Expand]
SMSC95XX MAC address SMSC95XX_MAC_ADDRESS_*


[Expand]
SMSC95XX hash SMSC95XX_HASH_*


[Expand]
SMSC95XX MII data SMSC95XX_MII_*


[Expand]
SMSC95XX flow SMSC95XX_FLOW_*


[Expand]
SMSC95XX VLAN SMSC95XX_VLAN*


[Expand]
SMSC95XX WUFF SMSC95XX_WUFF_*


[Expand]
SMSC95XX wakeup control and status SMSC95XX_WUCSR_*


[Expand]
SMSC95XX checksum offload engine/enable control SMSC95XX_COE_*


[Expand]
SMSC95XX vendor-specific physical SMSC95XX_PHY_EDPD_*


[Expand]
SMSC95XX mode control and status SMSC95XX_MODE_CTRL_STS_*


[Expand]
SMSC95XX special control and status SMSC95XX_SPECIAL_CTRL_STS_*


[Expand]
SMSC95XX physical interrupt source SMSC95XX_PHY_INT_SRC_*


[Expand]
SMSC95XX physical interrupt mask SMSC95XX_PHY_INT_MASK_*


[Expand]
SMSC95XX physical special SMSC95XX_PHY_SPECIAL_*


[Expand]
SMSC95XX USB vendor request SMSC95XX_VENDOR_REQUEST_*


[Expand]
SMSC95XX interrupt endpoint status word SMSC95XX_INT_ENP_*


Type definitions



SMSC95XX network

[Expand]

PSMSC95XXNetwork = ^TSMSC95XXNetwork;

TSMSC95XXNetwork = record


Public variables


None defined

Function declarations



Initialization functions

[Expand]
procedure SMSC95XXInit;
Description: Initialize the SMSC95XX unit, create and register the driver


SMSC95XX network functions

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


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


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


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


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


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


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


[Expand]
procedure SMSC95XXTransmitStart(Network:PSMSC95XXNetwork);
Description: Transmit start function for the SMSC95XX Network device


SMSC95XX USB functions

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


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


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


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


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


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


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


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


SMSC95XX helper functions

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


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


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


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


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


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


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


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


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


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


[Expand]
function SMSC95XXWaitEEPROM(Device:PUSBDevice):LongWord;
Description: Wait for the EEPROM (if present) to be not busy on a SMSC95XX USB Ethernet Adapter


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


[Expand]
function SMSC95XXWriteEEPROM(Device:PUSBDevice; Offset,Length:LongWord; Data:PByte):LongWord;
Description: Write to the EEPROM (if present) on a SMSC95XX USB Ethernet Adapter


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


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


Return to Unit Reference