csl_pwt.h
来自「dsp在音频处理中的运用」· C头文件 代码 · 共 558 行 · 第 1/2 页
H
558 行
* =============================================================================
* @func CSL_pwtOpen
*
* @desc
* This function populates the peripheral data object for the instance and
* returns a handle to the instance
*
* @arg hPwtObj
* Pointer to the PWT instance object
*
* @arg pwtNum
* Instance of the PWT to be opened
*
* @arg pPwtParam
* Pointer to module specific parameters
*
* @arg pStatus
* pointer for returning status of the function call
*
* @ret CSL_PwtHandle
* Valid PWT instance handle will be returned if status value is
* equal to CSL_SOK.
*
* @eg
* CSL_status status;
* CSL_PwtObj hPwtObj;
* CSL_PwtHandle hPwt;
*
* hPwt = CSL_pwtOpen (&hPwtObj, CSL_PWT, NULL, &status);
* =============================================================================
*/
extern CSL_PwtHandle CSL_pwtOpen (
CSL_PwtObj *hPwtObj,
CSL_InstNum pwtNum,
CSL_PwtParam *pPwtParam,
CSL_Status *pstatus
);
/*
* =============================================================================
* @func CSL_pwtClose
*
* @desc
* This function closes the PWT instance specified by its handle.
*
* @arg hPwt
* The handle to the PWT instance.
*
* @ret CSL_Status
* CSL_SOK : Successful, desired operation is done.
* CSL_ESYS_BADHANDLE : handle pass is invalid.
*
* @eg
* status = CSL_pwtClose(hPwt);
* =============================================================================
*/
extern CSL_Status CSL_pwtClose(
CSL_PwtHandle hPwt
);
/*
* =============================================================================
* @func CSL_pwtHwSetup
*
* @desc
* This function sets the specified PWT H/W parameters
*
* @arg hPwt
* The handle to the PWT instance
*
* @arg setup
* The setup structure used to setup PWT device
*
* @ret CSL_Status
* CSL_SOK : Desired operation is done successful
* CSL_ESYS_INVPARAMS : Parameters passed is NULL.
*
* @eg
* CSL_PwtHwSetup setup = CSL_PWT_HWSETUP_DEFAULTS;
*
* status = CSL_pwtHwSetup(hPwt, &setup);
* =============================================================================
*/
extern CSL_Status CSL_pwtHwSetup (
CSL_PwtHandle hPwt,
CSL_PwtHwSetup *setup
);
/*
* =============================================================================
* @func CSL_pwtHwSetupRaw
*
* @desc
* This function configures the registers of PWT instance as per the
* values given in the Config structure.
*
* @arg hPwt
* Handle to the PWT instance
*
* @arg pwtConfig
* Pointer to the PWT config structure
*
* @ret CSL_Status
* CSL_SOK - Configuration successful
* CSL_ESYS_BADHANDLE - Invalid handle
*
* @eg
* CSL_status status;
* CSL_PwtConfig pwtConfig = CSL_PWT_CONFIG_DEFAULTS;
*
* status = CSL_pwtHwsetupRaw (hPwt, &pwtConfig);
* =============================================================================
*/
extern CSL_Status CSL_pwtHwSetupRaw (
CSL_PwtHandle hPwt,
CSL_PwtConfig *pwtConfig
);
/*
* =============================================================================
* @func CSL_pwtGetHwSetup
*
* @desc
* This function is for quering the hardware setup parameters. It
* passes back the setup paramters.
*
* @arg hPwt
* Handle to the PWT instance
*
* @arg setup
* Pointer to hardware setup structure
*
* @ret CSL_Status
* CSL_SOK : Successful, desired operation is done.
* CSL_ESYS_BADHANDLE : handle pass is invalid.
*
* @eg
* CSL_Status status;
* CSL_PwtHandle hPwt;
* CSL_PwtHwSetup setup;
*
* status = CSL_pwtGetHwSetup (hPwt, &setup);
* =============================================================================
*/
extern CSL_Status CSL_pwtGetHwSetup(
CSL_PwtHandle hPwt,
CSL_PwtHwSetup *setup
);
/*
* =============================================================================
* @func CSL_pwtHwControl
* @desc
* Function controls the PWT peripheral specified by the hanldle.
* Operation done is based on the "cmd".
*
* @arg hPwt
* The handle to the PWT instance
*
* @arg cmd
* Control command which needs to performed
*
* @arg cmdArgs
* Argument related to the command
*
* @ret CSL_Status
* CSL_SOK : Desired operation is done successful
* CSL_ESYS_INVCMD : Control command is not supported
*
* @eg
* CSL_Status status;
*
* status = CSL_pwtHwControl(hpwt, CSL_PWT_CMD_VRC_ONOFF_ON, NULL);
*
* =============================================================================
*/
extern CSL_Status CSL_pwtHwControl(
CSL_PwtHandle hPwt,
CSL_PwtHwControlCmd cmd,
void *cmdArg
);
/*
* =============================================================================
* @func CSL_pwtGetHwStatus
*
* @desc
* This function query's the H/W - PWT specified by the handle,
* query is specified by the CSL_PwtHwQuery command.
*
* @arg hPwt
* Handle to PWT object instance
*
* @arg myQuery
* User's query
*
* @arg response
* Slot for saving response to query placed
*
* @ret CSL_Status
* CSL_SOK : Successful Retreive, response will have the desired value
* CSL_ESYS_INVQUERY : Query option is not supported
*
* @eg
* CSL_Status status;
* void *response;
* ...
* status = CSL_pwtGetHwStatus(hPwt, CSL_PWT_QUERY_FRQ,
* (void *)&response);
* =============================================================================
*/
extern CSL_Status CSL_pwtGetHwStatus(
CSL_PwtHandle hPwt,
CSL_PwtHwStatusQuery myQuery,
void *response
);
/** ============================================================================
* @n@b CSL_pwtGetBaseAddress
*
* @b Description
* @n Function to get the base address of the peripheral instance.
* This function is used for getting the base address of the peripheral
* instance. This function will be called inside the CSL_pwtOpen()
* function call.This function is open for re-implementing if the user
* wants to modify the base address of the peripheral object to point to
* a different location and there by allow CSL initiated write/reads into
* peripheral MMR's go to an alternate location.
*
* @b Arguments
* @verbatim
pwtNum Specifies the instance of PWT to be opened
pPwtParam Module specific parameters
pBaseAddress Pointer to baseaddress structure containing base
address details
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_OK Open call is successful
* @li CSL_ESYS_FAIL The instance number is invalid
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n Base Address structure is populated
*
* @b Modifies
* @n Base address structure is modified
*
* @b Example
* @verbatim
CSL_Status status;
CSL_PwtBaseAddress baseAddress;
...
status = CSL_pwtGetBaseAddress(CSL_PWT, NULL, &baseAddress);
@endverbatim
* =============================================================================
*/
extern CSL_Status CSL_pwtGetBaseAddress (
CSL_InstNum pwtNum,
CSL_PwtParam *pPwtParam,
CSL_PwtBaseAddress *pBaseAddress
);
#ifdef __cplusplus
}
#endif
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?