Go to the documentation of this file.
66 #define PLLx24 ( (0<<PLLP2) | (0<<PLLP1) | (0<<PLLP0) )
67 #define PLLx12 ( (0<<PLLP2) | (0<<PLLP1) | (1<<PLLP0) )
68 #define PLLx08 ( (0<<PLLP2) | (1<<PLLP1) | (0<<PLLP0) )
69 #define PLLx06 ( (0<<PLLP2) | (1<<PLLP1) | (1<<PLLP0) )
70 #define PLLx04 ( (1<<PLLP2) | (0<<PLLP1) | (0<<PLLP0) )
71 #define PLLx03 ( (1<<PLLP2) | (0<<PLLP1) | (1<<PLLP0) )
72 #define PLLx04_8 ( (1<<PLLP2) | (1<<PLLP1) | (0<<PLLP0) )
73 #define PLLx02 ( (1<<PLLP2) | (1<<PLLP1) | (1<<PLLP0) )
80 #define Start_pll(clockfactor) \
81 (PLLCSR = ( clockfactor | (1<<PLLE) ))
84 #define Is_pll_ready() (PLLCSR & (1<<PLOCK) )
87 #define Wait_pll_ready() while (!(PLLCSR & (1<<PLOCK)))
90 #define Stop_pll() (PLLCSR &= (~(1<<PLLE)) )
97 #define Pll_start_auto() Start_pll(PLLx24)
99 #define Pll_start_auto() Start_pll(PLLx12)
101 #define Pll_start_auto() Start_pll(PLLx08)
105 #define Pll_start_auto() Start_pll(PLLx06)
107 #define Pll_start_auto() Start_pll(PLLx04)
109 #define Pll_start_auto() Start_pll(PLLx03)
111 #define Pll_start_auto() Start_pll(PLLx04_8)
113 #define Pll_start_auto() Start_pll(PLLx02)
115 #error "FOSC should be defined in config.h"