📄 csl_pscopen.c
字号:
/* ==========================================================================
* Copyright (c) Texas Instruments Inc , 2005
*
* Use of this software is controlled by the terms and conditions found
* in the license agreement under which this software has been supplied
* provided
* ==========================================================================
*/
/** @file csl_pscOpen.c
*
* @brief File for functional layer of CSL API @a CSL_pscOpen()
*
* Description
* - The @a CSL_pscOpen() function definition & it's associated functions
*
* @date 6 June, 2005
* @author Lawrence Ronk
*/
#include <csl_psc.h>
#pragma CODE_SECTION (CSL_pscOpen, ".text:csl_section:psc");
/**
\brief Open PSC
\param hPscObj Pointer to the handle object - to be allocated by the user
\param pscNum Specifies the instance of PSC to be opened
\param openMode Specifies if PSC should be opened with exclusive OR
share access to the associate pins
\param hwSetup If a valid structure is passed (not @a NULL), then
the @a CSL_PscHwSetup() is called with this parameter
\param status Pointer to the variable that holds the holds the status of
the open call
\return Handle @a CSL_PscHandle to the requested instance of
PSC if the call is successful, otherwise, a @a NULL is returned
\see
*/
CSL_PscHandle CSL_pscOpen ( CSL_PscObj *pPscObj,
CSL_InstNum pscNum,
CSL_PscParam *pPscParam,
CSL_Status *pStatus ){
CSL_Status status;
CSL_PscHandle hPsc;
CSL_PscBaseAddress baseAddress;
status = CSL_pscGetBaseAddress(pscNum, pPscParam, &baseAddress);
if (status == CSL_SOK) {
pPscObj->regs = baseAddress.regs;
pPscObj->perNum = (CSL_InstNum)pscNum;
hPsc = (CSL_PscHandle)pPscObj;
}
else {
pPscObj->regs = (CSL_PscRegsOvly)NULL;
pPscObj->perNum = (CSL_InstNum)-1;
hPsc = (CSL_PscHandle)NULL;
}
if (pStatus) {
*pStatus = status;
}
return hPsc;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -