/*H**************************************************************************
* NAME: pll_drv.h
*----------------------------------------------------------------------------
* Copyright (c) 2003 Atmel.
*----------------------------------------------------------------------------
* RELEASE: snd1c-refd-nf-4_0_3
* REVISION: 1.3
*----------------------------------------------------------------------------
* PURPOSE:
* This file contains the PLL driver definition
*****************************************************************************/
#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 #define Pll_get_lock() ((PLLCON & MSK_PLOCK) == MSK_PLOCK)
#endif /* _PLL_DRV_H_ */