180 likes | 400 Views
NET+OS 6.1 Training. USB HOST. USB HOST. USB Host Hardware USB Host Stack USB Host API USB Device Class Drivers Recommended readings. USB Host Hardware. Supports USB 1.1 and OHCI 1.0 specifications. USB Host Stack.
E N D
USB HOST • USB Host Hardware • USB Host Stack • USB Host API • USB Device Class Drivers • Recommended readings
USB Host Hardware • Supports USB 1.1 and OHCI 1.0 specifications
USB Host Stack • Sourced from a Minolta and based on the Linux USB Host stack design. • Supports bulk transfers, control transfers and interrupt transfers. • Isochronous transfers are not supported in the NET+OS 6.1 release. • ISR driven event notification design using semaphores.
USB Host Stack • USB stack has an internal thread which processes root hub status change events as notified by the ISR • Root hub status changes force the internal thread to enumerate or de-enumerate devices.
USB Host API Initialization functions: • usbHostInit() • usbKeyboardInit() • usbMouseInit() • usbHubInit() • usbPrinterInit()
USB Host API Memory functions: • usbMalloc() • usbFree() Device class driver functions: • usbRegister() • usbDeregister() • usbRegisterIrq()
USB Host API Enumeration functions: • usbClearEndPointFeature() • usbClearFeature() • usbClearPortFeature() • usbGetConfiguration() • usbGetDeviceDescriptor() • usbGetHidDescriptor()
USB Host API • usbGetHubDescriptor() • usbGetHubStatus() • usbGetPortStatus() • usbGetProtocol() • usbGetStatus() • usbGetString() • usbSetConfiguration()
USB Host API • usbGetHubDescriptor() • usbGetHubStatus() • usbGetPortStatus() • usbGetProtocol() • usbGetStatus() • usbGetString() • usbSetConfiguration()
USB Host API • usbSetFeature() • usbSetIdle() • usbSetInterface() • usbSetPortFeature() • usbSetProtocol() • usbSetReport()
USB Device Class Drivers Devices supported for this release: • Hub • Keyboard • Mouse • Printer
USB Device Class Drivers Hub Driver: • Uses an interrupt endpoint to communicate with the hub device • ISR driven event notification design through semaphore • Internal thread processes hub port status changes and enumerates (or de-enumerates) as needed
USB Device Class Drivers Keyboard Driver: • Uses an interrupt endpoint to communicate with the keyboard device • ISR driven event notification • Directs keystrokes to the console through the standard I/O (i.e. serial port)
USB Device Class Drivers Mouse Driver: • Uses an interrupt endpoint to communicate with the mouse device • ISR driven event notification • Directs mouse position coordinates to the console through the standard I/O (i.e. serial port)
USB Device Class Drivers Printer Driver: • Uses one bulk out endpoint to communicate with the printer device. • Tested with the Hitachi SL5 printer • Will work with printer devices that allow directly downloading the actual print image without any protocols.
Recommended Readings • USB 1.1 Specification • OHCI 1.0 Specification • USB Human Interface Devices (HID) specification • USB related books that explain USB in less abstract terms.