aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Platform
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2011-07-14 02:58:07 +0000
committerDean Camera <dean@fourwalledcubicle.com>2011-07-14 02:58:07 +0000
commitf4528c4aefcadd3342e9de2360d4c48196394fde (patch)
tree05782a8247534fc7a08175fe04ec9c03dc48b480 /LUFA/Platform
parent13951ab043c43d0e3ea4ac0ae6a641fd88e7fcb0 (diff)
downloadlufa-f4528c4aefcadd3342e9de2360d4c48196394fde.tar.gz
lufa-f4528c4aefcadd3342e9de2360d4c48196394fde.tar.bz2
lufa-f4528c4aefcadd3342e9de2360d4c48196394fde.zip
Add high speed USB support for the UC3 devices containing a high speed USB controller.
Add device support preprocessor checks and use symbolic bit names in the UC3 platform clock management driver.
Diffstat (limited to 'LUFA/Platform')
-rw-r--r--LUFA/Platform/UC3/ClockManagement.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/LUFA/Platform/UC3/ClockManagement.h b/LUFA/Platform/UC3/ClockManagement.h
index 60a3d18f4..608702069 100644
--- a/LUFA/Platform/UC3/ClockManagement.h
+++ b/LUFA/Platform/UC3/ClockManagement.h
@@ -233,19 +233,19 @@
switch (Source)
{
case CLOCK_SRC_OSC0:
- AVR32_PM.GCCTRL[Channel].pllsel = 0;
+ AVR32_PM.GCCTRL[Channel].pllsel = false;
AVR32_PM.GCCTRL[Channel].oscsel = 0;
break;
case CLOCK_SRC_OSC1:
- AVR32_PM.GCCTRL[Channel].pllsel = 0;
+ AVR32_PM.GCCTRL[Channel].pllsel = false;
AVR32_PM.GCCTRL[Channel].oscsel = 1;
break;
case CLOCK_SRC_PLL0:
- AVR32_PM.GCCTRL[Channel].pllsel = 1;
+ AVR32_PM.GCCTRL[Channel].pllsel = true;
AVR32_PM.GCCTRL[Channel].oscsel = 0;
break;
case CLOCK_SRC_PLL1:
- AVR32_PM.GCCTRL[Channel].pllsel = 1;
+ AVR32_PM.GCCTRL[Channel].pllsel = true;
AVR32_PM.GCCTRL[Channel].oscsel = 1;
break;
default:
@@ -291,15 +291,21 @@
switch (Source)
{
+ #if defined(AVR32_PM_MCCTRL_MCSEL_SLOW)
case CLOCK_SRC_SLOW_CLK:
- AVR32_PM.MCCTRL.mcsel = 0;
+ AVR32_PM.MCCTRL.mcsel = AVR32_PM_MCCTRL_MCSEL_SLOW;
break;
+ #endif
+ #if defined(AVR32_PM_MCCTRL_MCSEL_OSC0)
case CLOCK_SRC_OSC0:
- AVR32_PM.MCCTRL.mcsel = 1;
+ AVR32_PM.MCCTRL.mcsel = AVR32_PM_MCCTRL_MCSEL_OSC0;
break;
+ #endif
+ #if defined(AVR32_PM_MCCTRL_MCSEL_PLL0)
case CLOCK_SRC_PLL0:
- AVR32_PM.MCCTRL.mcsel = 2;
+ AVR32_PM.MCCTRL.mcsel = AVR32_PM_MCCTRL_MCSEL_PLL0;
break;
+ #endif
default:
return false;
}