📄 csl_pllcaux.h
字号:
/* ============================================================================ * Copyright (c) Texas Instruments Inc 2002, 2003, 2004, 2005 * * Use of this software is controlled by the terms and conditions found in the * license agreement under which this software has been supplied. * =========================================================================== *//** @file csl_pllcAux.h * * @brief API Auxilary header file for PLLC CSL. * * Path: \\(CSLPATH)\\ipmodules\\pllc\\src *//* ============================================================================= * Revision History * =============== * 10-Feb-2004 kpn File Created. * ============================================================================= */#ifndef _CSL_PPLCAUX_H_#define _CSL_PLLCAUX_H_#include <csl_pllc.h>#ifdef __cplusplusextern "C" {#endif/* * Status query functions of the pllc *//** ============================================================================ * @n@b CSL_pllcGetPID * * @b Description * @n Gets the Peripheral ID of the pllc. * * @b Arguments * @verbatim hPllc Handle to the PLLC instance @endverbatim * * <b> Return Value </b> * @n Uint32 * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_PllcHandle hPllc; Uint32 response; ... response = CSL_pllcGetPID (hPllc); @endverbatim * ============================================================================= */CSL_IDEF_INLINEUint32 CSL_pllcGetPID ( CSL_PllcHandle hPllc){ Uint32 response = 0; response = (Uint32) hPllc->regs->PID; return response;}/** ============================================================================ * @n@b CSL_pllcGetStatus * * @b Description * @n Gets the Status of the pll controller. * * @b Arguments * @verbatim hPllc Handle to the PLLC instance @endverbatim * * <b> Return Value </b> * @n CSL_BitMask32 * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_PllcHandle hPllc; CSL_BitMask32 response; ... response = CSL_pllcGetStatus (hPllc); @endverbatim * ============================================================================= */CSL_IDEF_INLINECSL_BitMask32 CSL_pllcGetStatus ( CSL_PllcHandle hPllc){ CSL_BitMask32 response; response = (CSL_BitMask32) hPllc->regs->PLLSTAT; return response;}/** ============================================================================ * @n@b CSL_pllcGetDivRatioChange * * @b Description * @n Gets the Divider Ratio Change Status of the pllc SYSCLK. * * @b Arguments * @verbatim hPllc Handle to the PLLC instance @endverbatim * * <b> Return Value </b> * @n CSL_BitMask32 * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_PllcHandle hPllc; CSL_BitMask32 response; ... response = CSL_pllcGetDivRatioChange (hPllc); @endverbatim * ============================================================================= */CSL_IDEF_INLINECSL_BitMask32 CSL_pllcGetDivRatioChange ( CSL_PllcHandle hPllc){ CSL_BitMask32 response; response = (CSL_BitMask32) hPllc->regs->DCHANGE; return response;}/** ============================================================================ * @n@b CSL_pllcGetClkStatus * * @b Description * @n Gets the Clock Status of the pllc. * * @b Arguments * @verbatim hPllc Handle to the PLLC instance @endverbatim * * <b> Return Value </b> * @n CSL_BitMask32 * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_PllcHandle hPllc; CSL_BitMask32 response; ... response = CSL_pllcGetClkStatus (hPllc); @endverbatim * ============================================================================= */CSL_IDEF_INLINECSL_BitMask32 CSL_pllcGetClkStatus ( CSL_PllcHandle hPllc){ CSL_BitMask32 response; response = (CSL_BitMask32) hPllc->regs->CKSTAT; return response;}/** ============================================================================ * @n@b CSL_pllcGetClkEnableStatus * * @b Description * @n Gets the Clock Enable Control Status of the pllc. * * @b Arguments * @verbatim hPllc Handle to the PLLC instance @endverbatim * * <b> Return Value </b> * @n CSL_BitMask32 * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_PllcHandle hPllc; CSL_BitMask32 response; ... response = CSL_pllcGetClkEnableStatus (hPllc); @endverbatim * ============================================================================= */CSL_IDEF_INLINECSL_BitMask32 CSL_pllcGetClkEnableStatus ( CSL_PllcHandle hPllc){ CSL_BitMask32 response; response = (CSL_BitMask32) hPllc->regs->CKEN; return response;}/** ============================================================================ * @n@b CSL_pllcGetSysClkStatus * * @b Description * @n Gets the System Clock ON/OFF Status of the pllc. * * @b Arguments * @verbatim hPllc Handle to the PLLC instance @endverbatim * * <b> Return Value </b> * @n CSL_BitMask32 * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_PllcHandle hPllc; CSL_BitMask32 response; ... response = CSL_pllcGetSysClkStatus (hPllc); @endverbatim * ============================================================================= */CSL_IDEF_INLINECSL_BitMask32 CSL_pllcGetSysClkStatus ( CSL_PllcHandle hPllc){ CSL_BitMask32 response; response = (CSL_BitMask32) hPllc->regs->SYSTAT; return response;}/** ============================================================================ * @n@b CSL_pllcGetResetStatus * * @b Description * @n Gets the Reset Type Status of the pllc. * * @b Arguments * @verbatim hPllc Handle to the PLLC instance @endverbatim * * <b> Return Value </b> * @n CSL_BitMask32 * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_PllcHandle hPllc; CSL_BitMask32 response; ... response = CSL_pllcGetResetStatus (hPllc); @endverbatim * ============================================================================= */CSL_IDEF_INLINECSL_BitMask32 CSL_pllcGetResetStatus ( CSL_PllcHandle hPllc){ CSL_BitMask32 response; response = (Uint32) hPllc->regs->RSTYPE; return response;}/** ============================================================================ * @n@b CSL_pllcGetFusefarmErrorStatus * * @b Description * @n Gets the Fusefarm Error Status of the pllc. * * @b Arguments * @verbatim hPllc Handle to the PLLC instance @endverbatim * * <b> Return Value </b> * @n Uint32 * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim CSL_PllcHandle hPllc; Uint32 response; ... response = CSL_pllcGetFusefarmErrorStatus (hPllc); @endverbatim * ============================================================================= */CSL_IDEF_INLINEUint32 CSL_pllcGetFusefarmErrorStatus ( CSL_PllcHandle hPllc){ Uint32 response = 0; response = (Uint32) hPllc->regs->FUSERR; return response;}/* * Control command functions of the pllc *//** ============================================================================ * @n@b CSL_pllcCommandCtrl * * @b Description * Controls the pllc operation. * * @b Arguments * @verbatim hPllc Handle to the PLLC instance loadVal Value to be loaded to pllc PLLCMD register @endverbatim * * <b> Return Value </b> * @n None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n pllc operation is controlled according to value set. * * @b Modifies * @n pllc PLLCMD register. * * @b Example * @verbatim CSL_PllcHandle hPllc; CSL_BitMask32 loadVal; ... CSL_pllcCommandCtrl (hPllc, loadVal); @endverbatim * ============================================================================= */CSL_IDEF_INLINEvoid CSL_pllcCommandCtrl ( CSL_PllcHandle hPllc, CSL_BitMask32 loadVal){ hPllc->regs->PLLCTL = (loadVal & 0xFFFF); loadVal = (loadVal & 0xFFFF0000)>>16; if (loadVal) hPllc->regs->PLLCMD = loadVal;}/** ============================================================================ * @n@b CSL_pllcClockEnable * * @b Description * Enables the miscellaneous output clocks. * * @b Arguments * @verbatim hPllc Handle to the PLLC instance loadVal Value to be loaded to pllc CKEN register @endverbatim * * <b> Return Value </b> * @n None * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n The miscellaneous output clocks are enabled. * * @b Modifies * @n pllc CKEN register. * * @b Example * @verbatim CSL_PllcHandle hPllc; CSL_BitMask32 loadVal; ... CSL_pllcClockEnable (hPllc, loadVal); @endverbatim * ============================================================================= */CSL_IDEF_INLINEvoid CSL_pllcClockEnable ( CSL_PllcHandle hPllc, CSL_BitMask32 loadVal){ hPllc->regs->CKEN = loadVal;}/** ============================================================================ * @n@b CSL_pllcClockDisable * * @b Description * Disables the miscellaneous output clocks. *
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -