Rename AVR32CLK_*() clock management functions to UC3CLK_*() to be in line with the...
authorDean Camera <dean@fourwalledcubicle.com>
Wed, 19 Sep 2012 18:42:31 +0000 (18:42 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Wed, 19 Sep 2012 18:42:31 +0000 (18:42 +0000)
LUFA/Platform/UC3/ClockManagement.h

index 7be71e1..f90f32c 100644 (file)
  *             void main(void)
  *             {
  *                     // Start the master external oscillator which will be used as the main clock reference
  *             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
  *          
  *                     // 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
  *          
  *                     // 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
  *
  *             }
  *  \endcode
  *
                         *
                         *  \return Boolean \c true if the external oscillator was successfully started, \c false if invalid parameters specified.
                         */
                         *
                         *  \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)
                                {
                        {
                                switch (Channel)
                                {
                         *
                         *  \param[in] Channel  Index of the external oscillator to stop.
                         */
                         *
                         *  \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));
                        }
                        {
                                AVR32_PM.mcctrl &= ~(1 << (AVR32_PM_MCCTRL_OSC0EN_OFFSET + Channel));
                        }
                         *
                         *  \return Boolean \c true if the PLL was successfully started, \c false if invalid parameters specified.
                         */
                         *
                         *  \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;
                        {
                                if (SourceFreq > Frequency)
                                  return false;
                         *
                         *  \param[in] Channel  Index of the PLL to stop.
                         */
                         *
                         *  \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;
                        }
                        {
                                AVR32_PM.PLL[Channel].pllen = false;
                        }
                         *
                         *  \return Boolean \c true if the Generic Clock was successfully started, \c false if invalid parameters specified.
                         */
                         *
                         *  \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;
                        {
                                if (Channel >= AVR32_PM_GCLK_NUM)
                                  return false;
                         *
                         *  \return Boolean \c true if the generic clock was successfully 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;
                        {
                                if (Channel >= AVR32_PM_GCLK_NUM)
                                  return false;
                         *
                         *  \return Boolean \c true if the CPU core clock was successfully 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;
                        {
                                if (SourceFreq > AVR32_PM_CPU_MAX_FREQ)
                                  return false;