Go to the documentation of this file.
67 #define PLLx24 ( (0<<PLLP2) | (0<<PLLP1) | (0<<PLLP0) )
68 #define PLLx12 ( (0<<PLLP2) | (0<<PLLP1) | (1<<PLLP0) )
69 #define PLLx08 ( (0<<PLLP2) | (1<<PLLP1) | (0<<PLLP0) )
70 #define PLLx06 ( (0<<PLLP2) | (1<<PLLP1) | (1<<PLLP0) )
71 #define PLLx04 ( (1<<PLLP2) | (0<<PLLP1) | (0<<PLLP0) )
72 #define PLLx03 ( (1<<PLLP2) | (0<<PLLP1) | (1<<PLLP0) )
73 #define PLLx04_8 ( (1<<PLLP2) | (1<<PLLP1) | (0<<PLLP0) )
74 #define PLLx02 ( (1<<PLLP2) | (1<<PLLP1) | (1<<PLLP0) )
81 #define Start_pll(clockfactor) \
82 (PLLCSR = ( clockfactor | (1<<PLLE) ))
85 #define Is_pll_ready() (PLLCSR & (1<<PLOCK) )
88 #define Wait_pll_ready() while (!(PLLCSR & (1<<PLOCK)))
91 #define Stop_pll() (PLLCSR &= (~(1<<PLLE)) )
98 #define Pll_start_auto() Start_pll(PLLx24)
100 #define Pll_start_auto() Start_pll(PLLx12)
102 #define Pll_start_auto() Start_pll(PLLx08)
106 #define Pll_start_auto() Start_pll(PLLx06)
108 #define Pll_start_auto() Start_pll(PLLx04)
110 #define Pll_start_auto() Start_pll(PLLx03)
112 #define Pll_start_auto() Start_pll(PLLx04_8)
114 #define Pll_start_auto() Start_pll(PLLx02)
116 #error "FOSC should be defined in config.h"