00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef PLL_DRV_H
00015 #define PLL_DRV_H
00016
00017
00018
00022
00023
00027
00028 #define Start_pll_64_mega() (PLLCSR = 0x06)
00029 #define Start_pll_32_mega() (PLLCSR = 0x02)
00030
00031 #define Start_pll(frequency) \
00032 (PLLCSR = ( (((frequency>>6)&1)<<2) | (1<<1) ) )
00033 #define Is_pll_ready() (PLLCSR & (1<<PLLOCK) )
00034 #define Wait_pll_ready() while (!(PLLCSR & (1<<PLLOCK)))
00035 #define Stop_pll() (PLLCSR = 0x00)
00036
00038
00039
00040
00041
00042
00044 #endif // PLL_DRV_H