csl_vpbehwcontrol.c

来自「TI达芬奇dm644x各硬件模块测试代码」· C语言 代码 · 共 61 行

C
61
字号

/*   ==========================================================================
 *   Copyright (c) Texas Instruments Inc , 2004
 *
 *   Use of this software is controlled by the terms and conditions found
 *   in the license agreement under which this software has been supplied
 *   priovided
 *   ==========================================================================
*/
/** \file csl_vpbeHwControl.c
 *
 *  \brief    File for functional layer of CSL API \a CSL_vpbeHwControl()
 *
 *  Description
 *    - The \a CSL_vpbeHwControl() function definition & it's associated
 *      functions
 *
 *  \date   11th October, 2004
 *  \author Santosh Narayanan
 */

#include <csl_vpbe.h>

#pragma CODE_SECTION (CSL_vpbeHwControl, ".text:csl_section:vpbe");

/**
    \brief Control VPBE module

    \param hVpbe  Pointer to the object that holds reference to the instance
                 of VPBE requested
    \param cmd   Command to perform an operation on VPBE

    \param arg   Arguments if any for the command

    \return if success, \c CSL_SOK, else error code
    \see 
*/

CSL_Status CSL_vpbeHwControl ( CSL_VpbeHandle hVpbe,
                                CSL_VpbeHwControlCmd cmd,
                                void *arg ) {
                                
  CSL_Status status = CSL_SOK;   

  switch (cmd) {

  case CSL_VPBE_CMD_CLKSEL_FULL:
    CSL_FINS (hVpbe->regs->PCR, VPBE_PCR_VENC_DIV,  FALSE);
    break;

  case CSL_VPBE_CMD_CLKSEL_HALF:
    CSL_FINS (hVpbe->regs->PCR, VPBE_PCR_VENC_DIV,  TRUE);
    break;

  default:
     status = CSL_ESYS_INVCMD ;
     break;
   }
  return status;
}

⌨️ 快捷键说明

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