#include "../config.h" #ifndef _PLL_DRV_H_ #define _PLL_DRV_H_ /*_____ I N C L U D E S ____________________________________________________*/ /*_____ M A C R O S ________________________________________________________*/ /*_____ D E F I N I T I O N ________________________________________________*/ /*_____ D E C L A R A T I O N ______________________________________________*/ #define Pll_reset() (PLLCON &= MSK_PLLRES) #define Pll_enable() (PLLCON |= MSK_PLLEN) #define Pll_stop() (PLLCON &= ~MSK_PLLEN) #define Pll_set_ndiv(n) (PLLNDIV = n) #define Pll_set_rdiv(r) (PLLRDIV = (Byte)(r >> 2)); (PLLCON = (Byte)(r << 6)) #define Pll_get_lock() ((PLLCON & MSK_PLOCK) == MSK_PLOCK) #endif /* _PLL_DRV_H_ */