Difference between revisions of "Unit USBCDCETHERNET"

From Ultibo.org
Jump to: navigation, search
Line 337: Line 337:
 
----
 
----
  
''To be documented''
+
 
 +
'''CDC ethernet device and interface id'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PCDCEthernetDeviceId = ^TCDCEthernetDeviceId;</code>
 +
 
 +
<code>TCDCEthernetDeviceId = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>idVendor:Word;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>idProduct:Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>bInterfaceClass:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>bInterfaceSubClass:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>bInterfaceProtocol:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DriverInfo:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''CDC ethernet network'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PCDCEthernetNetwork = ^TCDCEthernetNetwork;</code>
 +
 
 +
<code>TCDCEthernetNetwork = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|''Network Properties''
 +
|-
 +
| <code>Network:TNetworkDevice;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|''Driver Properties''
 +
|-
 +
| <code>HardMTU:LongWord;</code>
 +
| Hard MTU (Maximum Transmission Unit) value for the CDC Ethernet device
 +
|-
 +
| <code>DriverInfo:LongWord;</code>
 +
| Driver Info for the CDC Ethernet device (eg DRIVER_INFO_CDC)
 +
|-
 +
| <code>LinkStatus:LongWord;</code>
 +
| Last reported link status
 +
|-
 +
| <code>HardwareAddress:THardwareAddress;</code>
 +
| Current Ethernet MAC Address
 +
|-
 +
| <code>ReceiveRequestSize:LongWord;</code>
 +
| Size of each USB receive request buffer
 +
|-
 +
| <code>TransmitRequestSize:LongWord;</code>
 +
| Size of each USB transmit request buffer
 +
|-
 +
| <code>ReceiveEntryCount:LongWord;</code>
 +
| Number of entries in the receive queue
 +
|-
 +
| <code>TransmitEntryCount:LongWord;</code>
 +
| Number of entries in the transmit queue
 +
|-
 +
|colspan="2"|''USB Properties''
 +
|-
 +
| <code>DataInterface:PUSBInterface;</code>
 +
| USB interface for data requests
 +
|-
 +
| <code>ControlInterface:PUSBInterface;</code>
 +
| USB interface for control requests
 +
|-
 +
| <code>ReceiveRequest:PUSBRequest;</code>
 +
| USB request Bulk IN Endpoint
 +
|-
 +
| <code>ReceiveEndpoint:PUSBEndpointDescriptor;</code>
 +
| CDC Ethernet Bulk IN Endpoint
 +
|-
 +
| <code>TransmitRequest:PUSBRequest;</code>
 +
| USB request for Bulk OUT Endpoint
 +
|-
 +
| <code>TransmitEndpoint:PUSBEndpointDescriptor;</code>
 +
| CDC Ethernet Bulk OUT Endpoint
 +
|-
 +
| <code>InterruptRequest:PUSBRequest;</code>
 +
| USB request for Interrupt IN Endpoint
 +
|-
 +
| <code>InterruptEndpoint:PUSBEndpointDescriptor;</code>
 +
| CDC Ethernet Interrupt IN Endpoint
 +
|-
 +
| <code>PendingCount:LongWord;</code>
 +
| Number of USB requests pending for this device
 +
|-
 +
| <code>WaiterThread:TThreadId;</code>
 +
| Thread waiting for pending requests to complete (for device detachment)
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
=== Public variables ===
 
=== Public variables ===

Revision as of 06:24, 9 September 2021

Return to Unit Reference


Description


USB CDC Ethernet Driver unit

The Ethernet model is part of the USB Communications Device Class (CDC) standard which allows ethernet based networking devices to be supported by USB with a standardized protocol for data transfer and link status.

A CDC Ethernet device is defined by information in the interface descriptors and is not specific to any product and vendor ID. There are numerous devices that support the CDC Ethernet protocol including a number of external adapters and combination hubs.

This driver presents any device recognized as a CDC Ethernet as a standard network device that can be accessed using the API in the Network, Winsock, Winsock2 and Sockets units. It should not be necessary to directly call any of the functions in this unit from application code.

Note: The QEMU emulations of the Raspberry Pi Zero/A+/2B/3A+/3B use a USB CDC Ethernet device.

Constants



[Expand]
CDC ethernet specific CDCETHERNET_*


[Expand]
Driver info constants DRIVER_INFO_*


[Expand]
Vendor id *_VENDOR_ID


[Expand]
CDC ethernet device and interface id CDCETHERNET_DEVICE_ID_*


Type definitions



CDC ethernet device and interface id

[Expand]

PCDCEthernetDeviceId = ^TCDCEthernetDeviceId;

TCDCEthernetDeviceId = record

CDC ethernet network

[Expand]

PCDCEthernetNetwork = ^TCDCEthernetNetwork;

TCDCEthernetNetwork = record


Public variables


None defined

Function declarations


To be documented


Return to Unit Reference