Removed all user pipe/endpoint interrupt APIs, added internal library support for interrupt driven control endpoints when in device mode by defining INTERRUPT_CONTROL_ENDPOINT token and passing it to the compiler via the -D switch.

This commit is contained in:
Dean Camera 2009-05-14 10:07:08 +00:00
parent 0d5baf9bb3
commit 32f0f605ef
22 changed files with 48 additions and 342 deletions

View file

@ -174,6 +174,10 @@ ISR(USB_GEN_vect, ISR_BLOCK)
ENDPOINT_DIR_OUT, USB_ControlEndpointSize,
ENDPOINT_BANK_SINGLE);
#if defined(INTERRUPT_CONTROL_ENDPOINT)
USB_INT_Enable(USB_INT_ENDPOINT_SETUP);
#endif
RAISE_EVENT(USB_Reset);
}
#endif
@ -249,3 +253,16 @@ ISR(USB_GEN_vect, ISR_BLOCK)
}
#endif
}
#if defined(INTERRUPT_CONTROL_ENDPOINT)
ISR(USB_COM_vect, ISR_BLOCK)
{
uint8_t PrevSelectedEndpoint = Endpoint_GetCurrentEndpoint();
USB_USBTask();
USB_INT_Clear(USB_INT_ENDPOINT_SETUP);
Endpoint_SelectEndpoint(PrevSelectedEndpoint);
}
#endif