📄 csl_vpssopen.c
字号:
/* ==========================================================================
* Copyright (c) Texas Instruments Inc , 2004
*
* Use of this software is controlled by the terms and conditions found
* in the license agreement under which this software has been supplied
* priovided
* ==========================================================================
*/
/** @file csl_vpssOpen.c
*
* @brief File for functional layer of CSL API @a CSL_vpssOpen()
*
* Description
* - The @a CSL_vpssOpen() function definition & it's associated functions
*
* @date 25th October, 2004
* @author Vignesh LA
*/
#include <csl_vpss.h>
#include <_csl_resource.h>
#pragma CODE_SECTION (CSL_vpssOpen, ".text:csl_section:vpss");
/**
\brief Open VPSS
\param hVpssObj Pointer to the handle object - to be allocated by the user
\param vpssNum Specifies the instance of VPSS to be opened
\param openMode Specifies if VPSS should be opened with exclusive OR
share access to the associate pins
\param status Pointer to the variable that holds the holds the status of
the open call
\return Handle @a CSL_VpssHandle to the requested instance of
VPSS if the call is successful, otherwise, a @a NULL is returned
\see
*/
CSL_VpssHandle CSL_vpssOpen ( CSL_VpssObj *hVpssObj,
CSL_VpssNum vpssNum,
CSL_OpenMode openMode,
CSL_Status *status ) {
Uint16 inst;
hVpssObj->openMode = openMode;
if (vpssNum >= 0) {
/* one of the VPSS instance numbers */
/* Get the unique identifier & resource mask */
_CSL_vpssGetAttrs(vpssNum, hVpssObj);
/* indicate in the CSL global data structure that the peripheral
* is reserved & return a handle to it */
(CSL_VpssHandle) _CSL_certifyOpen((CSL_ResHandle)hVpssObj, status);
} else { /* any VPSS acceptable */
for (inst = 0; inst < CSL_VPSS_PER_CNT; ++inst) {
/* get the unique identifier & resource mask */
_CSL_vpssGetAttrs((CSL_VpssNum)inst, hVpssObj);
/* indicate in the CSL global data structure that the peripheral
* is reserved & return a handle to it */
(CSL_VpssHandle)_CSL_certifyOpen((CSL_ResHandle)hVpssObj, status);
if (*status == CSL_SOK) {
break;
}
}
if (inst == CSL_VPSS_PER_CNT) {
*status = CSL_ESYS_OVFL;
}
}
return hVpssObj;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -