csl_ocpt1.h
来自「dsp在音频处理中的运用」· C头文件 代码 · 共 589 行 · 第 1/2 页
H
589 行
*
* @desc
* @n This function opens the OCP T1 CSL. It returns a handle to the CSL for
* the OCP T1 instance. This handle is passed to all other CSL APIs, as
* the reference to the OCP T1 instance.
*
* @arg pOcpt1Obj
* Pointer to OCP T1 port object -
* to be allocated by the user.
* @arg ocpt1Num
* Instance of OCP T1 port to be opened.
*
* @arg pOcpt1Param
* OCP T1 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_Ocpt1Handle
* Valid handle, if status is CSL_SOK
*
* @eg
* CSL_status status;
* CSL_Ocpt1Obj ocpt1Obj;
* CSL_Ocpt1Handle hOcpt1;
*
* hOcpt1 = CSL_ocpt1Open (&ocpt1Obj, CSL_OCPT1, NULL,
* &status);
*
* ...
*
* =============================================================================
*/
extern CSL_Ocpt1Handle CSL_ocpt1Open (
CSL_Ocpt1Obj* pOcpt1Obj,
CSL_InstNum ocpt1Num,
CSL_Ocpt1Param* pOcpt1Param,
CSL_Status* pStatus
);
/* =============================================================================
* @func CSL_ocpt1Close
*
* @desc
* @n This function marks that CSL for the OCP T1 port instance as closed.
* CSL for the OCP T1 port instance needs to be reopened before using any
* OCP T1 CSL API again.
*
* @arg hOcpt1
* Handle to the OCP T1 port instance
*
* @ret CSL_Status
* CSL_SOK - OCP T1 port instance is closed
* successfully
* CSL_ESYS_BADHANDLE - The handle passed is invalid
*
* @eg
* CSL_ocpt1Close (hOcpt1);
* ===========================================================================
*/
extern CSL_Status CSL_ocpt1Close (
CSL_Ocpt1Handle hOcpt1
);
/* =============================================================================
* @func CSL_ocpt1HwSetup
*
* @desc
* @n It configures the OCP T1 registers as per the values passed in the
* hardware setup structure.
*
* @arg hOcpt1
* Handle to the OCP T1 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_Ocpt1Handle hOcpt1;
* CSL_Ocpt1Obj ocpt1Obj;
* CSL_Ocpt1HwSetup hwSetup = CSL_OCPT1_HW_SETUP_DEFAULTS;
* CSL_status status;
* ...
*
* hOcpt1 = CSL_ocpt1Open (&ocpt1Obj, CSL_OCPT1, 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_ocpt1HwSetup (hOcpt1, &hwSetup);
*
* ===========================================================================
*/
extern CSL_Status CSL_ocpt1HwSetup (
CSL_Ocpt1Handle hOcpt1,
CSL_Ocpt1HwSetup* pHwSetup
);
/* =============================================================================
* @func CSL_ocpt1GetHwStatus
*
* @desc
* @n The function is used to get data about various parameters of the OCP T1
* port. The data returned depends on the query passed.
*
* @arg hOcpt1
* Handle to the OCP T1 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_ocpt1GetHwStatus (hOcpt1, CSL_OCPT1_QUERY_ABORT_ADDR,
* &abortAddr);
*
* ...
* =============================================================================
*/
extern CSL_Status CSL_ocpt1GetHwStatus (
CSL_Ocpt1Handle hOcpt1,
CSL_Ocpt1HwStatusQuery query,
void* pResponse
);
/*
* =============================================================================
* @func CSL_ocpt1HwSetupRaw
*
* @desc
* @n This function gets the hardware setup parameters of the OCP T1 module
* specified by the given handle.
*
* @arg hOcpt1
* Handle to the OCP T1 port instance
*
* @arg pHwConfig
* Pointer to the OCP T1 port config structure
*
* @ret CSL_Status
* CSL_SOK - Configuration successful
* CSL_ESYS_BADHANDLE - Invalid handle
*
* @eg
*
* CSL_status status;
* CSL_Ocpt1Config hwConfig = CSL_OCPT1_CONFIG_DEFAULTS;
*
* ...
*
* hwConfig.PRIOR = 0x0000ff77;
*
* hwConfig.PTOR1 = 0x10;
* hwConfig.PTOR2 = 0x100010;
* hwConfig.PTOR3 = 0x10;
* hwConfig.ATOR = 0x01FF;
* hwConfig.CONFIG_REG = 0x03;
*
* status = CSL_ocpt1HwSetupRaw (hOcpt1, &hwConfig);
*
* ...
* ===========================================================================
*/
extern CSL_Status CSL_ocpt1HwSetupRaw (
CSL_Ocpt1Handle hOcpt1,
CSL_Ocpt1Config* pHwConfig
);
/** ============================================================================
* @func CSL_ocpt1GetHwSetup
*
* @desc
* @n This function gets the hardware setup parameters of the OCP T1 module
* specified by the given handle.
*
* @arg hOcpt1
* Handle to the OCP T1 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_Ocpt1Handle hOcpt1;
* CSL_Ocpt1HwSetup hwSetup;
*
* ...
*
* status = CSL_ocpt1GetHwSetup (hOcpt1, &hwSetup);
*
* ...
* ==============================================================================
*/
extern CSL_Status CSL_ocpt1GetHwSetup(
CSL_Ocpt1Handle hOcpt1,
CSL_Ocpt1HwSetup* pHwSetup
);
/** ============================================================================
* @n@b CSL_ocpt1GetBaseAddress
*
* @b Description
* @n This function gets the base address of the given OCP T1 port instance.
*
* @b Arguments
* @verbatim
ocpt1Num Specifies the instance of the OCP T1 port for which
the base address is requested
pOcpt1Param 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 T1 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_Ocpt1BaseAddress baseAddress;
...
status = CSL_ocpt1GetBaseAddress (CSL_OCPT1, NULL, &baseAddress);
@endverbatim
* ===========================================================================
*/
extern CSL_Status CSL_ocpt1GetBaseAddress (
CSL_InstNum ocpt1Num,
CSL_Ocpt1Param* pOcpt1Param,
CSL_Ocpt1BaseAddress* pBaseAddress
);
#ifdef __cplusplus
}
#endif
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?