Difference between revisions of "Unit USB"

From Ultibo.org
Jump to: navigation, search
(Created page with "Return to Unit Reference === Description === ---- ''To be documented'' === Constants === ---- ''To be documented'' === Type definitions === ---- ''To...")
 
Line 5: Line 5:
 
----
 
----
  
''To be documented''
+
This unit implements the USB core software that does not depend on the specific host controller hardware and is not specific to any single USB device or platform.
 +
 
 +
Features and limitations:
 +
 
 +
* This driver is written to be compatible with USB 2.0.  USB 3.0 devices work correctly when operating in USB 2.0 compatible mode, actual support for USB 3.0 host controllers and native super speed modes will require some modification to this driver.
 +
 +
* Not all USB transfer types and speeds are supported yet.  This depends on the Host Controller Driver, see USBRequestSubmit.
 +
 
 +
* This driver does not attempt to do any intelligent power management, bandwidth allocation, or transfer scheduling.  Devices are always set to their first listed configuration regardless of power requirements. Requests are simply passed to the Host Controller Driver in the order submitted, the Host Controller Driver is responsible for doing any more intelligent scheduling if desired.
 +
 
 +
* This driver does not support multiple configurations per USB device. If a device happens to have multiple configurations, the first one will be assigned (see devices below for more information).
 +
 
 +
* By design, it is possible to implement a host controller driver for different host controller hardware without changing any of this code, as long as the host controller driver provides the functions declared in TUSBHost (Start, Stop, Reset, Submit and Cancel).
 +
 
 +
* By design, this driver has a hard-coded dependency on the USB hub driver because USB is useless without hubs.
 +
 
 +
To initialize this core USB driver, USBInit must be called by the system startup code. See that function for details.
 +
 
 +
If the flag USB_AUTOSTART is not set then USBStart must be called to start the USB core. See that function for details.
 +
 
 +
The other functions exported by this core USB driver are mostly intended to be used by USB device drivers.
 +
 
 +
Debugging messages in this driver can be enabled by changing the value of USB_DEFAULT_LOG_LEVEL and by enabling the USB_DEBUG define in GlobalDefines.
 +
 
 +
Be careful when enabling USB debugging as the USB core can generate a lot of messages due to constant polling of interrupt endpoints on devices such as hubs, keyboards and mice.
  
 
=== Constants ===
 
=== Constants ===

Revision as of 05:30, 15 September 2016

Return to Unit Reference


Description


This unit implements the USB core software that does not depend on the specific host controller hardware and is not specific to any single USB device or platform.

Features and limitations:

  • This driver is written to be compatible with USB 2.0. USB 3.0 devices work correctly when operating in USB 2.0 compatible mode, actual support for USB 3.0 host controllers and native super speed modes will require some modification to this driver.
  • Not all USB transfer types and speeds are supported yet. This depends on the Host Controller Driver, see USBRequestSubmit.
  • This driver does not attempt to do any intelligent power management, bandwidth allocation, or transfer scheduling. Devices are always set to their first listed configuration regardless of power requirements. Requests are simply passed to the Host Controller Driver in the order submitted, the Host Controller Driver is responsible for doing any more intelligent scheduling if desired.
  • This driver does not support multiple configurations per USB device. If a device happens to have multiple configurations, the first one will be assigned (see devices below for more information).
  • By design, it is possible to implement a host controller driver for different host controller hardware without changing any of this code, as long as the host controller driver provides the functions declared in TUSBHost (Start, Stop, Reset, Submit and Cancel).
  • By design, this driver has a hard-coded dependency on the USB hub driver because USB is useless without hubs.

To initialize this core USB driver, USBInit must be called by the system startup code. See that function for details.

If the flag USB_AUTOSTART is not set then USBStart must be called to start the USB core. See that function for details.

The other functions exported by this core USB driver are mostly intended to be used by USB device drivers.

Debugging messages in this driver can be enabled by changing the value of USB_DEFAULT_LOG_LEVEL and by enabling the USB_DEBUG define in GlobalDefines.

Be careful when enabling USB debugging as the USB core can generate a lot of messages due to constant polling of interrupt endpoints on devices such as hubs, keyboards and mice.

Constants


To be documented

Type definitions


To be documented

Public variables


To be documented

Function declarations


To be documented


Return to Unit Reference