UFX objects and handles used by a USB function client driver

USB function class extension (UFX) uses the WDF object functionality to define these USB-specific UFX objects.

Summary

  • UFX objects are used by the function controller driver to handle transfers to and from endpoints.
  • These objects are handles to WDF objects and are created by UFX at the request of client driver. Each object's lifetime is managed by UFX.

Important APIs

USB function class extension (UFX) uses the WDF object functionality to define these USB-specific UFX objects.

These objects are handles to WDF objects and are created by UFX at the request of the function client driver. Optionally client driver can associate a context with these objects which can be passed at the time of the creation. Every WDF object created by UFX can potentially have two device contexts: One device context set by UFX at the object creation time; the other device context passed in by client driver and is set in UFX by using WdfObjectAllocateContext after the WDF object is created.

UFXDEVICE: USB device object

Represents the USB device created by the controller. The object is responsible for managing USB states according to the USB protocol specification and managing one or more endpoints associated with the USB device. The function controller driver creates this object within the EvtDriverDeviceAdd callback by calling the UfxDeviceCreate method.

EVT_UFX_DEVICE_HOST_CONNECT
Initiates connection with the host.

EVT_UFX_DEVICE_HOST_DISCONNECT
Disables the function controller's communication with the host.

EVT_UFX_DEVICE_ADDRESSED
Assigns an address on the function controller.

EVT_UFX_DEVICE_ENDPOINT_ADD
Creates a default endpoint object.

EVT_UFX_DEVICE_DEFAULT_ENDPOINT_ADD
Creates a default endpoint object.

EVT_UFX_DEVICE_USB_STATE_CHANGE
Update the state of the USB device.

EVT_UFX_DEVICE_PORT_CHANGE
Update the type of the new port to which the USB device is connected.

EVT_UFX_DEVICE_PORT_DETECT
Initiate port detection.

EVT_UFX_DEVICE_REMOTE_WAKEUP_SIGNAL
initiate remote wake-up on the function controller.

EVT_UFX_DEVICE_DETECT_PROPRIETARY_CHARGER
Initiates proprietary charger detection.

EVT_UFX_DEVICE_PROPRIETARY_CHARGER_RESET
Resets the proprietary charger.

EVT_UFX_DEVICE_PROPRIETARY_CHARGER_SET_PROPERTY
Sets charger information that it uses to enable charging over USB.

UFXENDPOINT: USB endpoint object

Represents a logical connection between the host and the device. The object is responsible for transfer of data to/from the host. For every device object there can be one or more endpoints. The default endpoint is always the control endpoint and rest are class driver specific objects. The function controller driver creates the object in the EVT_UFX_DEVICE_ENDPOINT_ADD callback by calling the UfxEndpointCreate method.