www.pudn.com > s3c2443_test_code.zip > PLL.h
//************************************************
// NAME : PLL.h
// DESC : library functions
// History : 2004. 6 .3 ver 0.0
//************************************************
#ifndef __PLL_h__
#define __PLL_h__
// edited by junon 060522
#ifdef __cplusplus
extern "C" {
#endif
#define SetMLockTime( M_LTime) \
{ \
rLOCKCON0 = ((rLOCKCON0&0)|(M_LTime)); \
}
#define SetELockTime( E_LTime) \
{ \
rLOCKCON1 = ((rLOCKCON1&0)|(E_LTime)); \
}
#define SetMPLL( Mdiv, Pdiv, Sdiv) \
{ \
rMPLLCON= ((Mdiv<<16) | (Pdiv<<8) | (Sdiv)); \
}
#define SetEPLL( Mdiv, Pdiv, Sdiv) \
{ \
rEPLLCON= ((Mdiv<<16) | (Pdiv<<8) | (Sdiv)); \
}
#define SetCLKDIV( ARMdiv, PREdiv, Hdiv, Pdiv) \
{ \
rCLKDIV0 = (rCLKDIV0&~(0x1E37)) | (ARMdiv<<9) | (PREdiv<<4) |(Pdiv<<2) | Hdiv; \
}
#ifdef __cplusplus
}
#endif
#endif //__PLL_h__