Page 1 of 1

hid-data comunication problem

Posted: Sat Sep 10, 2016 4:35 pm
by 24c1024
hi

i use hid-data example with 2 reportid .

how can i get data from pc in avr ?

in usbFunctionSetup

rq->wIndex.bytes[1];

is return report id ?

how can i get hid buffer data ?

thanks

Re: hid-data comunication problem

Posted: Mon Oct 22, 2018 4:06 pm
by mostafayasin
I think the first byte it contain the report ID .

Re: hid-data comunication problem

Posted: Wed Oct 24, 2018 4:06 pm
by ulao
yeah,

usbRequest_t *rq = (void *)data;
char rID = rq->wValue.bytes[0];//report ID;

then you can do

if(rq->bRequest == USBRQ_HID_GET_REPORT)//features reports.
and
if (rID == 1)

wait.. This is a 2 year old post? LOL Don't bump those man... ;)

Re: hid-data comunication problem

Posted: Tue Dec 04, 2018 6:43 pm
by ulao
First byte is report ID if there are report IDs in the report. In the case you do not use Report ID's, the first byte is first data.