X-Git-Url: http://git.linex4red.de/pub/lufa.git/blobdiff_plain/5d9403fde4e0d89313121fcd5fa4cfc6c4ddfc4e..f3049d958e4ef6cc919ff5f1302c1b384fed6bbf:/LUFA/Platform/UC3/ClockManagement.h diff --git a/LUFA/Platform/UC3/ClockManagement.h b/LUFA/Platform/UC3/ClockManagement.h index b6b6ece27..f90f32c39 100644 --- a/LUFA/Platform/UC3/ClockManagement.h +++ b/LUFA/Platform/UC3/ClockManagement.h @@ -54,14 +54,14 @@ * void main(void) * { * // Start the master external oscillator which will be used as the main clock reference - * AVR32CLK_StartExternalOscillator(0, EXOSC_MODE_8MHZ_OR_MORE, EXOSC_START_0CLK); + * UC3CLK_StartExternalOscillator(0, EXOSC_MODE_8MHZ_OR_MORE, EXOSC_START_0CLK); * * // Start the PLL for the CPU clock, switch CPU to it - * AVR32CLK_StartPLL(0, CLOCK_SRC_OSC0, 12000000, F_CPU); - * AVR32CLK_SetCPUClockSource(CLOCK_SRC_PLL0, F_CPU); + * UC3CLK_StartPLL(0, CLOCK_SRC_OSC0, 12000000, F_CPU); + * UC3CLK_SetCPUClockSource(CLOCK_SRC_PLL0, F_CPU); * * // Start the PLL for the USB Generic Clock module - * AVR32CLK_StartPLL(1, CLOCK_SRC_OSC0, 12000000, 48000000); + * UC3CLK_StartPLL(1, CLOCK_SRC_OSC0, 12000000, 48000000); * } * \endcode * @@ -119,16 +119,16 @@ * * \param[in] Channel Index of the external oscillator to start. * \param[in] Type Type of clock attached to the given oscillator channel, a value from \ref UC3_Extern_OSC_ClockTypes_t. - * \param[in] Startup Statup time of the external oscillator, a value from \ref UC3_Extern_OSC_ClockStartup_t. + * \param[in] Startup Startup time of the external oscillator, a value from \ref UC3_Extern_OSC_ClockStartup_t. * * \return Boolean \c true if the external oscillator was successfully started, \c false if invalid parameters specified. */ - static inline bool AVR32CLK_StartExternalOscillator(const uint8_t Channel, - const uint8_t Type, - const uint8_t Startup) ATTR_ALWAYS_INLINE; - static inline bool AVR32CLK_StartExternalOscillator(const uint8_t Channel, - const uint8_t Type, - const uint8_t Startup) + static inline bool UC3CLK_StartExternalOscillator(const uint8_t Channel, + const uint8_t Type, + const uint8_t Startup) ATTR_ALWAYS_INLINE; + static inline bool UC3CLK_StartExternalOscillator(const uint8_t Channel, + const uint8_t Type, + const uint8_t Startup) { switch (Channel) { @@ -154,8 +154,8 @@ * * \param[in] Channel Index of the external oscillator to stop. */ - static inline void AVR32CLK_StopExternalOscillator(const uint8_t Channel) ATTR_ALWAYS_INLINE; - static inline void AVR32CLK_StopExternalOscillator(const uint8_t Channel) + static inline void UC3CLK_StopExternalOscillator(const uint8_t Channel) ATTR_ALWAYS_INLINE; + static inline void UC3CLK_StopExternalOscillator(const uint8_t Channel) { AVR32_PM.mcctrl &= ~(1 << (AVR32_PM_MCCTRL_OSC0EN_OFFSET + Channel)); } @@ -171,14 +171,14 @@ * * \return Boolean \c true if the PLL was successfully started, \c false if invalid parameters specified. */ - static inline bool AVR32CLK_StartPLL(const uint8_t Channel, - const uint8_t Source, - const uint32_t SourceFreq, - const uint32_t Frequency) ATTR_ALWAYS_INLINE; - static inline bool AVR32CLK_StartPLL(const uint8_t Channel, - const uint8_t Source, - const uint32_t SourceFreq, - const uint32_t Frequency) + static inline bool UC3CLK_StartPLL(const uint8_t Channel, + const uint8_t Source, + const uint32_t SourceFreq, + const uint32_t Frequency) ATTR_ALWAYS_INLINE; + static inline bool UC3CLK_StartPLL(const uint8_t Channel, + const uint8_t Source, + const uint32_t SourceFreq, + const uint32_t Frequency) { if (SourceFreq > Frequency) return false; @@ -207,8 +207,8 @@ * * \param[in] Channel Index of the PLL to stop. */ - static inline void AVR32CLK_StopPLL(const uint8_t Channel) ATTR_ALWAYS_INLINE; - static inline void AVR32CLK_StopPLL(const uint8_t Channel) + static inline void UC3CLK_StopPLL(const uint8_t Channel) ATTR_ALWAYS_INLINE; + static inline void UC3CLK_StopPLL(const uint8_t Channel) { AVR32_PM.PLL[Channel].pllen = false; } @@ -222,14 +222,14 @@ * * \return Boolean \c true if the Generic Clock was successfully started, \c false if invalid parameters specified. */ - static inline bool AVR32CLK_StartGenericClock(const uint8_t Channel, - const uint8_t Source, - const uint32_t SourceFreq, - const uint32_t Frequency) ATTR_ALWAYS_INLINE; - static inline bool AVR32CLK_StartGenericClock(const uint8_t Channel, - const uint8_t Source, - const uint32_t SourceFreq, - const uint32_t Frequency) + static inline bool UC3CLK_StartGenericClock(const uint8_t Channel, + const uint8_t Source, + const uint32_t SourceFreq, + const uint32_t Frequency) ATTR_ALWAYS_INLINE; + static inline bool UC3CLK_StartGenericClock(const uint8_t Channel, + const uint8_t Source, + const uint32_t SourceFreq, + const uint32_t Frequency) { if (Channel >= AVR32_PM_GCLK_NUM) return false; @@ -270,10 +270,10 @@ * * \param[in] Channel Index of the generic clock to stop. * - * \return Boolean \c true if the generic clock was sucessfully stopped, \c false if invalid parameters specified. + * \return Boolean \c true if the generic clock was successfully stopped, \c false if invalid parameters specified. */ - static inline bool AVR32CLK_StopGenericClock(const uint8_t Channel) ATTR_ALWAYS_INLINE; - static inline bool AVR32CLK_StopGenericClock(const uint8_t Channel) + static inline bool UC3CLK_StopGenericClock(const uint8_t Channel) ATTR_ALWAYS_INLINE; + static inline bool UC3CLK_StopGenericClock(const uint8_t Channel) { if (Channel >= AVR32_PM_GCLK_NUM) return false; @@ -291,12 +291,12 @@ * \param[in] Source Clock source for the CPU core, a value from \ref UC3_System_ClockSource_t. * \param[in] SourceFreq Frequency of the CPU core's clock source, in Hz. * - * \return Boolean \c true if the CPU core clock was sucessfully altered, \c false if invalid parameters specified. + * \return Boolean \c true if the CPU core clock was successfully altered, \c false if invalid parameters specified. */ - static inline bool AVR32CLK_SetCPUClockSource(const uint8_t Source, - const uint32_t SourceFreq) ATTR_ALWAYS_INLINE; - static inline bool AVR32CLK_SetCPUClockSource(const uint8_t Source, - const uint32_t SourceFreq) + static inline bool UC3CLK_SetCPUClockSource(const uint8_t Source, + const uint32_t SourceFreq) ATTR_ALWAYS_INLINE; + static inline bool UC3CLK_SetCPUClockSource(const uint8_t Source, + const uint32_t SourceFreq) { if (SourceFreq > AVR32_PM_CPU_MAX_FREQ) return false;