aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.h
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2011-10-30 07:09:20 +0000
committerDean Camera <dean@fourwalledcubicle.com>2011-10-30 07:09:20 +0000
commit028a3c4ab3f73af3c63d05379002150c8ccd4982 (patch)
tree1f816bc9f792eae7affff8f12fb36ea6f5767362 /LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.h
parent6519aaa571463ba0933b3d8a98251f113c51c7e0 (diff)
downloadlufa-028a3c4ab3f73af3c63d05379002150c8ccd4982.tar.gz
lufa-028a3c4ab3f73af3c63d05379002150c8ccd4982.tar.bz2
lufa-028a3c4ab3f73af3c63d05379002150c8ccd4982.zip
XMEGA port improvements; connection and disconnection are now detected correctly. Fixed incorrect interrupt priority levels being set for XMEGA devices.
Diffstat (limited to 'LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.h')
-rw-r--r--LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.h b/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.h
index 79e2438be..abaf0578a 100644
--- a/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.h
+++ b/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.h
@@ -57,8 +57,20 @@
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
+ /* Type Defines: */
+ typedef struct
+ {
+ uint16_t FrameNum;
+ struct
+ {
+ USB_EP_t OUT;
+ USB_EP_t IN;
+ } Endpoints[16];
+ } ATTR_PACKED USB_EndpointTable_t;
+
/* External Variables: */
- extern USB_EP_TABLE_t USB_EndpointTable;
+ extern USB_EndpointTable_t USB_EndpointTable;
+
#endif
/* Includes: */
@@ -90,17 +102,17 @@
/** Sets the USB bus interrupt priority level to be low priority. The USB bus interrupt is used for Start of Frame events, bus suspend
* and resume events, bus reset events and other events related to the management of the USB bus.
*/
- #define USB_OPT_BUSEVENT_PRILOW ((0 << 1) | (0 << 1))
+ #define USB_OPT_BUSEVENT_PRILOW ((0 << 2) | (0 << 1))
/** Sets the USB bus interrupt priority level to be medium priority. The USB bus interrupt is used for Start of Frame events, bus suspend
* and resume events, bus reset events and other events related to the management of the USB bus.
*/
- #define USB_OPT_BUSEVENT_PRIMED ((0 << 1) | (1 << 1))
+ #define USB_OPT_BUSEVENT_PRIMED ((0 << 2) | (1 << 1))
/** Sets the USB bus interrupt priority level to be high priority. The USB bus interrupt is used for Start of Frame events, bus suspend
* and resume events, bus reset events and other events related to the management of the USB bus.
*/
- #define USB_OPT_BUSEVENT_PRIHIGH ((1 << 1) | (0 << 1))
+ #define USB_OPT_BUSEVENT_PRIHIGH ((1 << 2) | (0 << 1))
//@}
#if !defined(USB_STREAM_TIMEOUT_MS) || defined(__DOXYGEN__)
@@ -263,7 +275,7 @@
static inline void USB_Controller_Enable(void) ATTR_ALWAYS_INLINE;
static inline void USB_Controller_Enable(void)
{
- USB.CTRLA |= (USB_ENABLE_bm | USB_STFRNUM_bm | USB_MAXEP_gm);
+ USB.CTRLA |= USB_ENABLE_bm;
}
static inline void USB_Controller_Disable(void) ATTR_ALWAYS_INLINE;