How would I go about sending multiple bytes PC->AVR using the custom-class example? I guess the data should probably be in usbMsgPtr, but I don't know how I can find out the length of the buffer?
And what is the purpose of the wValue and wIndex if you use a buffer also? Can I just use those for my data as well (I need more than 4 bytes though)?
This is the code from custom-class that probably has to be changed:
Code: Select all
}else if(rq->bRequest == CUSTOM_RQ_SET_STATUS){
if(rq->wValue.bytes[0] & 1){ /* set LED */
LED_PORT_OUTPUT |= _BV(LED_BIT);
}else{ /* clear LED */
LED_PORT_OUTPUT &= ~_BV(LED_BIT);
}
}
Thanks