Unit SMSC95XX

From Ultibo.org
Revision as of 06:16, 23 December 2016 by Ultibo (Talk | contribs)

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 constants MSC95XX_DEVICE_ID_*


[Expand]
SMSC95XX transmit/receive constants SMSC95XX_TX_*


[Expand]
SMSC95XX USB packet size constants SMSC95XX_*_USB_PKT_SIZE


[Expand]
SMSC95XX burst size constants SMSC95XX_DEFAULT_*_BURST_CAP_SIZE


[Expand]
SMSC95XX transmit command constants SMSC95XX_TX_COMMAND_*


[Expand]
SMSC95XX receive status constants SMSC95XX_RX_STATUS_*


[Expand]
SMSC95XX ID revision constants SMSC95XX_ID_REVISION_*


[Expand]
SMSC95XX interrupt status constants SMSC95XX_INTERRUPT_STATUS_*


[Expand]
SMSC95XX receive configuration constants SMSC95XX_RX_CONFIG_*


[Expand]
SMSC95XX transmit configuration constants SMSC95XX_TX_CONFIG_*


[Expand]
SMSC95XX hardware configuration constants SMSC95XX_HW_CONFIG_*


[Expand]
SMSC95XX RX FIFO constants SMSC95XX_RX_FIFO_*


[Expand]
SMSC95XX power management control constants SMSC95XX_PM_CONTROL_*


[Expand]
SMSC95XX LED GPIO configuration constants SMSC95XX_LED_GPIO_CONFIG_*


[Expand]
SMSC95XX GPIO configuration constants SMSC95XX_GPIO_CONFIG_*


[Expand]
SMSC95XX advanced flow control configuration constants SMSC95XX_AFC_CONFIG_*


[Expand]
SMSC95XX E2P command constants SMSC95XX_E2P_COMMAND_*


[Expand]
SMSC95XX E2P data constants SMSC95XX_E2P_DATA_*


[Expand]
SMSC95XX burst cap constants SMSC95XX_BURST_CAP_*


[Expand]
SMSC95XX GPIO wake constants SMSC95XX_GPIO_WAKE_*


[Expand]
SMSC95XX interrupt endpoint control constants SMSC95XX_INT_EP_CONTROL_*


[Expand]
SMSC95XX bulk in delay constants SMSC95XX_BULK_IN_DELAY_*


[Expand]
SMSC95XX media access control constants SMSC95XX_MAC_CONTROL_*


[Expand]
SMSC95XX MAC address constants SMSC95XX_MAC_ADDRESS_*


[Expand]
SMSC95XX hash constants SMSC95XX_HASH_*


[Expand]
SMSC95XX MII constants SMSC95XX_MII_*


[Expand]
SMSC95XX flow constants SMSC95XX_FLOW_*


[Expand]
SMSC95XX VLAN constants SMSC95XX_VLAN*


[Expand]
SMSC95XX WUFF constants SMSC95XX_WUFF_*


[Expand]
SMSC95XX WUCSR constants SMSC95XX_WUCSR_*


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


[Expand]
SMSC95XX vendor-specific physical constants SMSC95XX_PHY_EDPD_*


[Expand]
SMSC95XX mode control/status constants SMSC95XX_MODE_CTRL_STS_*


[Expand]
SMSC95XX special control/status constants SMSC95XX_SPECIAL_CTRL_STS_*


[Expand]
SMSC95XX physical interrupt source constants SMSC95XX_PHY_INT_SRC_*


[Expand]
SMSC95XX physical interrupt mask constants SMSC95XX_PHY_INT_MASK_*


[Expand]
SMSC95XX physical special constants SMSC95XX_PHY_SPECIAL_*


[Expand]
SMSC95XX USB vendor request constants SMSC95XX_VENDOR_REQUEST_*


[Expand]
SMSC95XX interrupt endpoint status word constants SMSC95XX_INT_ENP_*


Type definitions


To be documented

Public variables


To be documented

Function declarations



Initialization functions

[Expand]
procedure SMSC95XXInit;
Description: To be documented


SMSC95XX network functions

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


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


[Expand]
function SMSC95XXDeviceRead(Network:PNetworkDevice; Buffer:Pointer; Size:LongWord; var Length:LongWord):LongWord;
Description: Implementation of NetworkDeviceRead for the SMSC95XX device


[Expand]
function SMSC95XXDeviceWrite(Network:PNetworkDevice; Buffer:Pointer; Size:LongWord; var Length:LongWord):LongWord;
Description: Implementation of NetworkDeviceWrite for the SMSC95XX device


[Expand]
function SMSC95XXDeviceControl(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


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 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