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

📄 csl_uhpi.h

📁 基于ti tms320c672x下音频开发例子程式
💻 H
📖 第 1 页 / 共 3 页
字号:
        CSL_Status              status;
        CSL_UhpiBaseAddress  baseAddress;

        ...

        status = CSL_uhpiGetBaseAddress(CSL_UHPI_PER_CNT, NULL,
                                           &baseAddress);
        ...

    @endverbatim
 * ===========================================================================
 */
extern CSL_Status CSL_uhpiGetBaseAddress (
        CSL_InstNum                 uhpiNum,
        CSL_UhpiParam *          pUhpiParam,
        CSL_UhpiBaseAddress *    pBaseAddress
);

/** =============================================================================
 *   @n@b CSL_uhpiClose
 *
 *   @b Description
 *   @n This function closes the specified instance of UHPI.
 *
 *   @b Arguments
 *   @verbatim
            hUhpi            Handle to the uhpi

     @endverbatim
 *
 *   <b> Return Value </b>  CSL_Status
 *   @li                    CSL_SOK             - Close successful
 *   @li                    CSL_ESYS_BADHANDLE  - Invalid handle
 *
 *   @b Example
 *   @verbatim
            CSL_UhpiHandle   hUhpi;
            CSL_status          status;

            ...

            status = CSL_uhpiClose(hUhpi, &hwSetup);
     @endverbatim
 * ===========================================================================
 */
extern CSL_Status  CSL_uhpiClose (
    CSL_UhpiHandle    hUhpi
);

/** ============================================================================
 *   @n@b CSL_uhpiHwSetup
 *
 *   @b Description
 *   @n It configures the uhpi registers as uhpi the values passed
 *      in the hardware setup structure.
 *
 *   @b Arguments
 *   @verbatim
            hUhpi            Handle to the uhpi
 
            hwSetup             Pointer to harware setup structure
 
     @endverbatim
 *
 *   <b> Return Value </b>  CSL_Status
 *   @li                    CSL_SOK             - Hardware setup successful
 *   @li                    CSL_ESYS_BADHANDLE  - Invalid handle
 *   @li                    CSL_ESYS_INVPARAMS  - Hardware structure is not
                                                  properly initialized
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  DSP UHPI controller registers are configured according 
 *       to the hardware setup parameters
 *
 *   @b Modifies
 *   @n ARM PLL controller registers
 *
 *   @b Example
 *   @verbatim
            CSL_UhpiHandle   hUhpi;
            CSL_UhpiObj      uhpiObj;
            CSL_UhpiHwSetup  hwSetup;
            CSL_status          status;

            ...
            
            hUhpi = CSL_uhpiOpen(&uhpiObj, CSL_UHPI, NULL, &status);            
                      
            status = CSL_uhpiHwSetup(hUhpi, &hwSetup);
     @endverbatim
 * ===========================================================================
 */
extern CSL_Status  CSL_uhpiHwSetup(
    CSL_UhpiHandle       hUhpi,
    CSL_UhpiHwSetup     *hwSetup
);

/** ============================================================================
 *   @n@b CSL_uhpiHwControl
 *
 *   @b Description
 *   @n Takes a command of UHPI with an optional argument & implements it.
 *
 *   @b Arguments
 *   @verbatim
            hUhpi        Handle to the UHPI instance

            cmd             The command to this API indicates the action to be
                            taken on UHPI.

            arg             An optional argument.

     @endverbatim
 *
 *   <b> Return Value </b>  CSL_Status
 *   @li            CSL_SOK               - Status info return successful.
 *   @li            CSL_ESYS_BADHANDLE    - Invalid handle
 *   @li            CSL_ESYS_INVCMD       - Invalid command
 *   @li            CSL_ESYS_NOTSUPPORTED - Action not supported.
                                            (system not in bypass mode. if the 
                                             mode is not bypass mode & the 
                                             developer tries to write into
                                             D0 or PLLM registers or tries to 
                                             set the uhpi in powerdown state
                                             then this error status is returned)
 *   @li            CSL_ESYS_INVPARAMS    - Invalid parameter
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  None
 *
 *   @b Modifies
 *   @n The hardware registers of UHPI.
 *
 *   @b Example
 *   @verbatim
        CSL_UhpiHandle         huhpi;
        CSL_UhpiHwControlCmd   cmd;
        void                      arg;

        status = CSL_uhpiHwControl (hUhpi, cmd, &arg);

     @endverbatim
 * =============================================================================
 */
extern CSL_Status  CSL_uhpiHwControl(
    CSL_UhpiHandle          hUhpi,
    CSL_UhpiHwControlCmd    cmd,
    void                      *cmdArg
);

/** ============================================================================
 *   @n@b CSL_uhpiGetHwStatus
 *
 *   @b Description
 *   @n Gets the status of the different operations of UHPI.
 *
 *   @b Arguments
 *   @verbatim
            hUhpi      Handle to the UHPI instance

            query         The query to this API of UHPI which indicates the
                          status to be returned.

            response      Placeholder to return the status.

     @endverbatim
 *
 *   <b> Return Value </b>  CSL_Status
 *   @li                    CSL_SOK             - Status info return successful
 *   @li                    CSL_ESYS_BADHANDLE  - Invalid handle
 *   @li                    CSL_ESYS_INVQUERY   - Invalid query command
 *   @li                    CSL_ESYS_INVPARAMS  - Invalid parameter
 *  
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  None
 *
 *   @b Modifies
 *   @n None
 *
 *   @b Example
 *   @verbatim
        CSL_UhpiHandle          hUhpi;
        CSL_uhpiHwStatusQuery   query;
        void                       reponse;

        status = CSL_uhpiGetHwStatus (hUhpi, query, &response);

     @endverbatim
 * =============================================================================
 */
extern CSL_Status  CSL_uhpiGetHwStatus (
    CSL_UhpiHandle           hUhpi,
    CSL_UhpiHwStatusQuery    query,
    void                       *response
);

/** ============================================================================
 *   @n@b CSL_uhpiHwSetupRaw
 *
 *   @b Description
 *   @n This function initializes the device registers with the register-values
 *      provided through the Config Data structure.
 *
 *   @b Arguments
 *   @verbatim
            hUhpi        Handle to the UHPI instance

            config          Pointer to config structure
     @endverbatim
 *
 *   <b> Return Value </b>  CSL_Status
 *   @li            CSL_SOK               - Configuration successful
 *   @li            CSL_ESYS_BADHANDLE    - Invalid handle
 *   @li            CSL_ESYS_INVPARAMS    - Configuration is not
                                            properly initialized
 *   @li            CSL_ESYS_NOTSUPPORTED - Action not supported.
                                            (system not in bypass mode. if the 
                                             mode is not bypass mode & the 
                                             developer tries to write into
                                             D0 or PLLM registers or tries to 
                                             set the uhpi in powerdown state
                                             then this error status is returned)
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  The registers of the specified UHPI instance will be setup
 *       according to input configuration structure values.
 *
 *   @b Modifies
 *   @n Hardware registers of the specified UHPI instance.
 *
 *   @b Example
 *   @verbatim
        CSL_UhpiHandle       hUhpi;
        CSL_UhpiConfig       config = CSL_UHPI_CONFIG_DEFAULTS;
        CSL_Status              status;

        status = CSL_uhpiHwSetupRaw (hUhpi, &config);

     @endverbatim
 * =============================================================================
 */
extern CSL_Status  CSL_uhpiHwSetupRaw (
    CSL_UhpiHandle           hUhpi,
    CSL_UhpiConfig          *config
);

/** ============================================================================
 *   @n@b CSL_uhpiGetHwSetup
 *
 *   @b Description
 *   @n It retrives the hardware setup parameters of the uhpi
 *      specified by the given handle.
 *
 *   @b Arguments
 *   @verbatim
            hUhpi        Handle to the uhpi
 
            hwSetup         Pointer to the harware setup structure
 
     @endverbatim
 *
 *   <b> Return Value </b>  CSL_Status
 *   @li                    CSL_SOK             - Retrieving the hardware setup
 *                                                parameters is successful
 *   @li                    CSL_ESYS_BADHANDLE  - The handle is passed is
 *                                                invalid
 *   @li                    CSL_ESYS_INVPARAMS  - Invalid parameter
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  The hardware setup structure is populated with the hardware setup
 *       parameters
 *
 *   @b Modifies
 *   @n hwSetup variable
 *
 *   @b Example
 *   @verbatim
            CSL_UhpiHandle   hUhpi;
            CSL_UhpiHwSetup  hwSetup;

            ...
            
            status = CSL_uhpiGetHwSetup(hUhpi, &hwSetup);
            
            ...
            
     @endverbatim
 * ===========================================================================
 */
extern CSL_Status  CSL_uhpiGetHwSetup(
    CSL_UhpiHandle       hUhpi,
    CSL_UhpiHwSetup     *hwSetup
);

#ifdef __cplusplus
}
#endif

#endif  /* _CSL_UHPI_H_ */

⌨️ 快捷键说明

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