
Wind River USB
for VxWorks 6
PROGRAMMER’S GUIDE
®
2.3
®
Wind River USB for VxWorks 6 Programmer's Guide

Copyright © 2006 Wind River Systems, Inc.
All rights reserved. No part of this publication may be reproduced or transmitted in any
form or by any means without the prior written permission of Wind River Systems, Inc.
Wind River, the Wind River logo, Tornado, and VxWorks are registered trademarks of
Wind River Systems, Inc. Any third-party trademarks referenced are the property of their
respective owners. For further information regarding Wind River trademarks, please see:
http://www.windriver.com/company/terms/trademark.html
This product may include software licensed to Wind River by third parties. Relevant
notices (if any) are provided in your product installation at the following location:
installDir/product_name/3rd_party_licensor_notice.pdf.
Wind River may refer to third-party documentation by listing publications or providing
links to third-party Web sites for informational purposes. Wind River accepts no
responsibility for the information provided in such third-party documentation.
Corporate Headquarters
Wind River Systems, Inc.
500 Wind River Way
Alameda, CA 94501-1153
U.S.A.
toll free (
U.S.): (800) 545-WIND
telephone: (510) 748-4100
facsimile: (510) 749-2010
For additional contact information, please visit the Wind River URL:
http://www.windriver.com
For information on how to contact Customer Support, please visit the following URL:
http://www.windriver.com/support
Wind River USB for VxWorks 6 Programmer’s Guide, 2.3
5 May 06
Part #: DOC-15786-ZD-00

iii
Contents
1 Overview ............................................................................................... 1
1.1 Introduction ............................................................................................................. 1
1.1.1 Technology Overview .............................................................................. 2
1.1.2 USB Host Stack Component Overview ................................................. 2
Host Controller Drivers ........................................................................... 2
USBD and Class Drivers ......................................................................... 3
1.1.3 USB Peripheral Stack Components Overview ..................................... 4
1.1.4 Architecture and BSP Support ................................................................ 6
1.1.5 Additional Documentation ..................................................................... 6
1.2 Configuration .......................................................................................................... 8
1.3 Latest Release Information ................................................................................... 8
2 Configuring VxWorks Components .................................................... 9
2.1 Introduction ............................................................................................................. 9
2.2 Configuring USB Host Stack Using Wind River Workbench ....................... 10
2.2.1 Including USB Host Stack Components ............................................... 11

Wind River USB for VxWorks 6
Programmer’s Guide, 2.3
iv
2.2.2 Setting USB Host Stack Configuration Parameters ............................. 13
Configuring Keyboard Parameters ........................................................ 13
Configuring Bulk Mass Storage Device Names ................................... 13
Configuring CBI Mass Storage Device Names .................................... 14
Configuring Pegasus Network Device Parameters ............................. 14
2.2.3 Component Dependencies ...................................................................... 15
2.3 Configuring USB Peripheral Stack Using Wind River Workbench ............. 15
2.3.1 Including USB Peripheral Stack Components ..................................... 15
2.4 Configuring USB Stack Using the Command Line ......................................... 16
2.4.1 Configuring VxWorks for USB ............................................................... 17
Adding Host Stack Components ........................................................... 17
Adding Peripheral Stack Components ................................................. 19
Adding the USB Tool Code Exerciser Component .............................. 21
2.4.2 Managing Dependencies ........................................................................ 21
File System Components ........................................................................ 21
Networking Components ...................................................................... 22
Select Support on USB Keyboard and Mouse Class Drivers ............. 22
Speaker Demo ........................................................................................... 23
2.5 Initializing the USB Host Stack Hardware ....................................................... 23
Startup Routines ....................................................................................... 23
Initialization Dependencies .................................................................... 25
Keyboard, Mouse, Printer, and Speaker Initialization ........................ 25
Mass Storage Class Device Initialization .............................................. 25
SCSI-6 Commands .................................................................................... 26
Communication Class Device Initialization ......................................... 27
USB Audio Demo Initialization ............................................................. 27
2.6 Initializing the USB Peripheral Stack Hardware ............................................. 28
3 USB Host Drivers ................................................................................. 31
3.1 Introduction ............................................................................................................. 31

Contents
v
3.2 Architecture Overview ......................................................................................... 31
Host Controller Drivers and USBD ....................................................... 33
Class Drivers ............................................................................................. 34
Host Module Roadmap ........................................................................... 34
3.3 The USB Host Driver (USBD) .............................................................................. 36
3.3.1 USBD 2.0 .................................................................................................... 36
Initializing the USBD ............................................................................... 37
Order of Initialization .............................................................................. 37
Bus Tasks ................................................................................................... 38
Registering Client Modules .................................................................... 38
Standard Request Interfaces ................................................................... 41
Data Transfer Interfaces ........................................................................... 42
3.3.2 USBD 1.1 Compatibility .......................................................................... 45
Initializing the USBD ............................................................................... 45
Order of Initialization .............................................................................. 46
Registering Client Modules .................................................................... 47
Client Callback Tasks ............................................................................... 48
Dynamic Attachment Registration ........................................................ 49
Device Configuration ............................................................................... 52
Pipe Creation and Deletion ..................................................................... 55
Data Flow .................................................................................................. 56
3.4 Host Controller Drivers ......................................................................................... 59
3.4.1 Registering the Host Controller Driver ................................................. 59
3.4.2 USBHST_HC_DRIVER Structure ........................................................... 59
3.4.3 Host Controller Driver Interfaces .......................................................... 61
USBHST_HC_DRIVER Structure ........................................................... 61
USBHST_USBD_TO_HCD_FUNCTION_LIST Structure .................. 62
3.4.4 Registering a Bus for the Host Controller ............................................. 63
3.4.5 De-registering the Bus for the Host Controller .................................... 64
3.4.6 De-registering the Host Controller Driver ........................................... 64
3.4.7 HCD Error Reporting Conventions ....................................................... 65
3.4.8 Root Hub Emulation ................................................................................ 65