📄 csl_mcbspgethwstatus.c
字号:
/** \file csl_mcbspGetHwStatus.c
*
* \brief File for functional layer of CSL API \a CSL_mcbspGetHwStatus()
*
* Description
* - The \a CSL_mcbspGetHwStatus() function contains definition of the
* functional layer API
*
* Path: \\(CSLPATH)\\ipmodules\\mcbsp\\src
*
*/
#include <csl_mcbsp.h>
#include <_csl_mcbsp.h>
#include <csl_mcbspAux.h>
#pragma CODE_SECTION (CSL_mcbspGetHwStatus, ".text:csl_section:mcbsp");
/**
* Gets the status of different operations or some setup-parameters of MCBSP.
* The status is returned through the third parameter.
*
* <b> Usage Constraints: </b>
* Both @a CSL_mcbspInit() and @a CSL_mcbspOpen() must be called successfully
* in that order before @a CSL_mcbspGetHwStatus() can be called.
* Refer to @a CSL_McbspHwStatusQuery for the argument to be passed along with
* the corresponding query command.
*
* @b Example:
* @verbatim
CSL_McbspHandle hMcbsp;
CSL_Status status;
Uint16 response;
...
status = CSL_mcbspGetHwStatus(hMcbsp,
CSL_MCBSP_QUERY_DEV_STATUS,
&response);
if (response & CSL_MCBSP_RRDY)
{
// Receiver is ready to with new data
...
}
@endverbatim
*
* @return Status of the operation
*
*/
CSL_Status CSL_mcbspGetHwStatus(
/** MCBSP handle returned by successful 'open' */
CSL_McbspHandle hMcbsp,
/** Query command, refer @a CSL_McbspHwStatusQuery for the list of
* commands supported */
CSL_McbspHwStatusQuery myQuery,
/** Response from the query. Pointer to appropriate object corresponding
* to the query command needs to be passed here */
void *response
)
{
CSL_Status status = CSL_SOK;
if (hMcbsp == NULL)
return CSL_ESYS_BADHANDLE;
switch(myQuery)
{
case CSL_MCBSP_QUERY_CUR_RX_BLK:
CSL_mcbspGetCurRxBlk (hMcbsp, response);
break;
case CSL_MCBSP_QUERY_CUR_TX_BLK:
CSL_mcbspGetCurTxBlk (hMcbsp, (CSL_BitMask16 *)response);
break;
case CSL_MCBSP_QUERY_DEV_STATUS:
CSL_mcbspGetDevStatus (hMcbsp, (CSL_BitMask16 *)response);
break;
case CSL_MCBSP_QUERY_TX_RST_STAT:
CSL_mcbspGetTxRstStat (hMcbsp, response);
break;
case CSL_MCBSP_QUERY_RX_RST_STAT:
CSL_mcbspGetRxRstStat (hMcbsp, response);
break;
case CSL_MCBSP_QUERY_PID:
CSL_mcbspGetPid (hMcbsp, response);
break;
default:
status = CSL_ESYS_INVQUERY;
break;
}
return(status);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -