ChipCenter Questlink
SEARCH CHIPCENTER
Search Type:
Search for:




Knowledge Centers
Product Reviews
Data Sheets
Guides & Experts
News
International
Ask Us
Circuit Cellar Online
App Notes
NetSeminars
Careers
Resources
FAQ
EE Times Network
Electronics Group Sites

IMPLEMENTING A SIMPLE USB INTERFACE FOR AN EMBEDDED PROCESSOR


Circuit Cellar Online
THE MAGAZINE FOR COMPUTER APPLICATIONS
Circuit Cellar Online offers articles illustrating creative solutions
and unique applications through complete projects, practical
tutorials, and useful design techniques.

IMPLEMENTING A SIMPLE USB INTERFACE

Lessons from the Trenches FOR AN EMBEDDED PROCESSOR

by Stuart Allman

Start ý Typical USB Solutions ý Required Components ý An Easier Solution ý Following the Rules ý Firmware ý Vendor-Specific Requests ý Host Transfer Mechanisms ý USB Transfers ý How Does It Work? ý The Grand Conclusion ý Sources and PDF

HOST TRANSFER MECHANISMS

Now that Iýve caught your attention and you are thoroughly salivating with creative thoughts, itýs time to think about how you are going to communicate with the host computer. Unless your platform already has a device class supported for your device, you will need to write a custom host application for your new, fabulous gizmo.

The EZ-USB driver used in this example uses the older file name mechanism for opening the driver. Newer drivers that conform to the WDM standard will use a globally unique ID (GUID) to access the driver. In order to open the USB device driver for reading and writing, the host application makes a call to bOpenDriver() with the file name specifying the device it wants to open. The system then returns a handle to the device (bOpenDriver( &hDevice, "Ezusb-0");.).

The identifier "Ezusb-0" is the first USB peripheral plugged in that uses the EZ-USB driver. If you plug in additional devices, the driver identifier will be "Ezusb-1", "Ezusb-2", and so forth for each additional device attached. If you need to randomly plug in your devices (as is practical), you need to poll the device on a WM_DEVICECHANGE message for a unique product ID or serial number.

PREVIOUSNEXT


Circuit Cellar provides up-to-date information for engineers. Visit www.circuitcellar.com for more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com or subscribe online. ýCircuit Cellar, the Magazine for Computer Applications. Posted with permission.
Click here to get your listing up.

Copyright © 2003 ChipCenter-QuestLink
About ChipCenter-Questlink  Contact Us  Privacy Statement   Advertising Information  FAQ