csl_pllAux.h
Go to the documentation of this file.
00001 /*  ============================================================================
00002  *   Copyright (c) Texas Instruments Inc 2002, 2003, 2004, 2005, 2008
00003  *
00004  *   Use of this software is controlled by the terms and conditions found in the
00005  *   license agreement under which this software has been supplied.
00006  *  ============================================================================
00007  */
00008 
00017 /* ============================================================================
00018  * Revision History
00019  * ================
00020  * 21-Aug-2008 Created
00021  * ============================================================================
00022  */
00023 
00024 
00025 #ifndef _CSL_PLLAUX_H_
00026 #define _CSL_PLLAUX_H_
00027 
00028 #include <csl_pll.h>
00029 
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif
00033 
00084 static inline
00085 Bool PLL_getTestLockMonStatus(PLL_Handle hPll)
00086 {
00087     Uint16 TstLckMon = 0;
00088 
00089     TstLckMon = ((hPll->sysAddr->CGCR2 & (0x0008u)) >> (0x0003u));
00090     if( TstLckMon )
00091         return TRUE;
00092     return FALSE;
00093 }
00094 
00145 static inline
00146 CSL_Status PLL_getConfig(PLL_Handle hPll,PLL_Config *pConfig)
00147 {
00148     CSL_Status status = CSL_SOK;
00149 
00150     if(NULL == hPll)
00151     {
00152         status = CSL_ESYS_BADHANDLE;
00153         return status;
00154     }
00155 
00156     if(NULL == pConfig)
00157     {
00158         status = CSL_ESYS_INVPARAMS;
00159         return status;
00160     }
00161 
00162     pConfig->PLLCNTL1   = hPll->sysAddr->CGCR1;
00163     pConfig->PLLCNTL2   = hPll->sysAddr->CGCR2;
00164     pConfig->PLLINCNTL  = hPll->sysAddr->CGICR;
00165     pConfig->PLLOUTCNTL = hPll->sysAddr->CGOCR;
00166     return status;
00167 }
00168 
00171 #endif// _CSL_PLLAUX_H_