Loading...
Searching...
No Matches
cpu_clock.h File Reference

Common clock support for ATmega family based micro-controllers. More...

Detailed Description

Common clock support for ATmega family based micro-controllers.

Basic definitions for the ATmega common clock

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
Stefan Pfeiffer stefa.nosp@m.n.pf.nosp@m.eiffe.nosp@m.r@fu.nosp@m.-berl.nosp@m.in.d.nosp@m.e
Hauke Petersen hauke.nosp@m..pet.nosp@m.ersen.nosp@m.@fu-.nosp@m.berli.nosp@m.n.de
Hinnerk van Bruinehsen h.v.b.nosp@m.ruin.nosp@m.ehsen.nosp@m.@fu-.nosp@m.berli.nosp@m.n.de
Kaspar Schleiser kaspa.nosp@m.r@sc.nosp@m.hleis.nosp@m.er.d.nosp@m.e
Josua Arndt jarnd.nosp@m.t@ia.nosp@m.s.rwt.nosp@m.h-aa.nosp@m.chen..nosp@m.de
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_ATMEGA_CLK_SCALE_DIV1 = 0 , CPU_ATMEGA_CLK_SCALE_DIV2 = 1 , CPU_ATMEGA_CLK_SCALE_DIV4 = 2 , CPU_ATMEGA_CLK_SCALE_DIV8 = 3 ,
  CPU_ATMEGA_CLK_SCALE_DIV16 = 4 , CPU_ATMEGA_CLK_SCALE_DIV32 = 5 , CPU_ATMEGA_CLK_SCALE_DIV64 = 6 , CPU_ATMEGA_CLK_SCALE_DIV128 = 7 ,
  CPU_ATMEGA_CLK_SCALE_DIV256 = 8 , CPU_ATMEGA_CLK_SCALE_DIV512 = 9
}
 ATmega system clock prescaler settings. More...
 
static void atmega_set_prescaler (uint8_t clk_scale)
 Initializes system clock prescaler.
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

ATmega system clock prescaler settings.

Some CPUs may not support the highest prescaler settings

Definition at line 47 of file cpu_clock.h.

Function Documentation

◆ atmega_set_prescaler()

static void atmega_set_prescaler ( uint8_t  clk_scale)
inlinestatic

Initializes system clock prescaler.

Definition at line 63 of file cpu_clock.h.