⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 csl_wdt.h

📁 dsp在音频处理中的运用
💻 H
📖 第 1 页 / 共 2 页
字号:
 *   @arg  pWdtParam
 *              Watchdog timer module specific parameters.
 *   @arg  status
 *              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_WdtHandle
 *              Valid handle, if status is CSL_SOK
 *
 *   @eg
 *          CSL_status          status;
 *          CSL_WdtObj          wdtObj;
 *          CSL_WdtHandle       hWdt;
 *
 *          ...
 *
 *          hWdt = CSL_wdtOpen (&wdtObj, CSL_WDT, NULL, &status);
 *
 *          ...
 *
 * =============================================================================
 */
extern CSL_WdtHandle CSL_wdtOpen (
    CSL_WdtObj *            wdtObj,
    CSL_InstNum             wdtNum,
    CSL_WdtParam *			pWdtParam,
    CSL_Status*             status
);

/** ============================================================================
 *   @n@b CSL_wdtGetBaseAddress
 *
 *   @b Description
 *   @n  This function gets the base address of the given watchdog timer
 *       instance. 
 *
 *   @b Arguments
 *   @verbatim      
            wdtNum          Specifies the instance of the watchdog timer for
                            which the base address is requested
 
            pWdtParam       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            Open call is successful
 *   @li					CSL_ESYS_FAIL     The watchdog timer 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_WdtBaseAddress  baseAddress;

       ...
       
       status = CSL_wdtGetBaseAddress(CSL_WDT, NULL, &baseAddress);

    @endverbatim
 * ===========================================================================
 */
extern CSL_Status CSL_wdtGetBaseAddress (
        CSL_InstNum  			wdtNum,
        CSL_WdtParam *			pWdtParam,
        CSL_WdtBaseAddress *	pBaseAddress
);

/* =============================================================================
 *   @func csl_wdtClose.c
 *
 *   @desc
 *     This function marks that CSL for the watchdog timer instance is closed. 
 *     CSL for the watchdog timer instance need to be reopened before using any
 *     watchdog timer CSL API again.
 *      
 *   @arg    hwdt
 *           Handle to the watchdog timer instance 
 *
 *   @ret    CSL_Status
 *           CSL_SOK            - Watchdog timer instance is closed successfully
 *           CSL_ESYS_BADHANDLE - The handle passed is invalid
 *
 *   @eg
 *       CSL_wdtClose (hWdt);
 * ===========================================================================
 */
extern CSL_Status  CSL_wdtClose (
    CSL_WdtHandle    hWdt
);

/* =============================================================================
 *   @func CSL_wdtHwSetup
 *
 *   @desc
 *       It configures the watchdog timer registers as per the values passed
 *       in the hardware setup structure.
 *
 *   @arg    hWdt
 *           Handle to the watchdog timer
 *            
 *   @arg    hwSetup         
 *           Pointer to harware 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_WdtHandle   hWdt;
 *       CSL_WdtObj      wdtObj;
 *       CSL_WdtHwSetup  hwSetup;
 *       CSL_status      status;
 *
 *       ...
 *
 *       hWdt = CSL_wdtOpen (&wdtObj, CSL_WDT, NULL, &status); 
 *       hwSetup.loadVal = 0xFFFF;
 *       hwSetup.timerMode = CSL_WDT_MODE_GPT;
 *       hwSetup.preScaleValue = CSL_WDT_PRESCALE_CLKBY2;
 *       hwSetup.loadMode = CSL_WDT_LOADMODE_AR;
 *       hwSetup.emuMode = CSL_WDT_EMUMODE_STOP;
 *           
 *       status = CSL_wdtHwSetup(hWdt, &hwSetup);
 * ===========================================================================
 */
extern CSL_Status  CSL_wdtHwSetup(
    CSL_WdtHandle      hWdt,
    CSL_WdtHwSetup     *hwSetup
);

/* =============================================================================
 *   @func CSL_wdtHwControl
 *
 *   @desc
 *       This function performs various control operations on the watchdog timer,
 *       based on the command passed.
 *
 *   @arg    hWdt
 *           Handle to the watchdog timer
 *
 *   @arg    cmd
 *           Operation to be performed on the timer
 *
 *   @arg    cmdArg
 *           Arguement specific to the command 
 *            
 *   @eg
 *       CSL_WdtCount    wdtCount = 0xABCD;
 *       status = CSL_wdtHwControl(hWdt, CSL_TIMER_CMD_LOAD, &wdtCount);
 * =============================================================================
 */
extern CSL_Status  CSL_wdtHwControl(
    CSL_WdtHandle          hWdt,
    CSL_WdtHwControlCmd    cmd,
    void                   *cmdArg
);

/* =============================================================================
 *   @func CSL_wdtGetHwStatus
 *
 *   @desc
 *       This function is used to get the value of various parameters of the
 *       watchdog timer. The value returned depends on the query passed.
 *
 *   @arg    hWdt
 *           Handle to the watchdog timer
 *
 *   @arg    query
 *           Query to be performed. 
 *
 *   @arg    response
 *           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
 *       Uint16       count = 0;
 *       CSL_Status   status;
 *
 *       ...              
 *
 *       status = CSL_wdtGetHwStatus(hWdt, CSL_WDT_QUERY_COUNT, &count);
 *
 *       ...
* =============================================================================
 */
extern CSL_Status  CSL_wdtGetHwStatus (
    CSL_WdtHandle          hWdt,
    CSL_WdtHwStatusQuery   query,
    void                   *response
);

/*
 * =============================================================================
 *   @func CSL_wdtHwSetupRaw
 *
 *   @desc
 *       This function configures the registers of watchdog timer as per the
 *       values given in the config structure.  
 *
 *   @arg hWdt
 *        Handle to the watchdog timer instance
 *
 *   @arg hwConfig
 *        Pointer to the watchdog timer config structure
 *
 *   @ret CSL_Status
 *         CSL_SOK             - Configuration successful
 *         CSL_ESYS_BADHANDLE  - Invalid handle
 *
 *   @eg
 *    
 *        CSL_status            status;
 *        CSL_WdtConfig	        hwConfig;
 *
 *        ...
 *
 *        status = CSL_wdtHwSetupRaw (hWdt, &hwConfig);
 *
 *        ...
 * ===========================================================================
 */
extern CSL_Status  CSL_wdtHwSetupRaw (
    CSL_WdtHandle           hWdt,
    CSL_WdtConfig *         config
);

/** ============================================================================
 *   @func CSL_wdtGetHwSetup
 *
 *   @desc
 *       It retrives the hardware setup parameters of the watchdog timer module
 *       specified by the given handle.
 *
 *   @arg    hWdt
 *           Handle to the watchdog timer
 *
 *   @arg    hwSetup
 *           Pointer to the harware setup structure
 *
 *   @ret    CSL_Status
 *           CSL_SOK            - Retrieving the hardware setup                                           parameters is successful
 *           CSL_ESYS_BADHANDLE - The handle is passed is invalid
 *
 *   @eg
 *       CSL_WdtHandle   hWdt;
 *       CSL_WdtHwSetup  hwSetup;
 *
 *       ...
 *
 *       status = CSL_wdtGetHwSetup(hWdt, &hwSetup);
 *
 *       ...
* ==============================================================================
 */
extern CSL_Status  CSL_wdtGetHwSetup(
    CSL_WdtHandle      hWdt,
    CSL_WdtHwSetup     *hwSetup
);

#ifdef __cplusplus
}
#endif

#endif  /* _CSL_WDT_H_ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -