📄 csl_vencopen.c
字号:
/** @file csl_vencOpen.c
*
* @brief File for functional layer of CSL API @a CSL_vencOpen()
*
* Description
* - The @a CSL_vencOpen() function definition & it's associated functions
*
* Modification 1
* - Created on: 10/04/2004
* - Reason: Created the sources
*
* @date 4th October, 2004
* @author Santosh Narayanan.
*/
#include <csl_venc.h>
#include <_csl_resource.h>
#pragma CODE_SECTION (CSL_vencOpen, ".text:csl_section:venc");
extern void _CSL_vencGetAttrs(CSL_VencNum vencNum , CSL_VencHandle hVenc);
/** @brief Reserves the specified VENC for use.
*/
CSL_VencHandle CSL_vencOpen (
/** Pointer to the object that holds reference to the
* instance of VENC requested after the call
*/
CSL_VencObj *hVencObj,
/** Instance of VENC to which a handle is requested
*/
CSL_VencNum vencNum,
/** Specifies if VENC should be opened with exclusive or
* shared access to the associate pins
*/
CSL_OpenMode openMode,
/** This returns the status (success/errors) of the call
*/
CSL_Status *status
){
CSL_VencNum vencInst;
CSL_VencHandle hVenc = (CSL_VencHandle)NULL;
hVencObj->openMode = openMode;
if (vencNum >= 0 ) {
_CSL_vencGetAttrs(vencNum, hVencObj);
hVenc = (CSL_VencHandle)_CSL_certifyOpen((CSL_ResHandle)hVencObj, status);
}
else {
for(vencInst=(CSL_VencNum)0;vencInst < (CSL_VencNum)CSL_VENC_PER_CNT;++vencInst){
_CSL_vencGetAttrs(vencInst, hVencObj);
hVenc = (CSL_VencHandle)_CSL_certifyOpen((CSL_ResHandle)hVencObj, status);
if (*status == CSL_SOK)
break;
}
if (vencInst == CSL_VENC_PER_CNT)
*status = CSL_ESYS_OVFL;
}
return hVenc;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -