📄 csl_histopen.c
字号:
/** @file csl_histOpen.c
*
* @brief File for functional layer of CSL API @a CSL_histOpen()
*
* Description
* - The @a CSL_histOpen() function definition & it's associated functions
*
* Modification 1
* - Created on: 10/19/2004
* - Reason: Created the sources
*
* @date 19th October, 2004
* @author Sandeep Tiwari.
*/
#include <csl_hist.h>
#include <_csl_resource.h>
#pragma CODE_SECTION (CSL_histOpen, ".text:csl_section:hist");
extern void _CSL_histGetAttrs(CSL_HistNum histNum , CSL_HistHandle hHist);
/** @brief Reserves the specified HIST for use.
*/
CSL_HistHandle CSL_histOpen (
/** Pointer to the object that holds reference to the
* instance of HIST requested after the call
*/
CSL_HistObj *hHistObj,
/** Instance of Hist to which a handle is requested
*/
CSL_HistNum histNum,
/** Specifies if HIST 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_HistNum histInst;
CSL_HistHandle hHist = (CSL_HistHandle)NULL;
hHistObj->openMode = openMode;
if (histNum >= 0 ) {
_CSL_histGetAttrs(histNum, hHistObj);
hHist = (CSL_HistHandle)_CSL_certifyOpen((CSL_ResHandle)hHistObj, status);
}
else {
for(histInst=(CSL_HistNum)0;histInst < (CSL_HistNum)CSL_HIST_PER_CNT;++histInst){
_CSL_histGetAttrs(histInst, hHistObj);
hHist = (CSL_HistHandle)_CSL_certifyOpen((CSL_ResHandle)hHistObj, status);
if (*status == CSL_SOK)
break;
}
if (histInst == CSL_HIST_PER_CNT)
*status = CSL_ESYS_OVFL;
}
return hHist;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -