Rename AVR32CLK_*() clock management functions to UC3CLK_*() to be in line with the naming scheme of the rest of the platform modules.

pull/1469/head
Dean Camera 12 years ago
parent 11fa17a7db
commit 7d259eac4c

@ -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
*
@ -123,10 +123,10 @@
*
* \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,
static inline bool UC3CLK_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,
static inline bool UC3CLK_StartExternalOscillator(const uint8_t Channel,
const uint8_t Type,
const uint8_t Startup)
{
@ -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,11 +171,11 @@
*
* \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,
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 AVR32CLK_StartPLL(const uint8_t Channel,
static inline bool UC3CLK_StartPLL(const uint8_t Channel,
const uint8_t Source,
const uint32_t SourceFreq,
const uint32_t Frequency)
@ -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,11 +222,11 @@
*
* \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,
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 AVR32CLK_StartGenericClock(const uint8_t Channel,
static inline bool UC3CLK_StartGenericClock(const uint8_t Channel,
const uint8_t Source,
const uint32_t SourceFreq,
const uint32_t Frequency)
@ -272,8 +272,8 @@
*
* \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;
@ -293,9 +293,9 @@
*
* \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,
static inline bool UC3CLK_SetCPUClockSource(const uint8_t Source,
const uint32_t SourceFreq) ATTR_ALWAYS_INLINE;
static inline bool AVR32CLK_SetCPUClockSource(const uint8_t Source,
static inline bool UC3CLK_SetCPUClockSource(const uint8_t Source,
const uint32_t SourceFreq)
{
if (SourceFreq > AVR32_PM_CPU_MAX_FREQ)

Loading…
Cancel
Save