I added USBRQ_HID_SET_REPOR to my function set up.
Code: Select all
unsigned usbFunctionSetup(uchar data[8])
{
usbRequest_t *rq = (void *)data;
if((rq->bmRequestType & USBRQ_TYPE_MASK) == USBRQ_TYPE_CLASS){ /* class request type */
if(rq->bRequest == USBRQ_HID_GET_REPORT){ /* wValue: ReportType (highbyte), ReportID (lowbyte) */
/* we only have one report type, so don't look at wValue */
return 8;
}
}
else if(rq->bRequest == USBRQ_HID_SET_REPORT){
if (rq->wLength.word == 1) { /* We expect one byte reports */
expectReport=1;
return 0xFF; /* Call usbFunctionWrite with data */
}
}
else
{
/* no vendor specific requests implemented */
}
return 0;
}
and I added a
Code: Select all
uchar usbFunctionWrite(uchar *data, uchar len)
{
blinkLed(1);
}
but I'm never hitting the blink.