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

📄 csl_venccomponentsetup.c

📁 TI达芬奇dm644x各硬件模块测试代码
💻 C
字号:
/** @file csl_vencComponentSetup.c
 *
 *  @brief    File for functional layer of CSL API @a CSL_vencComponentSetup()
 *
 *  Description
 *    - The @a CSL_vencComponentSetup() function definition & it's associated
 *      functions
 *
 *  Modification 1
 *    - Modified on: 10/4/2004
 *    - Reason: created the sources
 *
 *  @date 4th October, 2004
 *  @author Santosh Narayanan.
 */

#include <csl_venc.h>

#pragma CODE_SECTION (CSL_vencComponentSetup, ".text:csl_section:venc");

/** @brief Configures the VENC using the values passed in through the
 *  setup structure. 
 */
CSL_Status  CSL_vencComponentSetup(
    /** Pointer to the object that holds reference to the
     *  instance of VENC requested after the call 
	 */
    CSL_VencHandle                         hVenc,
    /** Pointer to setup structure which contains the
     *  information to program VENC to a useful state 
	 */
    CSL_VencComponentConfig                        *setup
	)
{

    CSL_Status status = CSL_SOK;

    /* Component video specific settings*/
    hVenc->regs->CMPNT = (hVenc->regs->CMPNT & 0xFFFF0804)
                                          |(CSL_FMK(VENC_CMPNT_MRGB, setup->mrgb)
                                          |CSL_FMK(VENC_CMPNT_MYDLY, setup->mydly)
                                          |CSL_FMK(VENC_CMPNT_MSYR, setup->msyr)
                                          |CSL_FMK(VENC_CMPNT_MSYB, setup->msyb)
                                          |CSL_FMK(VENC_CMPNT_MSYG, setup->msyg)
                                          |CSL_FMK(VENC_CMPNT_MCLVL, setup->mclvl)
                                          |CSL_FMK(VENC_CMPNT_MYLVL, setup->mylvl)
                                          |CSL_FMK(VENC_CMPNT_MSTUP, setup->mstup)
                                          |CSL_FMK(VENC_CMPNT_MBLS, setup->mbls)
                                          |CSL_FMK(VENC_CMPNT_MBBLD, setup->mbbld)
                                          |CSL_FMK(VENC_CMPNT_MSBLD, setup->msbld));

   hVenc->regs->ETMG2 =  (hVenc->regs->ETMG2 & 0xFFFFF000)
   	                                   |(CSL_FMK(VENC_ETMG2_MEPW, setup->mepw)
   	                                   |CSL_FMK(VENC_ETMG2_MFSW, setup->mfsw)
   	                                   |CSL_FMK(VENC_ETMG2_MLSW, setup->mlsw));

   hVenc->regs->ETMG3 = (hVenc->regs->ETMG3 & 0xFFFFFF00)
   	                                   |(CSL_FMK(VENC_ETMG3_CFPW, setup->cfpw)
   	                                   |CSL_FMK(VENC_ETMG3_CLBI, setup->clbi));

	
   return status;
}

⌨️ 快捷键说明

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