csl_ocpt2.h
来自「dsp在音频处理中的运用」· C头文件 代码 · 共 587 行 · 第 1/2 页
H
587 行
* @desc
* @n This function opens the OCP T2 CSL. It returns a handle to the CSL for
* the OCP T2 instance. This handle is passed to all other CSL APIs, as
* the reference to the OCP T2 instance.
*
* @arg pOcpt2Obj
* Pointer to OCP T2 port object -
* to be allocated by the user.
* @arg ocpt2Num
* Instance of OCP T2 port to be opened.
*
* @arg pOcpt2Param
* OCP T2 port module specific parameters.
*
* @arg pStatus
* Pointer to CSL Error Status. Possible values for status after
* function call returns are:
* CSL_SOK : Open call is successful
* CSL_ESYS_FAIL : Invalid Instance
*
* @ret CSL_Ocpt2Handle
* Valid handle, if status is CSL_SOK
*
* @eg
* CSL_status status;
* CSL_Ocpt2Obj ocpt2Obj;
* CSL_Ocpt2Handle hOcpt2;
*
* hOcpt2 = CSL_ocpt2Open (&ocpt2Obj, CSL_OCPT2, NULL,
* &status);
*
* ...
*
* =============================================================================
*/
extern CSL_Ocpt2Handle CSL_ocpt2Open (
CSL_Ocpt2Obj* pOcpt2Obj,
CSL_InstNum ocpt2Num,
CSL_Ocpt2Param* pOcpt2Param,
CSL_Status* pStatus
);
/* =============================================================================
* @func CSL_ocpt2Close
*
* @desc
* @n This function marks that CSL for the OCP T2 port instance as closed.
* CSL for the OCP T2 port instance needs to be reopened before using any
* OCP T2 CSL API again.
*
* @arg hOcpt2
* Handle to the OCP T2 port instance
*
* @ret CSL_Status
* CSL_SOK - OCP T2 port instance is closed
* successfully
* CSL_ESYS_BADHANDLE - The handle passed is invalid
*
* @eg
* CSL_ocpt2Close (hOcpt2);
* ===========================================================================
*/
extern CSL_Status CSL_ocpt2Close (
CSL_Ocpt2Handle hOcpt2
);
/* =============================================================================
* @func CSL_ocpt2HwSetup
*
* @desc
* @n It configures the OCP T2 registers as per the values passed in the
* hardware setup structure.
*
* @arg hOcpt2
* Handle to the OCP T2 port instance
*
* @arg pHwSetup
* Pointer to hardware setup structure
*
* @ret CSL_Status
* CSL_SOK - Hardware setup successful
* CSL_ESYS_BADHANDLE - Invalid handle
* CSL_ESYS_INVPARAMS - Hardware structure is not properly
* initialized
*
* @eg
* CSL_Ocpt2Handle hOcpt2;
* CSL_Ocpt2Obj ocpt2Obj;
* CSL_Ocpt2HwSetup hwSetup = CSL_OCPT2_HW_SETUP_DEFAULTS;
* CSL_status status;
* ...
*
* hOcpt2 = CSL_ocpt2Open (&ocpt2Obj, CSL_OCPT2, NULL, &status);
*
* hwSetup.prioritySetup.dmaPriority = 0x5;
* hwSetup.prioritySetup.ocpiPriority = 0x5;
* hwSetup.prioritySetup.dspPriority = 0x5;
* hwSetup.prioritySetup.armPriority = 0x5;
*
* hwSetup.timeoutSetup.dmaPriorityTimeout = 0xFF;
* hwSetup.timeoutSetup.dspPriorityTimeout = 0xFF;
* hwSetup.timeoutSetup.lcdPriorityTimeout = 0xFF;
* hwSetup.timeoutSetup.ocpiPriorityTimeout = 0xFF;
*
* hwSetup.targetSetup.autogatedClockEn = TRUE;
* hwSetup.targetSetup.pipelineReadEn = TRUE;
*
* hwSetup.abortSetup.abortOnTimeoutEn = TRUE;
* hwSetup.abortSetup.responseTimeout = 0xFF;
*
* status = CSL_ocpt2HwSetup (hOcpt2, &hwSetup);
*
* ===========================================================================
*/
extern CSL_Status CSL_ocpt2HwSetup (
CSL_Ocpt2Handle hOcpt2,
CSL_Ocpt2HwSetup* pHwSetup
);
/* =============================================================================
* @func CSL_ocpt2GetHwStatus
*
* @desc
* @n The function is used to get data about various parameters of the OCP T2
* port. The data returned depends on the query passed.
*
* @arg hOcpt2
* Handle to the OCP T2 port instance
*
* @arg query
* Query to be performed.
*
* @arg pResponse
* Pointer to buffer to return the data requested by the query passed
*
* @ret CSL_Status
* CSL_SOK - Successful completion of the query
* CSL_ESYS_BADHANDLE - Invalid handle
* CSL_ESYS_INVQUERY - Query command not supported
*
* @eg
* Uint32 abortAddr = 0;
* CSL_Status status;
*
* ...
*
* status = CSL_ocpt2GetHwStatus (hOcpt2, CSL_OCPT2_QUERY_ABORT_ADDR,
* &abortAddr);
*
* ...
* =============================================================================
*/
extern CSL_Status CSL_ocpt2GetHwStatus (
CSL_Ocpt2Handle hOcpt2,
CSL_Ocpt2HwStatusQuery query,
void* pResponse
);
/*
* =============================================================================
* @func CSL_ocpt2HwSetupRaw
*
* @desc
* @n This function gets the hardware setup parameters of the OCP T2 module
* specified by the given handle.
*
* @arg hOcpt2
* Handle to the OCP T2 port instance
*
* @arg pHwConfig
* Pointer to the OCP T2 port config structure
*
* @ret CSL_Status
* CSL_SOK - Configuration successful
* CSL_ESYS_BADHANDLE - Invalid handle
*
* @eg
*
* CSL_status status;
* CSL_Ocpt2Config hwConfig = CSL_OCPT2_CONFIG_DEFAULTS;
*
* ...
*
* hwConfig.PRIOR = 0x0000ff77;
*
* hwConfig.PTOR1 = 0x10;
* hwConfig.PTOR2 = 0x100010;
* hwConfig.PTOR3 = 0x10;
* hwConfig.ATOR = 0x01FF;
* hwConfig.CONFIG_REG = 0x03;
*
* status = CSL_ocpt2HwSetupRaw (hOcpt2, &hwConfig);
*
* ...
* ===========================================================================
*/
extern CSL_Status CSL_ocpt2HwSetupRaw (
CSL_Ocpt2Handle hOcpt2,
CSL_Ocpt2Config* pHwConfig
);
/** ============================================================================
* @func CSL_ocpt2GetHwSetup
*
* @desc
* @n This function gets the hardware setup parameters of the OCP T2 module
* specified by the given handle.
*
* @arg hOcpt2
* Handle to the OCP T2 port instance
*
* @arg pHwSetup
* Pointer to the hardware setup structure
*
* @ret CSL_Status
* CSL_SOK - Retrieving the hardware setup success parameters is successful
* CSL_ESYS_BADHANDLE - The handle passed is invalid
*
* @eg
* CSL_Ocpt2Handle hOcpt2;
* CSL_Ocpt2HwSetup hwSetup;
*
* ...
*
* status = CSL_ocpt2GetHwSetup (hOcpt2, &hwSetup);
*
* ...
* ==============================================================================
*/
extern CSL_Status CSL_ocpt2GetHwSetup(
CSL_Ocpt2Handle hOcpt2,
CSL_Ocpt2HwSetup* pHwSetup
);
/** ============================================================================
* @n@b CSL_ocpt2GetBaseAddress
*
* @b Description
* @n This function gets the base address of the given OCP T2 port instance.
*
* @b Arguments
* @verbatim
ocpt2Num Specifies the instance of the OCP T2 port for which
the base address is requested
pOcpt2Param Module specific parameters.
pBaseAddress Pointer to the base address structure to return the
base address details.
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_OK Retrieving the hardware setup is
* successful
* @li CSL_ESYS_FAIL The OCP T2 port instance is not
* available.
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n Base address structure is populated
*
* @b Modifies
* @n 1. The status variable
*
* 2. Base address structure.
*
* @b Example
* @verbatim
CSL_Status status;
CSL_Ocpt2BaseAddress baseAddress;
...
status = CSL_ocpt2GetBaseAddress (CSL_OCPT2, NULL, &baseAddress);
@endverbatim
* ===========================================================================
*/
extern CSL_Status CSL_ocpt2GetBaseAddress (
CSL_InstNum ocpt2Num,
CSL_Ocpt2Param* pOcpt2Param,
CSL_Ocpt2BaseAddress* pBaseAddress
);
#ifdef __cplusplus
}
#endif
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?