Changed over the AVR8 USB controller interrupt management macros to be inlined functions instead, for better compile-time validity checking and to keep the per-architecture source files as uniform as possible.

pull/1469/head
Dean Camera 14 years ago
parent 92b3553a07
commit 04526d284d

@ -197,7 +197,7 @@ static void USB_Init_Device(void)
else else
USB_Device_SetFullSpeed(); USB_Device_SetFullSpeed();
USB_INT_Enable(USB_INT_VBUS); USB_INT_Enable(USB_INT_VBUSTI);
#endif #endif
Endpoint_ConfigureEndpoint(ENDPOINT_CONTROLEP, EP_TYPE_CONTROL, Endpoint_ConfigureEndpoint(ENDPOINT_CONTROLEP, EP_TYPE_CONTROL,

@ -84,9 +84,9 @@ ISR(USB_GEN_vect, ISR_BLOCK)
#endif #endif
#if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR) #if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)
if (USB_INT_HasOccurred(USB_INT_VBUS) && USB_INT_IsEnabled(USB_INT_VBUS)) if (USB_INT_HasOccurred(USB_INT_VBUSTI) && USB_INT_IsEnabled(USB_INT_VBUSTI))
{ {
USB_INT_Clear(USB_INT_VBUS); USB_INT_Clear(USB_INT_VBUSTI);
if (USB_VBUS_GetStatus()) if (USB_VBUS_GetStatus())
{ {

@ -56,32 +56,252 @@
/* Private Interface - For use in library only: */ /* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__) #if !defined(__DOXYGEN__)
/* Macros: */ /* Enums: */
#define USB_INT_Enable(int) MACROS{ USB_INT_GET_EN_REG(int) |= USB_INT_GET_EN_MASK(int); }MACROE enum USB_Interrupts_t
#define USB_INT_Disable(int) MACROS{ USB_INT_GET_EN_REG(int) &= ~(USB_INT_GET_EN_MASK(int)); }MACROE {
#define USB_INT_Clear(int) MACROS{ USB_INT_GET_INT_REG(int) &= ~(USB_INT_GET_INT_MASK(int)); }MACROE USB_INT_VBUSTI = 0,
#define USB_INT_IsEnabled(int) ((USB_INT_GET_EN_REG(int) & USB_INT_GET_EN_MASK(int)) ? true : false) USB_INT_IDTI = 1,
#define USB_INT_HasOccurred(int) ((USB_INT_GET_INT_REG(int) & USB_INT_GET_INT_MASK(int)) ? true : false) USB_INT_WAKEUPI = 2,
USB_INT_SUSPI = 3,
#define USB_INT_GET_EN_REG(EnableReg, EnableMask, FlagReg, FlagMask) EnableReg USB_INT_EORSTI = 4,
#define USB_INT_GET_EN_MASK(EnableReg, EnableMask, FlagReg, FlagMask) EnableMask USB_INT_SOFI = 5,
#define USB_INT_GET_INT_REG(EnableReg, EnableMask, FlagReg, FlagMask) FlagReg USB_INT_HSOFI = 6,
#define USB_INT_GET_INT_MASK(EnableReg, EnableMask, FlagReg, FlagMask) FlagMask USB_INT_DCONNI = 7,
USB_INT_DDISCI = 8,
#define USB_INT_VBUS USBCON, (1 << VBUSTE) , USBINT, (1 << VBUSTI) USB_INT_RSTI = 9,
#define USB_INT_IDTI USBCON, (1 << IDTE) , USBINT, (1 << IDTI) USB_INT_BCERRI = 10,
#define USB_INT_WAKEUPI UDIEN , (1 << WAKEUPE), UDINT , (1 << WAKEUPI) USB_INT_VBERRI = 11,
#define USB_INT_SUSPI UDIEN , (1 << SUSPE) , UDINT , (1 << SUSPI) USB_INT_SRPI = 12,
#define USB_INT_EORSTI UDIEN , (1 << EORSTE) , UDINT , (1 << EORSTI) USB_INT_RXSTPI = 13,
#define USB_INT_DCONNI UHIEN , (1 << DCONNE) , UHINT , (1 << DCONNI) };
#define USB_INT_DDISCI UHIEN , (1 << DDISCE) , UHINT , (1 << DDISCI)
#define USB_INT_BCERRI OTGIEN, (1 << BCERRE) , OTGINT, (1 << BCERRI) /* Inline Functions: */
#define USB_INT_VBERRI OTGIEN, (1 << VBERRE) , OTGINT, (1 << VBERRI) static inline void USB_INT_Enable(const uint8_t Interrupt) ATTR_ALWAYS_INLINE;
#define USB_INT_SOFI UDIEN, (1 << SOFE) , UDINT , (1 << SOFI) static inline void USB_INT_Enable(const uint8_t Interrupt)
#define USB_INT_HSOFI UHIEN, (1 << HSOFE) , UHINT , (1 << HSOFI) {
#define USB_INT_RSTI UHIEN , (1 << RSTE) , UHINT , (1 << RSTI) switch (Interrupt)
#define USB_INT_SRPI OTGIEN, (1 << SRPE) , OTGINT, (1 << SRPI) {
#define USB_INT_RXSTPI UEIENX, (1 << RXSTPE) , UEINTX, (1 << RXSTPI) case USB_INT_VBUSTI:
USBCON |= (1 << VBUSTE);
break;
case USB_INT_IDTI:
USBCON |= (1 << IDTE);
break;
case USB_INT_WAKEUPI:
UDIEN |= (1 << WAKEUPE);
break;
case USB_INT_SUSPI:
UDIEN |= (1 << SUSPE);
break;
case USB_INT_EORSTI:
UDIEN |= (1 << EORSTE);
break;
case USB_INT_SOFI:
UDIEN |= (1 << SOFE);
break;
case USB_INT_HSOFI:
UHIEN |= (1 << HSOFE);
break;
case USB_INT_DCONNI:
UHIEN |= (1 << DCONNE);
break;
case USB_INT_DDISCI:
UHIEN |= (1 << DDISCE);
break;
case USB_INT_RSTI:
UHIEN |= (1 << RSTE);
break;
case USB_INT_BCERRI:
OTGIEN |= (1 << BCERRE);
break;
case USB_INT_VBERRI:
OTGIEN |= (1 << VBERRE);
break;
case USB_INT_SRPI:
OTGIEN |= (1 << SRPE);
break;
case USB_INT_RXSTPI:
UEIENX |= (1 << RXSTPE);
break;
}
}
static inline void USB_INT_Disable(const uint8_t Interrupt) ATTR_ALWAYS_INLINE;
static inline void USB_INT_Disable(const uint8_t Interrupt)
{
switch (Interrupt)
{
case USB_INT_VBUSTI:
USBCON &= ~(1 << VBUSTE);
break;
case USB_INT_IDTI:
USBCON &= ~(1 << IDTE);
break;
case USB_INT_WAKEUPI:
UDIEN &= ~(1 << WAKEUPE);
break;
case USB_INT_SUSPI:
UDIEN &= ~(1 << SUSPE);
break;
case USB_INT_EORSTI:
UDIEN &= ~(1 << EORSTE);
break;
case USB_INT_SOFI:
UDIEN &= ~(1 << SOFE);
break;
case USB_INT_HSOFI:
UHIEN &= ~(1 << HSOFE);
break;
case USB_INT_DCONNI:
UHIEN &= ~(1 << DCONNE);
break;
case USB_INT_DDISCI:
UHIEN &= ~(1 << DDISCE);
break;
case USB_INT_RSTI:
UHIEN &= ~(1 << RSTE);
break;
case USB_INT_BCERRI:
OTGIEN &= ~(1 << BCERRE);
break;
case USB_INT_VBERRI:
OTGIEN &= ~(1 << VBERRE);
break;
case USB_INT_SRPI:
OTGIEN &= ~(1 << SRPE);
break;
case USB_INT_RXSTPI:
UEIENX &= ~(1 << RXSTPE);
break;
}
}
static inline void USB_INT_Clear(const uint8_t Interrupt) ATTR_ALWAYS_INLINE;
static inline void USB_INT_Clear(const uint8_t Interrupt)
{
switch (Interrupt)
{
case USB_INT_VBUSTI:
USBINT &= ~(1 << VBUSTI);
break;
case USB_INT_IDTI:
USBINT &= ~(1 << IDTI);
break;
case USB_INT_WAKEUPI:
UDINT &= ~(1 << WAKEUPI);
break;
case USB_INT_SUSPI:
UDINT &= ~(1 << SUSPI);
break;
case USB_INT_EORSTI:
UDINT &= ~(1 << EORSTI);
break;
case USB_INT_SOFI:
UDINT &= ~(1 << SOFI);
break;
case USB_INT_HSOFI:
UHINT &= ~(1 << HSOFI);
break;
case USB_INT_DCONNI:
UHINT &= ~(1 << DCONNI);
break;
case USB_INT_DDISCI:
UHINT &= ~(1 << DDISCI);
break;
case USB_INT_RSTI:
UHINT &= ~(1 << RSTI);
break;
case USB_INT_BCERRI:
OTGINT &= ~(1 << BCERRI);
break;
case USB_INT_VBERRI:
OTGINT &= ~(1 << VBERRI);
break;
case USB_INT_SRPI:
OTGINT &= ~(1 << SRPI);
break;
case USB_INT_RXSTPI:
UEINTX &= ~(1 << RXSTPI);
break;
}
}
static inline bool USB_INT_IsEnabled(const uint8_t Interrupt) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline bool USB_INT_IsEnabled(const uint8_t Interrupt)
{
switch (Interrupt)
{
case USB_INT_VBUSTI:
return (USBCON & (1 << VBUSTE));
case USB_INT_IDTI:
return (USBCON & (1 << IDTE));
case USB_INT_WAKEUPI:
return (UDIEN & (1 << WAKEUPE));
case USB_INT_SUSPI:
return (UDIEN & (1 << SUSPE));
case USB_INT_EORSTI:
return (UDIEN & (1 << EORSTE));
case USB_INT_SOFI:
return (UDIEN & (1 << SOFE));
case USB_INT_HSOFI:
return (UHIEN & (1 << HSOFE));
case USB_INT_DCONNI:
return (UHIEN & (1 << DCONNE));
case USB_INT_DDISCI:
return (UHIEN & (1 << DDISCE));
case USB_INT_RSTI:
return (UHIEN & (1 << RSTE));
case USB_INT_BCERRI:
return (OTGIEN & (1 << BCERRE));
case USB_INT_VBERRI:
return (OTGIEN & (1 << VBERRE));
case USB_INT_SRPI:
return (OTGIEN & (1 << SRPE));
case USB_INT_RXSTPI:
return (UEIENX & (1 << RXSTPE));
break;
}
return false;
}
static inline bool USB_INT_HasOccurred(const uint8_t Interrupt) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline bool USB_INT_HasOccurred(const uint8_t Interrupt)
{
switch (Interrupt)
{
case USB_INT_VBUSTI:
return (USBINT & (1 << VBUSTI));
case USB_INT_IDTI:
return (USBINT & (1 << IDTI));
case USB_INT_WAKEUPI:
return (UDINT & (1 << WAKEUPI));
case USB_INT_SUSPI:
return (UDINT & (1 << SUSPI));
case USB_INT_EORSTI:
return (UDINT & (1 << EORSTI));
case USB_INT_SOFI:
return (UDINT & (1 << SOFI));
case USB_INT_HSOFI:
return (UHINT & (1 << HSOFI));
case USB_INT_DCONNI:
return (UHINT & (1 << DCONNI));
case USB_INT_DDISCI:
return (UHINT & (1 << DDISCI));
case USB_INT_RSTI:
return (UHINT & (1 << RSTI));
case USB_INT_BCERRI:
return (OTGINT & (1 << BCERRI));
case USB_INT_VBERRI:
return (OTGINT & (1 << VBERRI));
case USB_INT_SRPI:
return (OTGINT & (1 << SRPI));
case USB_INT_RXSTPI:
return (UEINTX & (1 << RXSTPI));
}
return false;
}
/* Includes: */ /* Includes: */
#include "../USBMode.h" #include "../USBMode.h"

@ -160,7 +160,7 @@ static void USB_Init_Device(void)
else else
USB_Device_SetFullSpeed(); USB_Device_SetFullSpeed();
USB_INT_Enable(USB_INT_VBUS); USB_INT_Enable(USB_INT_VBUSTI);
Endpoint_ConfigureEndpoint(ENDPOINT_CONTROLEP, EP_TYPE_CONTROL, Endpoint_ConfigureEndpoint(ENDPOINT_CONTROLEP, EP_TYPE_CONTROL,
ENDPOINT_DIR_OUT, USB_ControlEndpointSize, ENDPOINT_DIR_OUT, USB_ControlEndpointSize,

@ -61,9 +61,9 @@ ISR(USB_GEN_vect)
} }
#endif #endif
if (USB_INT_HasOccurred(USB_INT_VBUS) && USB_INT_IsEnabled(USB_INT_VBUS)) if (USB_INT_HasOccurred(USB_INT_VBUSTI) && USB_INT_IsEnabled(USB_INT_VBUSTI))
{ {
USB_INT_Clear(USB_INT_VBUS); USB_INT_Clear(USB_INT_VBUSTI);
if (USB_VBUS_GetStatus()) if (USB_VBUS_GetStatus())
{ {

@ -59,28 +59,29 @@
/* Macros: */ /* Macros: */
enum USB_Interrupts_t enum USB_Interrupts_t
{ {
USB_INT_VBUS = 0, USB_INT_VBUSTI = 0,
USB_INT_IDTI = 1, USB_INT_IDTI = 1,
USB_INT_WAKEUPI = 2, USB_INT_WAKEUPI = 2,
USB_INT_SUSPI = 3, USB_INT_SUSPI = 3,
USB_INT_EORSTI = 4, USB_INT_EORSTI = 4,
USB_INT_DCONNI = 5, USB_INT_SOFI = 5,
USB_INT_DDISCI = 6, USB_INT_HSOFI = 6,
USB_INT_BCERRI = 7, USB_INT_DCONNI = 7,
USB_INT_VBERRI = 8, USB_INT_DDISCI = 8,
USB_INT_SOFI = 9, USB_INT_RSTI = 9,
USB_INT_HSOFI = 10, USB_INT_BCERRI = 10,
USB_INT_RSTI = 11, USB_INT_VBERRI = 11,
USB_INT_SRPI = 12, USB_INT_SRPI = 12,
USB_INT_RXSTPI = 13, USB_INT_RXSTPI = 13,
}; };
/* Inline Functions: */
static inline void USB_INT_Enable(const uint8_t Interrupt) ATTR_ALWAYS_INLINE; static inline void USB_INT_Enable(const uint8_t Interrupt) ATTR_ALWAYS_INLINE;
static inline void USB_INT_Enable(const uint8_t Interrupt) static inline void USB_INT_Enable(const uint8_t Interrupt)
{ {
switch (Interrupt) switch (Interrupt)
{ {
case USB_INT_VBUS: case USB_INT_VBUSTI:
AVR32_USBB.USBCON.vbuste = true; AVR32_USBB.USBCON.vbuste = true;
break; break;
case USB_INT_IDTI: case USB_INT_IDTI:
@ -95,27 +96,27 @@
case USB_INT_EORSTI: case USB_INT_EORSTI:
AVR32_USBB.UDINTESET.eorstes = true; AVR32_USBB.UDINTESET.eorstes = true;
break; break;
case USB_INT_SOFI:
AVR32_USBB.UDINTESET.sofes = true;
break;
case USB_INT_HSOFI:
AVR32_USBB.UHINTESET.hsofies = true;
break;
case USB_INT_DCONNI: case USB_INT_DCONNI:
AVR32_USBB.UHINTESET.dconnies = true; AVR32_USBB.UHINTESET.dconnies = true;
break; break;
case USB_INT_DDISCI: case USB_INT_DDISCI:
AVR32_USBB.UHINTESET.ddiscies = true; AVR32_USBB.UHINTESET.ddiscies = true;
break; break;
case USB_INT_RSTI:
AVR32_USBB.UHINTESET.rsties = true;
break;
case USB_INT_BCERRI: case USB_INT_BCERRI:
AVR32_USBB.USBCON.bcerre = true; AVR32_USBB.USBCON.bcerre = true;
break; break;
case USB_INT_VBERRI: case USB_INT_VBERRI:
AVR32_USBB.USBCON.vberre = true; AVR32_USBB.USBCON.vberre = true;
break; break;
case USB_INT_SOFI:
AVR32_USBB.UDINTESET.sofes = true;
break;
case USB_INT_HSOFI:
AVR32_USBB.UHINTESET.hsofies = true;
break;
case USB_INT_RSTI:
AVR32_USBB.UHINTESET.rsties = true;
break;
case USB_INT_SRPI: case USB_INT_SRPI:
case USB_INT_RXSTPI: case USB_INT_RXSTPI:
// TODO // TODO
@ -128,7 +129,7 @@
{ {
switch (Interrupt) switch (Interrupt)
{ {
case USB_INT_VBUS: case USB_INT_VBUSTI:
AVR32_USBB.USBCON.vbuste = false; AVR32_USBB.USBCON.vbuste = false;
break; break;
case USB_INT_IDTI: case USB_INT_IDTI:
@ -143,27 +144,27 @@
case USB_INT_EORSTI: case USB_INT_EORSTI:
AVR32_USBB.UDINTECLR.eorstec = true; AVR32_USBB.UDINTECLR.eorstec = true;
break; break;
case USB_INT_SOFI:
AVR32_USBB.UDINTECLR.sofec = true;
break;
case USB_INT_HSOFI:
AVR32_USBB.UHINTECLR.hsofiec = true;
break;
case USB_INT_DCONNI: case USB_INT_DCONNI:
AVR32_USBB.UHINTECLR.dconniec = true; AVR32_USBB.UHINTECLR.dconniec = true;
break; break;
case USB_INT_DDISCI: case USB_INT_DDISCI:
AVR32_USBB.UHINTECLR.ddisciec = true; AVR32_USBB.UHINTECLR.ddisciec = true;
break; break;
case USB_INT_RSTI:
AVR32_USBB.UHINTECLR.rstiec = true;
break;
case USB_INT_BCERRI: case USB_INT_BCERRI:
AVR32_USBB.USBCON.bcerre = false; AVR32_USBB.USBCON.bcerre = false;
break; break;
case USB_INT_VBERRI: case USB_INT_VBERRI:
AVR32_USBB.USBCON.vberre = false; AVR32_USBB.USBCON.vberre = false;
break; break;
case USB_INT_SOFI:
AVR32_USBB.UDINTECLR.sofec = true;
break;
case USB_INT_HSOFI:
AVR32_USBB.UHINTECLR.hsofiec = true;
break;
case USB_INT_RSTI:
AVR32_USBB.UHINTECLR.rstiec = true;
break;
case USB_INT_SRPI: case USB_INT_SRPI:
case USB_INT_RXSTPI: case USB_INT_RXSTPI:
// TODO // TODO
@ -176,7 +177,7 @@
{ {
switch (Interrupt) switch (Interrupt)
{ {
case USB_INT_VBUS: case USB_INT_VBUSTI:
AVR32_USBB.USBSTACLR.vbustic = true; AVR32_USBB.USBSTACLR.vbustic = true;
break; break;
case USB_INT_IDTI: case USB_INT_IDTI:
@ -191,27 +192,27 @@
case USB_INT_EORSTI: case USB_INT_EORSTI:
AVR32_USBB.UDINTCLR.eorstc = true; AVR32_USBB.UDINTCLR.eorstc = true;
break; break;
case USB_INT_SOFI:
AVR32_USBB.UDINTCLR.sofc = true;
break;
case USB_INT_HSOFI:
AVR32_USBB.UHINTCLR.hsofic = true;
break;
case USB_INT_DCONNI: case USB_INT_DCONNI:
AVR32_USBB.UHINTCLR.dconnic = true; AVR32_USBB.UHINTCLR.dconnic = true;
break; break;
case USB_INT_DDISCI: case USB_INT_DDISCI:
AVR32_USBB.UHINTCLR.ddiscic = true; AVR32_USBB.UHINTCLR.ddiscic = true;
break; break;
case USB_INT_RSTI:
AVR32_USBB.UHINTCLR.rstic = true;
break;
case USB_INT_BCERRI: case USB_INT_BCERRI:
AVR32_USBB.USBSTACLR.bcerric = true; AVR32_USBB.USBSTACLR.bcerric = true;
break; break;
case USB_INT_VBERRI: case USB_INT_VBERRI:
AVR32_USBB.USBSTACLR.vberric = true; AVR32_USBB.USBSTACLR.vberric = true;
break; break;
case USB_INT_SOFI:
AVR32_USBB.UDINTCLR.sofc = true;
break;
case USB_INT_HSOFI:
AVR32_USBB.UHINTCLR.hsofic = true;
break;
case USB_INT_RSTI:
AVR32_USBB.UHINTCLR.rstic = true;
break;
case USB_INT_SRPI: case USB_INT_SRPI:
case USB_INT_RXSTPI: case USB_INT_RXSTPI:
// TODO // TODO
@ -224,7 +225,7 @@
{ {
switch (Interrupt) switch (Interrupt)
{ {
case USB_INT_VBUS: case USB_INT_VBUSTI:
return AVR32_USBB.USBCON.vbuste; return AVR32_USBB.USBCON.vbuste;
case USB_INT_IDTI: case USB_INT_IDTI:
return AVR32_USBB.USBCON.idte; return AVR32_USBB.USBCON.idte;
@ -234,20 +235,20 @@
return AVR32_USBB.UDINTE.suspe; return AVR32_USBB.UDINTE.suspe;
case USB_INT_EORSTI: case USB_INT_EORSTI:
return AVR32_USBB.UDINTE.eorste; return AVR32_USBB.UDINTE.eorste;
case USB_INT_SOFI:
return AVR32_USBB.UDINTE.sofe;
case USB_INT_HSOFI:
return AVR32_USBB.UHINTE.hsofie;
case USB_INT_DCONNI: case USB_INT_DCONNI:
return AVR32_USBB.UHINTE.dconnie; return AVR32_USBB.UHINTE.dconnie;
case USB_INT_DDISCI: case USB_INT_DDISCI:
return AVR32_USBB.UHINTE.ddiscie; return AVR32_USBB.UHINTE.ddiscie;
case USB_INT_RSTI:
return AVR32_USBB.UHINTE.rstie;
case USB_INT_BCERRI: case USB_INT_BCERRI:
return AVR32_USBB.USBCON.bcerre; return AVR32_USBB.USBCON.bcerre;
case USB_INT_VBERRI: case USB_INT_VBERRI:
return AVR32_USBB.USBCON.vberre; return AVR32_USBB.USBCON.vberre;
case USB_INT_SOFI:
return AVR32_USBB.UDINTE.sofe;
case USB_INT_HSOFI:
return AVR32_USBB.UHINTE.hsofie;
case USB_INT_RSTI:
return AVR32_USBB.UHINTE.rstie;
case USB_INT_SRPI: case USB_INT_SRPI:
case USB_INT_RXSTPI: case USB_INT_RXSTPI:
// TODO // TODO
@ -262,7 +263,7 @@
{ {
switch (Interrupt) switch (Interrupt)
{ {
case USB_INT_VBUS: case USB_INT_VBUSTI:
return AVR32_USBB.USBSTA.vbusti; return AVR32_USBB.USBSTA.vbusti;
case USB_INT_IDTI: case USB_INT_IDTI:
return AVR32_USBB.USBSTA.idti; return AVR32_USBB.USBSTA.idti;
@ -272,20 +273,20 @@
return AVR32_USBB.UDINT.susp; return AVR32_USBB.UDINT.susp;
case USB_INT_EORSTI: case USB_INT_EORSTI:
return AVR32_USBB.UDINT.eorst; return AVR32_USBB.UDINT.eorst;
case USB_INT_SOFI:
return AVR32_USBB.UDINT.sof;
case USB_INT_HSOFI:
return AVR32_USBB.UHINT.hsofi;
case USB_INT_DCONNI: case USB_INT_DCONNI:
return AVR32_USBB.UHINT.dconni; return AVR32_USBB.UHINT.dconni;
case USB_INT_DDISCI: case USB_INT_DDISCI:
return AVR32_USBB.UHINT.ddisci; return AVR32_USBB.UHINT.ddisci;
case USB_INT_RSTI:
return AVR32_USBB.UHINT.rsti;
case USB_INT_BCERRI: case USB_INT_BCERRI:
return AVR32_USBB.USBSTA.bcerri; return AVR32_USBB.USBSTA.bcerri;
case USB_INT_VBERRI: case USB_INT_VBERRI:
return AVR32_USBB.USBSTA.vberri; return AVR32_USBB.USBSTA.vberri;
case USB_INT_SOFI:
return AVR32_USBB.UDINT.sof;
case USB_INT_HSOFI:
return AVR32_USBB.UHINT.hsofi;
case USB_INT_RSTI:
return AVR32_USBB.UHINT.rsti;
case USB_INT_SRPI: case USB_INT_SRPI:
case USB_INT_RXSTPI: case USB_INT_RXSTPI:
// TODO // TODO

@ -40,7 +40,7 @@
* into difficulties or need some advice. In addition, you can also email the library author to receive personalized * into difficulties or need some advice. In addition, you can also email the library author to receive personalized
* support when you need it (subject to author's schedule). * support when you need it (subject to author's schedule).
* *
* <small>* Atmel Stack Mouse Device Demo 4218 bytes, LUFA Mouse Low Level Device Demo 3472 bytes, under identical build * <small>* Atmel Stack Mouse Device Demo 4218 bytes, LUFA Mouse Low Level Device Demo 3526 bytes, under identical build
* environments</small> * environments</small>
*/ */

Loading…
Cancel
Save