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

📄 csl_pscgethwsetup.c

📁 TI达芬奇dm644x各硬件模块测试代码
💻 C
字号:
/*  ============================================================================
 *   Copyright (c) Texas Instruments Inc 2005
 *
 *   Use of this software is controlled by the terms and conditions found
 *   in the license agreement under which this software has been supplied.
 *   ===========================================================================
 */

/** @file  csl_pscGetHwSetup.c
 *
 *  @path $(CSLPATH)\psc\v1\src
 *
 *  @brief File for functional layer of CSL API @a CSL_pscGetHwSetup()
 *
 */

/* =============================================================================
 *  Revision History
 *  ===============
 *  5-June-2005 Lawrence Ronk File Created.
 * =============================================================================
 */
 
#include <csl_psc.h>

/** ============================================================================
 *   @n@b CSL_pscGetHwSetup
 *
 *   @b Description
 *   @n It retrives the hardware setup parameters of the psc
 *      specified by the given handle.
 *
 *   @b Arguments
 *   @verbatim
            hPsc        Handle to the psc
 
            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_PscHandle   hPsc;
            CSL_PscHwSetup  hwSetup;

            ...
            
            status = CSL_pscGetHwSetup(hPsc, &hwSetup);
            
            ...
            
     @endverbatim
 * ===========================================================================
 */
#pragma CODE_SECTION (CSL_pscGetHwSetup, ".text:csl_section:psc");
CSL_Status  CSL_pscGetHwSetup(
    CSL_PscHandle       hPsc,
    CSL_PscHwSetup      *hwSetup
)
{   

  CSL_Status			status;
		
  if (hPsc == NULL ){
      return CSL_ESYS_BADHANDLE;
  }
  if (hwSetup == NULL){
      return CSL_ESYS_INVPARAMS;
  }

  status = CSL_pscPdCfgGet(hPsc, hwSetup->pscPdCfg);
  if (status != CSL_SOK)
    return status;

  status = CSL_pscMdCfgGet(hPsc, hwSetup->pscMdCfg);
  if (status != CSL_SOK)
    return status;
	

  return CSL_SOK;
}

⌨️ 快捷键说明

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