Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Reading Report From Custom USB Device
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reading Report From Custom USB Device



Hi,

Stuart, you have been totaly reasonable with your answer. I'll try to be the more specific possible.

I've been reading about HID devices in a nice book called USB complete.

My device has a IN interrupt endpoint with a 8 byte max packet size.

I changed the ReaderReportCallback to this:

static void ReaderReportCallback(void *target, IOReturn result,void *refcon, void *sender, UInt32 size) {
struct reader *r = target;
r->gotdata = 1;
int i=0;
puts("Chunk start");
while(i++!=BUFSIZE) {
printf("Data: x\n",r->buffer[i]);
}
}


I put the firmware sending to send 8 bytes filled with the value 0.

My output is this:
Chunk start
Data: 0000
Data: 0000
Data: 0000
Data: 0000
Data: 0000
Data: 0000
Data: 0000
Data: 00d3

I was expecting that to be all zeros. If i increase the buffer it will bring some more diferent of 0 values.

My questions are:

- When the report is read, is it only related with the endpoint described above or it gets something more?

Thx,

Nuno

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden




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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.