Add in USB_INT_RegisterHandlers() internal function to register the interrupt handler routines used by LUFA. Add dummy loads after clearing the interrupt lines according to the datasheet.

Add in temporary global interrupts enable/disable macros.
This commit is contained in:
Dean Camera 2011-02-28 22:30:40 +00:00
parent 86a2be8536
commit 8c6f26e19d
6 changed files with 46 additions and 30 deletions

View file

@ -59,6 +59,8 @@ void USB_Init(
#if !defined(USE_STATIC_OPTIONS)
USB_Options = Options;
#endif
USB_INT_RegisterHandlers();
if (!(USB_Options & USB_OPT_REG_DISABLED))
USB_REG_On();

View file

@ -84,6 +84,11 @@
};
/* Inline Functions: */
static inline void USB_INT_RegisterHandlers(void)
{
// Not required for AVR8
}
static inline void USB_INT_Enable(const uint8_t Interrupt) ATTR_ALWAYS_INLINE;
static inline void USB_INT_Enable(const uint8_t Interrupt)
{