All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
cpu_clock.h File Reference

Common implementations and headers for ATxmega family based micro-controllers. More...

Detailed Description

Common implementations and headers for ATxmega family based micro-controllers.

Basic definitions for the ATxmega common clock module

When ever you want to do something hardware related, that is accessing MCUs registers directly, just include this file. It will then make sure that the MCU specific headers are included.

Author
Gerson Fernando Budke nando.nosp@m.jve@.nosp@m.gmail.nosp@m..com

Definition in file cpu_clock.h.

#include <stdint.h>
+ Include dependency graph for cpu_clock.h:

Go to the source code of this file.

enum  {
  CPU_ATXMEGA_CLK_SCALE_DIV1 = 0 , CPU_ATXMEGA_CLK_SCALE_DIV2 = 1 , CPU_ATXMEGA_CLK_SCALE_DIV4 = 3 , CPU_ATXMEGA_CLK_SCALE_DIV8 = 5 ,
  CPU_ATXMEGA_CLK_SCALE_DIV16 = 7 , CPU_ATXMEGA_CLK_SCALE_DIV32 = 9 , CPU_ATXMEGA_CLK_SCALE_DIV64 = 11 , CPU_ATXMEGA_CLK_SCALE_DIV128 = 13 ,
  CPU_ATXMEGA_CLK_SCALE_DIV256 = 15 , CPU_ATXMEGA_CLK_SCALE_DIV512 = 17
}
 ATxmega system clock prescaler settings. More...
 
enum  { CPU_ATXMEGA_BUS_SCALE_DIV1_1 = 0 , CPU_ATXMEGA_BUS_SCALE_DIV1_2 = 1 , CPU_ATXMEGA_BUS_SCALE_DIV4_1 = 2 , CPU_ATXMEGA_BUS_SCALE_DIV2_2 = 3 }
 
static void atxmega_set_prescaler (uint8_t clk_scale, uint8_t bus_scale)
 Initializes system clock prescaler.
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

ATxmega system clock prescaler settings.

Some CPUs may not support the highest prescaler settings

Definition at line 38 of file cpu_clock.h.

◆ anonymous enum

anonymous enum

Definition at line 51 of file cpu_clock.h.

Function Documentation

◆ atxmega_set_prescaler()

static void atxmega_set_prescaler ( uint8_t  clk_scale,
uint8_t  bus_scale 
)
inlinestatic

Initializes system clock prescaler.

Definition at line 61 of file cpu_clock.h.