(Writing this a second time - Thunderbird crashed while sending
it before, and I couldn't recover the draft...)
Yes, that's the general idea. You need to select each of the endpoints you want to enable interrupts for, and set the appropriate enable bits in the EPIENX register. To handle the interrupts, define the handler in your application code similar to the following:
uint8_t PrevSelectedEndpoint = Endpoint_GetCurrentEndpoint();
// Handle endpoints here
In the handler, you would check UEINT to see if your endpoint was the one that caused the interrupt. If it was, select it, acknowledge the interrupt and perform whatever handler code you need to process the endpoint data or schedule more data to be sent back to the host. The LUFA core task handler function is fairly forgiving in how often you call it, as it's ultimately just checking for and responding to any host requests, which typically have long timeouts specified in the USB specs. As long as you switch back to the previously selected endpoint at the end of the handler, it shouldn't upset any of the existing code. Note that this is incompatible with the USE_INTERRUPT_CONTROL_ENDPOINT compile time option, and don't enable your own interrupts on endpoints managed by a LUFA class driver.
You received this message because you are subscribed to the Google Groups "LUFA Library Support List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lufa-support...@googlegroups.com.
To post to this group, send email to lufa-s...@googlegroups.com.
Visit this group at https://groups.google.com/group/lufa-support.
For more options, visit https://groups.google.com/d/optout.