Summary

  • For certain types of devices, including USB devices, the I/O Kit makes it possible to forgo a kernel driver and implement the driver completely in user space. For the end user, this provides a much better experience.
  • Not all USB devices are suitable for a user-space driver. A device that needs to be used by the system itself, such as a system-wide audio device or a USB storage device, must be implemented in the kernel.
  • The I/O Kit provides a user-space library known as IOUSBLib that an application uses to interact with a USB device. The IOUSBLib provides a user- space equivalent to the IOUSBDevice and IOUSBInterface kernel classes, known as IOUSBDeviceInterface and IOUSBInterfaceInterface, respectively.
  • An application can watch for the arrival and removal of the USB devices it supports by creating a matching dictionary and installing a notification callback, as described in Chapter 5. Once an application has been notified that a USB device or a USB interface it is interested in has been attached to the computer, it can instantiate an IOUSBDeviceInterface or IOUSBInterfaceInterface object to provide access to the USB hardware.
  • The IOUSBLib provides full support for the functionality of a USB device to a user-space driver. All endpoint types are supported in user space, including control, bulk, interrupt, and isochronous transfers.
  • An application can perform either synchronous or asynchronous operations with IOUSBLib. A callback is used to notify the application of the completion of an asynchronous request.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.240.249