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

📄 _csl_reszselectinputsource.c

📁 TI达芬奇dm644x各硬件模块测试代码
💻 C
字号:
/** @file _csl_reszSelectInputSource.c
 *
 *  @brief    File for functional layer of CSL API @a CSL_reszSelectInputSource()
 *
 *  Description
 *    - The @a CSL_reszSelectInputSource() function definition & it's associated
 *      functions
 *
 *  @date 10th May, 2005
 *  @author Jesse Villarreal.
 */

#include <csl_resz_aux.h>
#include <csl_ccdc.h>
#include <csl_prev.h>

#pragma CODE_SECTION (CSL_reszSelectInputSource, ".text:csl_section:resz");

/** @brief Selects the input source to the RESZ module
 *	
 */
CSL_Status  CSL_reszSelectInputSource(
    /** Pointer to the object that holds reference to the
     *  instance of RESZ requested after the call 
	 */
    CSL_ReszHandle                         hResz,
    /** Selects the input source to the RESZ module
	 */
    CSL_ReszInputSource					   source
	){

	CSL_ReszRegsOvly reszRegs =  hResz->regs;
	CSL_CcdcRegsOvly ccdcRegs =  (CSL_CcdcRegsOvly)_CSL_ccdcGetBaseAddr(CSL_CCDC_0); 
	CSL_PrevRegsOvly prevRegs =  (CSL_PrevRegsOvly)_CSL_prevGetBaseAddr(CSL_PREV_0); 

    switch(source) {
      case CSL_RESZ_INPUT_PREVIEW:
        CSL_FINS(ccdcRegs->SYN_MODE, CCDC_SYN_MODE_SDR2RSZ, CSL_CCDC_SYN_MODE_SDR2RSZ_DISABLE); // disable input from CCDC
        CSL_FINSFNR(prevRegs->PCR, PREV_PCR_RSZPORT, PREV_PCR_DRK_FAIL, CSL_PREV_PCR_RSZPORT_ENABLE);  // enable  input from PREV
        CSL_FINS(reszRegs->RSZ_CNT,RESZ_RSZ_CNT_INPSRC, CSL_RESZ_RSZ_CNT_INPSRC_PREVIEW_OR_CCDC);     // input from PREV or CCDC 
        
        break;
      case CSL_RESZ_INPUT_SDRAM:
//		CSL_FINS(ccdcRegs->SYN_MODE, CCDC_SYN_MODE_SDR2RSZ, 0); // disable input from CCDC
//		CSL_FINS(prevRegs->PCR, PREV_PCR_RSZPORT, 0);            // disable input from PREV 
        CSL_FINS(reszRegs->RSZ_CNT,RESZ_RSZ_CNT_INPSRC, CSL_RESZ_RSZ_CNT_INPSRC_SDRAM);     // input from SDRAM
        
        break;
      case CSL_RESZ_INPUT_CCDC:
        CSL_FINS(ccdcRegs->SYN_MODE, CCDC_SYN_MODE_SDR2RSZ, CSL_CCDC_SYN_MODE_SDR2RSZ_ENABLE); // enable  input from CCDC
        CSL_FINSFNR(prevRegs->PCR, PREV_PCR_RSZPORT, PREV_PCR_DRK_FAIL, CSL_PREV_PCR_RSZPORT_DISABLE); // disable input from PREV 
        CSL_FINS(reszRegs->RSZ_CNT,RESZ_RSZ_CNT_INPSRC, CSL_RESZ_RSZ_CNT_INPSRC_PREVIEW_OR_CCDC);     // input from PREV or CCDC
        
        break;
      default:
        return (CSL_ESYS_INVPARAMS);
    }
    
    return (CSL_SOK);
}

⌨️ 快捷键说明

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