Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sending Multi-byte commands to Device using I/O Kit?



At 10:11 AM -0800 1/18/05, mohamed rafi wrote:

Hence, does that mean I can only send single byte
commands as requests. How do I send multi-byte
commands or what is the alternate for this ?

Control requests on USB have a defined structure, this is defined in chapter 9 of the USB spec. I thought you had already found this. Mac USB can send any legal request that USB defines.


USB defines 1 byte for bRequest, that is not the only information that can be sent with the command. The command also includes wIndex, wValue and a buffer of upto 64k of data. I hope you will find this enough for your needs.

The request has to be defined so that all bRequests fit into one byte though. Also the base standard defines requests from 0-0x1F. Class specs define bRequests 0x20-0x3F, vendors requests use bRequests from 0x40 on.

Are you defining a device's functionality, or are you writing a driver? If you are not defining a device's functionality you should be looking to what the device want's you to do. The device defines what commands it uses.
--
Barry Twycross
email@hidden
---
USB, it's not a Dyslexic BUS. (Thanks to TC.)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden


This email sent to email@hidden
References: 
 >Sending Multi-byte commands to Device using I/O Kit? (From: mohamed rafi <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.