Oops - ensure that only the relevant/available interrupts are defined and used on each architecture.

Make all USB driver headers include USBMode.h first, to ensure that the relevant USB mode macros are defined.
pull/1469/head
Dean Camera 14 years ago
parent 04526d284d
commit c79f6e2586

@ -59,20 +59,28 @@
/* Enums: */ /* Enums: */
enum USB_Interrupts_t enum USB_Interrupts_t
{ {
#if (defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR) || defined(__DOXYGEN__))
USB_INT_VBUSTI = 0, USB_INT_VBUSTI = 0,
#endif
#if (defined(USB_CAN_BE_BOTH) || defined(__DOXYGEN__))
USB_INT_IDTI = 1, USB_INT_IDTI = 1,
#endif
#if (defined(USB_CAN_BE_DEVICE) || defined(__DOXYGEN__))
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_SOFI = 5, USB_INT_SOFI = 5,
USB_INT_HSOFI = 6, USB_INT_RXSTPI = 6,
USB_INT_DCONNI = 7, #endif
USB_INT_DDISCI = 8, #if (defined(USB_CAN_BE_HOST) || defined(__DOXYGEN__))
USB_INT_RSTI = 9, USB_INT_HSOFI = 7,
USB_INT_BCERRI = 10, USB_INT_DCONNI = 8,
USB_INT_VBERRI = 11, USB_INT_DDISCI = 9,
USB_INT_SRPI = 12, USB_INT_RSTI = 10,
USB_INT_RXSTPI = 13, USB_INT_BCERRI = 11,
USB_INT_VBERRI = 12,
USB_INT_SRPI = 13,
#endif
}; };
/* Inline Functions: */ /* Inline Functions: */
@ -81,12 +89,17 @@
{ {
switch (Interrupt) switch (Interrupt)
{ {
#if (defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR))
case USB_INT_VBUSTI: case USB_INT_VBUSTI:
USBCON |= (1 << VBUSTE); USBCON |= (1 << VBUSTE);
break; break;
#endif
#if defined(USB_CAN_BE_BOTH)
case USB_INT_IDTI: case USB_INT_IDTI:
USBCON |= (1 << IDTE); USBCON |= (1 << IDTE);
break; break;
#endif
#if defined(USB_CAN_BE_DEVICE)
case USB_INT_WAKEUPI: case USB_INT_WAKEUPI:
UDIEN |= (1 << WAKEUPE); UDIEN |= (1 << WAKEUPE);
break; break;
@ -99,6 +112,11 @@
case USB_INT_SOFI: case USB_INT_SOFI:
UDIEN |= (1 << SOFE); UDIEN |= (1 << SOFE);
break; break;
case USB_INT_RXSTPI:
UEIENX |= (1 << RXSTPE);
break;
#endif
#if defined(USB_CAN_BE_HOST)
case USB_INT_HSOFI: case USB_INT_HSOFI:
UHIEN |= (1 << HSOFE); UHIEN |= (1 << HSOFE);
break; break;
@ -120,9 +138,7 @@
case USB_INT_SRPI: case USB_INT_SRPI:
OTGIEN |= (1 << SRPE); OTGIEN |= (1 << SRPE);
break; break;
case USB_INT_RXSTPI: #endif
UEIENX |= (1 << RXSTPE);
break;
} }
} }
@ -131,12 +147,17 @@
{ {
switch (Interrupt) switch (Interrupt)
{ {
#if (defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR))
case USB_INT_VBUSTI: case USB_INT_VBUSTI:
USBCON &= ~(1 << VBUSTE); USBCON &= ~(1 << VBUSTE);
break; break;
#endif
#if defined(USB_CAN_BE_BOTH)
case USB_INT_IDTI: case USB_INT_IDTI:
USBCON &= ~(1 << IDTE); USBCON &= ~(1 << IDTE);
break; break;
#endif
#if defined(USB_CAN_BE_DEVICE)
case USB_INT_WAKEUPI: case USB_INT_WAKEUPI:
UDIEN &= ~(1 << WAKEUPE); UDIEN &= ~(1 << WAKEUPE);
break; break;
@ -149,6 +170,11 @@
case USB_INT_SOFI: case USB_INT_SOFI:
UDIEN &= ~(1 << SOFE); UDIEN &= ~(1 << SOFE);
break; break;
case USB_INT_RXSTPI:
UEIENX &= ~(1 << RXSTPE);
break;
#endif
#if defined(USB_CAN_BE_HOST)
case USB_INT_HSOFI: case USB_INT_HSOFI:
UHIEN &= ~(1 << HSOFE); UHIEN &= ~(1 << HSOFE);
break; break;
@ -170,9 +196,7 @@
case USB_INT_SRPI: case USB_INT_SRPI:
OTGIEN &= ~(1 << SRPE); OTGIEN &= ~(1 << SRPE);
break; break;
case USB_INT_RXSTPI: #endif
UEIENX &= ~(1 << RXSTPE);
break;
} }
} }
@ -181,12 +205,17 @@
{ {
switch (Interrupt) switch (Interrupt)
{ {
#if (defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR))
case USB_INT_VBUSTI: case USB_INT_VBUSTI:
USBINT &= ~(1 << VBUSTI); USBINT &= ~(1 << VBUSTI);
break; break;
#endif
#if defined(USB_CAN_BE_BOTH)
case USB_INT_IDTI: case USB_INT_IDTI:
USBINT &= ~(1 << IDTI); USBINT &= ~(1 << IDTI);
break; break;
#endif
#if defined(USB_CAN_BE_DEVICE)
case USB_INT_WAKEUPI: case USB_INT_WAKEUPI:
UDINT &= ~(1 << WAKEUPI); UDINT &= ~(1 << WAKEUPI);
break; break;
@ -199,6 +228,11 @@
case USB_INT_SOFI: case USB_INT_SOFI:
UDINT &= ~(1 << SOFI); UDINT &= ~(1 << SOFI);
break; break;
case USB_INT_RXSTPI:
UEINTX &= ~(1 << RXSTPI);
break;
#endif
#if defined(USB_CAN_BE_HOST)
case USB_INT_HSOFI: case USB_INT_HSOFI:
UHINT &= ~(1 << HSOFI); UHINT &= ~(1 << HSOFI);
break; break;
@ -220,9 +254,7 @@
case USB_INT_SRPI: case USB_INT_SRPI:
OTGINT &= ~(1 << SRPI); OTGINT &= ~(1 << SRPI);
break; break;
case USB_INT_RXSTPI: #endif
UEINTX &= ~(1 << RXSTPI);
break;
} }
} }
@ -231,10 +263,15 @@
{ {
switch (Interrupt) switch (Interrupt)
{ {
#if (defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR))
case USB_INT_VBUSTI: case USB_INT_VBUSTI:
return (USBCON & (1 << VBUSTE)); return (USBCON & (1 << VBUSTE));
#endif
#if defined(USB_CAN_BE_BOTH)
case USB_INT_IDTI: case USB_INT_IDTI:
return (USBCON & (1 << IDTE)); return (USBCON & (1 << IDTE));
#endif
#if defined(USB_CAN_BE_DEVICE)
case USB_INT_WAKEUPI: case USB_INT_WAKEUPI:
return (UDIEN & (1 << WAKEUPE)); return (UDIEN & (1 << WAKEUPE));
case USB_INT_SUSPI: case USB_INT_SUSPI:
@ -243,6 +280,10 @@
return (UDIEN & (1 << EORSTE)); return (UDIEN & (1 << EORSTE));
case USB_INT_SOFI: case USB_INT_SOFI:
return (UDIEN & (1 << SOFE)); return (UDIEN & (1 << SOFE));
case USB_INT_RXSTPI:
return (UEIENX & (1 << RXSTPE));
#endif
#if defined(USB_CAN_BE_HOST)
case USB_INT_HSOFI: case USB_INT_HSOFI:
return (UHIEN & (1 << HSOFE)); return (UHIEN & (1 << HSOFE));
case USB_INT_DCONNI: case USB_INT_DCONNI:
@ -257,9 +298,7 @@
return (OTGIEN & (1 << VBERRE)); return (OTGIEN & (1 << VBERRE));
case USB_INT_SRPI: case USB_INT_SRPI:
return (OTGIEN & (1 << SRPE)); return (OTGIEN & (1 << SRPE));
case USB_INT_RXSTPI: #endif
return (UEIENX & (1 << RXSTPE));
break;
} }
return false; return false;
@ -270,10 +309,15 @@
{ {
switch (Interrupt) switch (Interrupt)
{ {
#if (defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR))
case USB_INT_VBUSTI: case USB_INT_VBUSTI:
return (USBINT & (1 << VBUSTI)); return (USBINT & (1 << VBUSTI));
#endif
#if defined(USB_CAN_BE_BOTH)
case USB_INT_IDTI: case USB_INT_IDTI:
return (USBINT & (1 << IDTI)); return (USBINT & (1 << IDTI));
#endif
#if defined(USB_CAN_BE_DEVICE)
case USB_INT_WAKEUPI: case USB_INT_WAKEUPI:
return (UDINT & (1 << WAKEUPI)); return (UDINT & (1 << WAKEUPI));
case USB_INT_SUSPI: case USB_INT_SUSPI:
@ -282,6 +326,10 @@
return (UDINT & (1 << EORSTI)); return (UDINT & (1 << EORSTI));
case USB_INT_SOFI: case USB_INT_SOFI:
return (UDINT & (1 << SOFI)); return (UDINT & (1 << SOFI));
case USB_INT_RXSTPI:
return (UEINTX & (1 << RXSTPI));
#endif
#if defined(USB_CAN_BE_HOST)
case USB_INT_HSOFI: case USB_INT_HSOFI:
return (UHINT & (1 << HSOFI)); return (UHINT & (1 << HSOFI));
case USB_INT_DCONNI: case USB_INT_DCONNI:
@ -296,8 +344,7 @@
return (OTGINT & (1 << VBERRI)); return (OTGINT & (1 << VBERRI));
case USB_INT_SRPI: case USB_INT_SRPI:
return (OTGINT & (1 << SRPI)); return (OTGINT & (1 << SRPI));
case USB_INT_RXSTPI: #endif
return (UEINTX & (1 << RXSTPI));
} }
return false; return false;

@ -52,8 +52,8 @@
/* Includes: */ /* Includes: */
#include "../../../Common/Common.h" #include "../../../Common/Common.h"
#include "HostStandardReq.h"
#include "USBMode.h" #include "USBMode.h"
#include "HostStandardReq.h"
#include "StdDescriptors.h" #include "StdDescriptors.h"
/* Enable C linkage for C++ Compilers: */ /* Enable C linkage for C++ Compilers: */

@ -51,6 +51,7 @@
/* Includes: */ /* Includes: */
#include "../../../Common/Common.h" #include "../../../Common/Common.h"
#include "USBMode.h"
#include "StdDescriptors.h" #include "StdDescriptors.h"
#include "USBInterrupt.h" #include "USBInterrupt.h"
#include "Endpoint.h" #include "Endpoint.h"

@ -43,6 +43,7 @@
/* Includes: */ /* Includes: */
#include "../../../Common/Common.h" #include "../../../Common/Common.h"
#include "USBMode.h"
#include "StdDescriptors.h" #include "StdDescriptors.h"
#include "Events.h" #include "Events.h"
#include "StdRequestType.h" #include "StdRequestType.h"

@ -74,6 +74,7 @@
/* Includes: */ /* Includes: */
#include "../../../Common/Common.h" #include "../../../Common/Common.h"
#include "USBMode.h"
/* Preprocessor Checks: */ /* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_USB_DRIVER) #if !defined(__INCLUDE_FROM_USB_DRIVER)

@ -51,6 +51,7 @@
/* Includes: */ /* Includes: */
#include "../../../Common/Common.h" #include "../../../Common/Common.h"
#include "USBMode.h"
#include "USBTask.h" #include "USBTask.h"
/* Enable C linkage for C++ Compilers: */ /* Enable C linkage for C++ Compilers: */

@ -51,6 +51,7 @@
/* Includes: */ /* Includes: */
#include "../../../Common/Common.h" #include "../../../Common/Common.h"
#include "USBMode.h"
/* Preprocessor Checks: */ /* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_USB_DRIVER) #if !defined(__INCLUDE_FROM_USB_DRIVER)

@ -52,6 +52,7 @@
/* Includes: */ /* Includes: */
#include "../../../Common/Common.h" #include "../../../Common/Common.h"
#include "USBMode.h"
/* Preprocessor Checks: */ /* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_USB_DRIVER) #if !defined(__INCLUDE_FROM_USB_DRIVER)

@ -84,6 +84,7 @@
/* Includes: */ /* Includes: */
#include "../../../Common/Common.h" #include "../../../Common/Common.h"
#include "USBMode.h"
/* Preprocessor Checks: */ /* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_USB_DRIVER) #if !defined(__INCLUDE_FROM_USB_DRIVER)

@ -51,6 +51,7 @@
/* Includes: */ /* Includes: */
#include "../../../Common/Common.h" #include "../../../Common/Common.h"
#include "USBMode.h"
#include "USBTask.h" #include "USBTask.h"
/* Enable C linkage for C++ Compilers: */ /* Enable C linkage for C++ Compilers: */

@ -51,6 +51,7 @@
/* Includes: */ /* Includes: */
#include "../../../Common/Common.h" #include "../../../Common/Common.h"
#include "USBMode.h"
/* Preprocessor Checks: */ /* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_USB_DRIVER) #if !defined(__INCLUDE_FROM_USB_DRIVER)

@ -184,7 +184,7 @@ static void USB_Init_Host(void)
USB_Host_VBUS_Auto_On(); USB_Host_VBUS_Auto_On();
USB_INT_Enable(USB_INT_SRPI); USB_INT_Enable(USB_INT_DCONNI);
USB_INT_Enable(USB_INT_BCERRI); USB_INT_Enable(USB_INT_BCERRI);
USB_Attach(); USB_Attach();

@ -160,10 +160,10 @@ ISR(USB_GEN_vect)
USB_HostState = HOST_STATE_Unattached; USB_HostState = HOST_STATE_Unattached;
} }
if (USB_INT_HasOccurred(USB_INT_SRPI) && USB_INT_IsEnabled(USB_INT_SRPI)) if (USB_INT_HasOccurred(USB_INT_DCONNI) && USB_INT_IsEnabled(USB_INT_DCONNI))
{ {
USB_INT_Clear(USB_INT_SRPI); USB_INT_Clear(USB_INT_DCONNI);
USB_INT_Disable(USB_INT_SRPI); USB_INT_Disable(USB_INT_DCONNI);
EVENT_USB_Host_DeviceAttached(); EVENT_USB_Host_DeviceAttached();

@ -60,19 +60,24 @@
enum USB_Interrupts_t enum USB_Interrupts_t
{ {
USB_INT_VBUSTI = 0, USB_INT_VBUSTI = 0,
#if (defined(USB_CAN_BE_BOTH) || defined(__DOXYGEN__))
USB_INT_IDTI = 1, USB_INT_IDTI = 1,
#endif
#if (defined(USB_CAN_BE_DEVICE) || defined(__DOXYGEN__))
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_SOFI = 5, USB_INT_SOFI = 5,
USB_INT_HSOFI = 6, USB_INT_RXSTPI = 6,
USB_INT_DCONNI = 7, #endif
USB_INT_DDISCI = 8, #if (defined(USB_CAN_BE_HOST) || defined(__DOXYGEN__))
USB_INT_RSTI = 9, USB_INT_HSOFI = 7,
USB_INT_BCERRI = 10, USB_INT_DCONNI = 8,
USB_INT_VBERRI = 11, USB_INT_DDISCI = 9,
USB_INT_SRPI = 12, USB_INT_RSTI = 10,
USB_INT_RXSTPI = 13, USB_INT_BCERRI = 11,
USB_INT_VBERRI = 12,
#endif
}; };
/* Inline Functions: */ /* Inline Functions: */
@ -84,9 +89,12 @@
case USB_INT_VBUSTI: case USB_INT_VBUSTI:
AVR32_USBB.USBCON.vbuste = true; AVR32_USBB.USBCON.vbuste = true;
break; break;
#if defined(USB_CAN_BE_BOTH)
case USB_INT_IDTI: case USB_INT_IDTI:
AVR32_USBB.USBCON.idte = true; AVR32_USBB.USBCON.idte = true;
break; break;
#endif
#if defined(USB_CAN_BE_DEVICE)
case USB_INT_WAKEUPI: case USB_INT_WAKEUPI:
AVR32_USBB.UDINTESET.wakeupes = true; AVR32_USBB.UDINTESET.wakeupes = true;
break; break;
@ -99,6 +107,11 @@
case USB_INT_SOFI: case USB_INT_SOFI:
AVR32_USBB.UDINTESET.sofes = true; AVR32_USBB.UDINTESET.sofes = true;
break; break;
case USB_INT_RXSTPI:
// TODO
return;
#endif
#if defined(USB_CAN_BE_HOST)
case USB_INT_HSOFI: case USB_INT_HSOFI:
AVR32_USBB.UHINTESET.hsofies = true; AVR32_USBB.UHINTESET.hsofies = true;
break; break;
@ -117,10 +130,7 @@
case USB_INT_VBERRI: case USB_INT_VBERRI:
AVR32_USBB.USBCON.vberre = true; AVR32_USBB.USBCON.vberre = true;
break; break;
case USB_INT_SRPI: #endif
case USB_INT_RXSTPI:
// TODO
return;
} }
} }
@ -132,9 +142,12 @@
case USB_INT_VBUSTI: case USB_INT_VBUSTI:
AVR32_USBB.USBCON.vbuste = false; AVR32_USBB.USBCON.vbuste = false;
break; break;
#if defined(USB_CAN_BE_BOTH)
case USB_INT_IDTI: case USB_INT_IDTI:
AVR32_USBB.USBCON.idte = false; AVR32_USBB.USBCON.idte = false;
break; break;
#endif
#if defined(USB_CAN_BE_DEVICE)
case USB_INT_WAKEUPI: case USB_INT_WAKEUPI:
AVR32_USBB.UDINTECLR.wakeupec = true; AVR32_USBB.UDINTECLR.wakeupec = true;
break; break;
@ -147,6 +160,11 @@
case USB_INT_SOFI: case USB_INT_SOFI:
AVR32_USBB.UDINTECLR.sofec = true; AVR32_USBB.UDINTECLR.sofec = true;
break; break;
case USB_INT_RXSTPI:
// TODO
return;
#endif
#if defined(USB_CAN_BE_HOST)
case USB_INT_HSOFI: case USB_INT_HSOFI:
AVR32_USBB.UHINTECLR.hsofiec = true; AVR32_USBB.UHINTECLR.hsofiec = true;
break; break;
@ -165,10 +183,7 @@
case USB_INT_VBERRI: case USB_INT_VBERRI:
AVR32_USBB.USBCON.vberre = false; AVR32_USBB.USBCON.vberre = false;
break; break;
case USB_INT_SRPI: #endif
case USB_INT_RXSTPI:
// TODO
return;
} }
} }
@ -180,9 +195,12 @@
case USB_INT_VBUSTI: case USB_INT_VBUSTI:
AVR32_USBB.USBSTACLR.vbustic = true; AVR32_USBB.USBSTACLR.vbustic = true;
break; break;
#if defined(USB_CAN_BE_BOTH)
case USB_INT_IDTI: case USB_INT_IDTI:
AVR32_USBB.USBSTACLR.idtic = true; AVR32_USBB.USBSTACLR.idtic = true;
break; break;
#endif
#if defined(USB_CAN_BE_DEVICE)
case USB_INT_WAKEUPI: case USB_INT_WAKEUPI:
AVR32_USBB.UDINTCLR.wakeupc = true; AVR32_USBB.UDINTCLR.wakeupc = true;
break; break;
@ -195,6 +213,11 @@
case USB_INT_SOFI: case USB_INT_SOFI:
AVR32_USBB.UDINTCLR.sofc = true; AVR32_USBB.UDINTCLR.sofc = true;
break; break;
case USB_INT_RXSTPI:
// TODO
return;
#endif
#if defined(USB_CAN_BE_HOST)
case USB_INT_HSOFI: case USB_INT_HSOFI:
AVR32_USBB.UHINTCLR.hsofic = true; AVR32_USBB.UHINTCLR.hsofic = true;
break; break;
@ -213,10 +236,7 @@
case USB_INT_VBERRI: case USB_INT_VBERRI:
AVR32_USBB.USBSTACLR.vberric = true; AVR32_USBB.USBSTACLR.vberric = true;
break; break;
case USB_INT_SRPI: #endif
case USB_INT_RXSTPI:
// TODO
return;
} }
} }
@ -227,8 +247,11 @@
{ {
case USB_INT_VBUSTI: case USB_INT_VBUSTI:
return AVR32_USBB.USBCON.vbuste; return AVR32_USBB.USBCON.vbuste;
#if defined(USB_CAN_BE_BOTH)
case USB_INT_IDTI: case USB_INT_IDTI:
return AVR32_USBB.USBCON.idte; return AVR32_USBB.USBCON.idte;
#endif
#if defined(USB_CAN_BE_DEVICE)
case USB_INT_WAKEUPI: case USB_INT_WAKEUPI:
return AVR32_USBB.UDINTE.wakeupe; return AVR32_USBB.UDINTE.wakeupe;
case USB_INT_SUSPI: case USB_INT_SUSPI:
@ -237,6 +260,11 @@
return AVR32_USBB.UDINTE.eorste; return AVR32_USBB.UDINTE.eorste;
case USB_INT_SOFI: case USB_INT_SOFI:
return AVR32_USBB.UDINTE.sofe; return AVR32_USBB.UDINTE.sofe;
case USB_INT_RXSTPI:
// TODO
return false;
#endif
#if defined(USB_CAN_BE_HOST)
case USB_INT_HSOFI: case USB_INT_HSOFI:
return AVR32_USBB.UHINTE.hsofie; return AVR32_USBB.UHINTE.hsofie;
case USB_INT_DCONNI: case USB_INT_DCONNI:
@ -249,10 +277,7 @@
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_SRPI: #endif
case USB_INT_RXSTPI:
// TODO
return false;
} }
return false; return false;
@ -265,8 +290,11 @@
{ {
case USB_INT_VBUSTI: case USB_INT_VBUSTI:
return AVR32_USBB.USBSTA.vbusti; return AVR32_USBB.USBSTA.vbusti;
#if defined(USB_CAN_BE_BOTH)
case USB_INT_IDTI: case USB_INT_IDTI:
return AVR32_USBB.USBSTA.idti; return AVR32_USBB.USBSTA.idti;
#endif
#if defined(USB_CAN_BE_DEVICE)
case USB_INT_WAKEUPI: case USB_INT_WAKEUPI:
return AVR32_USBB.UDINT.wakeup; return AVR32_USBB.UDINT.wakeup;
case USB_INT_SUSPI: case USB_INT_SUSPI:
@ -275,6 +303,11 @@
return AVR32_USBB.UDINT.eorst; return AVR32_USBB.UDINT.eorst;
case USB_INT_SOFI: case USB_INT_SOFI:
return AVR32_USBB.UDINT.sof; return AVR32_USBB.UDINT.sof;
case USB_INT_RXSTPI:
// TODO
return false;
#endif
#if defined(USB_CAN_BE_HOST)
case USB_INT_HSOFI: case USB_INT_HSOFI:
return AVR32_USBB.UHINT.hsofi; return AVR32_USBB.UHINT.hsofi;
case USB_INT_DCONNI: case USB_INT_DCONNI:
@ -287,10 +320,7 @@
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_SRPI: #endif
case USB_INT_RXSTPI:
// TODO
return false;
} }
return false; return false;

@ -50,6 +50,7 @@
/* Includes: */ /* Includes: */
#include "../../../Common/Common.h" #include "../../../Common/Common.h"
#include "USBMode.h"
/* Preprocessor Checks and Defines: */ /* Preprocessor Checks and Defines: */
#if !defined(__INCLUDE_FROM_USB_DRIVER) #if !defined(__INCLUDE_FROM_USB_DRIVER)

@ -43,6 +43,7 @@
/* Includes: */ /* Includes: */
#include "../../../Common/Common.h" #include "../../../Common/Common.h"
#include "USBMode.h"
/* Preprocessor Checks: */ /* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_USB_DRIVER) #if !defined(__INCLUDE_FROM_USB_DRIVER)

@ -43,11 +43,11 @@
/* Includes: */ /* Includes: */
#include "../../../Common/Common.h" #include "../../../Common/Common.h"
#include "USBMode.h"
#include "USBController.h" #include "USBController.h"
#include "Events.h" #include "Events.h"
#include "StdRequestType.h" #include "StdRequestType.h"
#include "StdDescriptors.h" #include "StdDescriptors.h"
#include "USBMode.h"
#if defined(USB_CAN_BE_DEVICE) #if defined(USB_CAN_BE_DEVICE)
#include "DeviceStandardReq.h" #include "DeviceStandardReq.h"

Loading…
Cancel
Save