📄 csl_h3aopen.c
字号:
/** @file csl_h3aOpen.c
*
* @brief File for functional layer of CSL API @a CSL_h3aOpen()
*
* Description
* - The @a CSL_h3aOpen() function definition & it's associated functions
*
* Modification 1
* - Created on: 10/18/2004
* - Reason: Created the sources
*
* @date 18th October, 2004
* @author Sandeep Tiwari.
*/
#include <csl_h3a.h>
#include <_csl_resource.h>
#pragma CODE_SECTION (CSL_h3aOpen, ".text:csl_section:h3a");
extern void _CSL_h3aGetAttrs(CSL_H3aNum h3aNum , CSL_H3aHandle hH3a);
/** @brief Reserves the specified H3A for use.
*/
CSL_H3aHandle CSL_h3aOpen (
/** Pointer to the object that holds reference to the
* instance of H3A requested after the call
*/
CSL_H3aObj *hH3aObj,
/** Instance of H3a to which a handle is requested
*/
CSL_H3aNum h3aNum,
/** Specifies if H3A 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_H3aNum h3aInst;
CSL_H3aHandle hH3a = (CSL_H3aHandle)NULL;
hH3aObj->openMode = openMode;
if (h3aNum >= 0 ) {
_CSL_h3aGetAttrs(h3aNum, hH3aObj);
hH3a = (CSL_H3aHandle)_CSL_certifyOpen((CSL_ResHandle)hH3aObj, status);
}
else {
for(h3aInst=(CSL_H3aNum)0;h3aInst < (CSL_H3aNum)CSL_H3A_PER_CNT;++h3aInst){
_CSL_h3aGetAttrs(h3aInst, hH3aObj);
hH3a = (CSL_H3aHandle)_CSL_certifyOpen((CSL_ResHandle)hH3aObj, status);
if (*status == CSL_SOK)
break;
}
if (h3aInst == CSL_H3A_PER_CNT)
*status = CSL_ESYS_OVFL;
}
return hH3a;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -