pll_drv.h

Go to the documentation of this file.
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 //_____ I N C L U D E S ____________________________________________________
00018 
00022 //_____ M A C R O S ________________________________________________________
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 //_____ D E F I N I T I O N S ______________________________________________
00040 
00041 //_____ F U N C T I O N S __________________________________________________
00042 
00044 #endif  // PLL_DRV_H

Generated on Wed Jul 12 16:55:10 2006 for Atmel BLDC Sensorless on ATAVRMC100 by  doxygen 1.4.7