36839cb9e64ae06888cd17f5de88d2a0.ppt
- Количество слайдов: 18
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 • 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: • usb. Host. Init() • usb. Keyboard. Init() • usb. Mouse. Init() • usb. Hub. Init() • usb. Printer. Init()
USB Host API Memory functions: • usb. Malloc() • usb. Free() Device class driver functions: • usb. Register() • usb. Deregister() • usb. Register. Irq()
USB Host API Enumeration functions: • usb. Clear. End. Point. Feature() • usb. Clear. Port. Feature() • usb. Get. Configuration() • usb. Get. Device. Descriptor() • usb. Get. Hid. Descriptor()
USB Host API • • usb. Get. Hub. Descriptor() usb. Get. Hub. Status() usb. Get. Port. Status() usb. Get. Protocol() usb. Get. Status() usb. Get. String() usb. Set. Configuration()
USB Host API • • usb. Get. Hub. Descriptor() usb. Get. Hub. Status() usb. Get. Port. Status() usb. Get. Protocol() usb. Get. Status() usb. Get. String() usb. Set. Configuration()
USB Host API • • • usb. Set. Feature() usb. Set. Idle() usb. Set. Interface() usb. Set. Port. Feature() usb. Set. Protocol() usb. Set. Report()
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 SL 5 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.
36839cb9e64ae06888cd17f5de88d2a0.ppt