rcc 1.0
RCC - RGB LED Color Cube Documentation
Loading...
Searching...
No Matches
system.h
Go to the documentation of this file.
1
18
19#ifndef SYSTEM_H_
20#define SYSTEM_H_
21
22#ifndef SYSTEM_CLOCK
39 #define SYSTEM_CLOCK CLKCTRL_CLKSEL_OSC20M_gc
40
59 #ifndef SYSTEM_CLOCK_BIT
60 #if SYSTEM_CLOCK == CLKCTRL_CLKSEL_OSC20M_gc
61 #define SYSTEM_CLOCK_BIT CLKCTRL_OSC20MS_bm
62 #elif SYSTEM_CLOCK == CLKCTRL_CLKSEL_OSCULP32K_gc
63 #define SYSTEM_CLOCK_BIT CLKCTRL_OSC32KS_bm
64 #elif SYSTEM_CLOCK == CLKCTRL_CLKSEL_EXTCLK_gc
65 #define SYSTEM_CLOCK_BIT CLKCTRL_EXTS_bm
66 #endif
67 #endif
68#endif
69
70#ifndef SYSTEM_PER_CLOCK_PRESCALER
94 #define SYSTEM_PER_CLOCK_PRESCALER CLKCTRL_PDIV_2X_gc
95#endif
96
97#include <avr/io.h>
98
99void system_init(void);
100
101#endif /* SYSTEM_H_ */
void system_init(void)
Initializes the system clock configuration of the microcontroller.
Definition system.c:45