aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2011-07-14 11:31:12 +0000
committerDean Camera <dean@fourwalledcubicle.com>2011-07-14 11:31:12 +0000
commitffa8b430c1886b696e1e94039e6a9343b5b81dbd (patch)
tree3a3734b821fb7e4406a0868c3b1c498b212d0a74 /LUFA/Drivers
parentc8e517646538669c290c5566231c8ec2b02f33bc (diff)
downloadlufa-ffa8b430c1886b696e1e94039e6a9343b5b81dbd.tar.gz
lufa-ffa8b430c1886b696e1e94039e6a9343b5b81dbd.tar.bz2
lufa-ffa8b430c1886b696e1e94039e6a9343b5b81dbd.zip
Complete initial revision of the XMEGA Clock Management platform driver.
Start the USB clock source generator inside USB_ResetInterface() for XMEGA devices.
Diffstat (limited to 'LUFA/Drivers')
-rw-r--r--LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.c2
-rw-r--r--LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.c b/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.c
index 154020c41..daace9697 100644
--- a/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.c
+++ b/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.c
@@ -43,7 +43,7 @@ bool Endpoint_ConfigureEndpoint_Prv(const uint8_t Number,
const uint8_t UECFG0XData,
const uint8_t UECFG1XData)
{
- // TODO
+ return false; // TODO
}
void Endpoint_ClearEndpoints(void)
diff --git a/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.c b/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.c
index 2556ee858..c8839c9d0 100644
--- a/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.c
+++ b/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.c
@@ -78,6 +78,11 @@ void USB_Disable(void)
void USB_ResetInterface(void)
{
+ if (USB_Options & USB_DEVICE_OPT_LOWSPEED)
+ CLK.USBCTRL = ((((F_USB / 6000000) - 1) << CLK_USBPSDIV_gp) | CLK_USBSRC_PLL_gc | CLK_USBEN_bm);
+ else
+ CLK.USBCTRL = ((((F_USB / 48000000) - 1) << CLK_USBPSDIV_gp) | CLK_USBSRC_PLL_gc | CLK_USBEN_bm);
+
USB_INT_DisableAllInterrupts();
USB_INT_ClearAllInterrupts();