return false;\r
}\r
\r
- AVR32_PM.mcctrl |= (1 << (AVR32_PM_MCCTRL_OSC0EN_OFFSET + Channel));\r
+ AVR32_PM.mcctrl |= (1 << (AVR32_PM_MCCTRL_OSC0EN_OFFSET + Channel));\r
\r
while (!(AVR32_PM.poscsr & (1 << (AVR32_PM_POSCSR_OSC0RDY_OFFSET + Channel))));\r
return true;\r
static inline void AVR32CLK_StopExternalOscillator(const uint8_t Channel) ATTR_ALWAYS_INLINE;\r
static inline void AVR32CLK_StopExternalOscillator(const uint8_t Channel)\r
{\r
- AVR32_PM.mcctrl &= ~(1 << (AVR32_PM_MCCTRL_OSC0EN_OFFSET + Channel));\r
+ AVR32_PM.mcctrl &= ~(1 << (AVR32_PM_MCCTRL_OSC0EN_OFFSET + Channel));\r
}\r
\r
/** Starts the given PLL of the UC3 microcontroller, with the given options. This routine blocks until the PLL is ready for use.\r
return false;\r
}\r
\r
- AVR32_PM.PLL[Channel].pllmul = (Frequency / SourceFreq) ? (((Frequency / SourceFreq) - 1) / 2) : 0;\r
- AVR32_PM.PLL[Channel].plldiv = 0;\r
- AVR32_PM.PLL[Channel].pllen = true;\r
+ AVR32_PM.PLL[Channel].pllmul = (Frequency / SourceFreq) ? (((Frequency / SourceFreq) - 1) / 2) : 0;\r
+ AVR32_PM.PLL[Channel].plldiv = 0;\r
+ AVR32_PM.PLL[Channel].pllen = true;\r
\r
while (!(AVR32_PM.poscsr & (1 << (AVR32_PM_POSCSR_LOCK0_OFFSET + Channel))));\r
return true;\r
static inline void AVR32CLK_StopPLL(const uint8_t Channel) ATTR_ALWAYS_INLINE;\r
static inline void AVR32CLK_StopPLL(const uint8_t Channel)\r
{\r
- AVR32_PM.PLL[Channel].pllen = false;\r
+ AVR32_PM.PLL[Channel].pllen = false;\r
}\r
\r
/** Starts the given Generic Clock of the UC3 microcontroller, with the given options.\r
if (SourceFreq < Frequency)\r
return false;\r
\r
- AVR32_PM.GCCTRL[Channel].diven = (SourceFreq > Frequency) ? true : false;\r
- AVR32_PM.GCCTRL[Channel].div = (((SourceFreq / Frequency) - 1) / 2);\r
- AVR32_PM.GCCTRL[Channel].cen = true;\r
+ AVR32_PM.GCCTRL[Channel].diven = (SourceFreq > Frequency) ? true : false;\r
+ AVR32_PM.GCCTRL[Channel].div = (((SourceFreq / Frequency) - 1) / 2);\r
+ AVR32_PM.GCCTRL[Channel].cen = true;\r
\r
return true;\r
}\r
static inline void AVR32CLK_StopGenericClock(const uint8_t Channel) ATTR_ALWAYS_INLINE;\r
static inline void AVR32CLK_StopGenericClock(const uint8_t Channel)\r
{\r
- AVR32_PM.GCCTRL[Channel].cen = false;\r
+ AVR32_PM.GCCTRL[Channel].cen = false;\r
}\r
\r
/** Sets the clock source for the main microcontroller core. The given clock source should be configured\r
switch (Source)\r
{\r
case CLOCK_SRC_SLOW_CLK:\r
- AVR32_PM.MCCTRL.mcsel = 0;\r
+ AVR32_PM.MCCTRL.mcsel = 0;\r
break;\r
case CLOCK_SRC_OSC0:\r
- AVR32_PM.MCCTRL.mcsel = 1;\r
+ AVR32_PM.MCCTRL.mcsel = 1;\r
break;\r
case CLOCK_SRC_PLL0:\r
- AVR32_PM.MCCTRL.mcsel = 2;\r
+ AVR32_PM.MCCTRL.mcsel = 2;\r
break;\r
default:\r
return false;\r