diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2013-01-27 19:35:40 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2013-01-27 19:35:40 +0000 |
commit | fb18c315d02303e3f32fda41fcde3b16e747f10b (patch) | |
tree | f828d9d8f650227710daacc502a3c8a41c61f199 /LUFA/Drivers/USB/Core/XMEGA | |
parent | f8f8ac0b1a4745da8e5311ddb0bd395b7dd18ba8 (diff) | |
download | lufa-fb18c315d02303e3f32fda41fcde3b16e747f10b.tar.gz lufa-fb18c315d02303e3f32fda41fcde3b16e747f10b.tar.bz2 lufa-fb18c315d02303e3f32fda41fcde3b16e747f10b.zip |
Fix broken XMEGA USB support.
Diffstat (limited to 'LUFA/Drivers/USB/Core/XMEGA')
-rw-r--r-- | LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h | 8 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.h | 9 |
2 files changed, 12 insertions, 5 deletions
diff --git a/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h b/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h index d2d506cd7..6e2380a17 100644 --- a/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h +++ b/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h @@ -205,13 +205,13 @@ static inline void USB_Device_SetDeviceAddress(const uint8_t Address) ATTR_ALWAYS_INLINE; static inline void USB_Device_SetDeviceAddress(const uint8_t Address) { - USB.ADDR = Address; + /* No implementation for XMEGA architecture */ } - static inline void USB_Device_EnableDeviceAddress(void) ATTR_ALWAYS_INLINE; - static inline void USB_Device_EnableDeviceAddress(void) + static inline void USB_Device_EnableDeviceAddress(const uint8_t Address) ATTR_ALWAYS_INLINE; + static inline void USB_Device_EnableDeviceAddress(const uint8_t Address) { - /* No implementation for XMEGA architecture */ + USB.ADDR = Address; } static inline bool USB_Device_IsAddressSet(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT; diff --git a/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.h b/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.h index 84966ad6f..2198b53c7 100644 --- a/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.h +++ b/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.h @@ -57,6 +57,13 @@ /* Private Interface - For use in library only: */ #if !defined(__DOXYGEN__) + /* Macros: */ + #if defined(MAX_ENDPOINT_INDEX) + #define ENDPOINT_TABLE_COUNT (MAX_ENDPOINT_INDEX + 1) + #else + #define ENDPOINT_TABLE_COUNT 16 + #endif + /* Type Defines: */ typedef struct { @@ -64,7 +71,7 @@ { USB_EP_t OUT; USB_EP_t IN; - } Endpoints[16]; + } Endpoints[ENDPOINT_TABLE_COUNT]; uint16_t FrameNum; } ATTR_PACKED USB_EndpointTable_t; |