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

📄 csl_vpss.h

📁 TI达芬奇dm644x各硬件模块测试代码
💻 H
📖 第 1 页 / 共 2 页
字号:
/** @mainpage VPSS CSL 3.x
 *
 * @section Introduction
 *
 * @subsection xxx Purpose and Scope
 * The purpose of this document is to identify a set of common CSL APIs for
 * the VPSS module across various devices. The CSL developer is expected to
 * refer to this document while designing APIs for these modules. Some of the
 * listed APIs may not be applicable to a given VPSS module. While other cases
 * this list of APIs may not be sufficient to cover all the features of a
 * particular VPSS Module. The CSL developer should use his discretion designing
 * new APIs or extending the existing ones to cover these.
 *
 * @subsection aaa Terms and Abbreviations
 *   -# CSL:  Chip Support Library
 *   -# API:  Application Programmer Interface
 *
 * @subsection References
 *    -# CSL-001-DES, CSL 3.x Design Specification DocumentVersion 1.02
 *    -# VPSS_SPEC, VPSS Detailed Design Specification, Version 1.00.w.23 
 *
 */

/** @file csl_vpss.h
 *
 * @brief    Header file for functional layer of CSL
 *
 * Description
 *    - The different enumerations, structure definitions
 *      and function declarations
 *
 * @date 25th October, 2004
 * @author Vignesh LA.
 *
 */
#ifndef _CSL_VPSS_H_
#define _CSL_VPSS_H_

#ifdef __cplusplus
extern "C" {
#endif

#include <cslr.h>
#include <csl_error.h>
#include <csl_sysData.h>
#include <csl_types.h>
#include <cslr_vpss.h>


/**************************************************************************\
* VPSS global typedef declarations
\**************************************************************************/

/** @brief This object contains the reference to the instance of VPSS opened
 *  using the @a CSL_vpssOpen().
 *
 *  The pointer to this, is passed to all VPSS CSL APIs.
 */
typedef struct CSL_VpssObj {
        /** This is the mode which the CSL instance is opened     */
        CSL_OpenMode openMode;
        /** This is a unique identifier to the instance of VPSS being
         *  referred to by this object
         */
        CSL_Uid uid;
        /** This is the variable that contains the current state of a
         *  resource being shared by current instance of VPSS with
         *  other peripherals
         */
        CSL_Xio xio;
        /** This is a pointer to the registers of the instance of VPSS
         *  referred to by this object
         */  
      CSL_VpssRegsOvly regs;  
      /** This is the instance of VPSS being referred to by this object  */
      CSL_VpssNum perNum;
}CSL_VpssObj;

typedef struct CSL_VpssObj *CSL_VpssHandle;


/** @brief Enumeration for queries passed to @a CSL_vpssGetHwStatus()
 *
 * This is used to get the status of different operations or to get the
 * existing setup of VPSS.
 */
typedef enum {
    /** Get the VPSS module ID and revision numbers (response type: @a  CSL_VpssRevStatus *)        */
    CSL_VPSS_QUERY_REV_ID = 1,
	/** Check if the any of the write buffer memories have overflowed (returns 0 if no overflow)*/
	CSL_VPSS_QUERY_WBL_OVERFLOW,
	/** Check if the CCDC write buffer memory has overflowed (returns 0 if no overflow)*/
	CSL_VPSS_QUERY_CCDC_WBL_OVERFLOW,
	/** Check if the PRV write buffer memory has overflowed (returns 0 if no overflow)*/
	CSL_VPSS_QUERY_PRV_WBL_OVERFLOW,
	/** Check if the RESZ1 write buffer memory has overflowed (returns 0 if no overflow)*/
	CSL_VPSS_QUERY_RSZ1_WBL_OVERFLOW,
	/** Check if the RESZ2 write buffer memory has overflowed (returns 0 if no overflow)*/
	CSL_VPSS_QUERY_RSZ2_WBL_OVERFLOW,
	/** Check if the RESZ3 write buffer memory has overflowed (returns 0 if no overflow)*/
	CSL_VPSS_QUERY_RSZ3_WBL_OVERFLOW,
	/** Check if the RESZ4 write buffer memory has overflowed (returns 0 if no overflow)*/
	CSL_VPSS_QUERY_RSZ4_WBL_OVERFLOW,
	/** Check if the AF write buffer memory has overflowed (returns 0 if no overflow)*/
	CSL_VPSS_QUERY_AF_WBL_OVERFLOW,
	/** Check if the AEAWB write buffer memory has overflowed (returns 0 if no overflow)*/
	CSL_VPSS_QUERY_AEW_WBL_OVERFLOW    
} CSL_VpssHwStatusQuery;


/** @brief Enumeration for queries passed to @a CSL_vpssHwControl()
 *
 * This is used to select the commands to control the operations
 * existing setup of VPSS. The arguments to be passed with each
 * enumeration if any are specified next to the enumeration.
 */
 typedef enum {
      /** Reset all the write buffer memory overflows to 0*/
      CSL_VPSS_CMD_CLR_WBL_O = 1,
	  /** Reset the CCDC write buffer memory overflow to 0*/
      CSL_VPSS_CMD_CLR_CCDC_WBL_O,
      /** Reset the PRV write buffer memory overflow to 0*/
      CSL_VPSS_CMD_CLR_PRV_WBL_O,
      /** Reset the RESZ1 write buffer memory overflow to 0*/
      CSL_VPSS_CMD_CLR_RSZ1_WBL_O,
      /** Reset the RESZ2 write buffer memory overflow to 0*/
      CSL_VPSS_CMD_CLR_RSZ2_WBL_O,
      /** Reset the RESZ3 write buffer memory overflow to 0*/
      CSL_VPSS_CMD_CLR_RSZ3_WBL_O,
      /** Reset the RESZ4 write buffer memory overflow to 0*/
      CSL_VPSS_CMD_CLR_RSZ4_WBL_O,
      /** Reset the AF write buffer memory overflow to 0*/
      CSL_VPSS_CMD_CLR_AF_WBL_O,
      /** Reset the AEAWB write buffer memory overflow to 0*/
      CSL_VPSS_CMD_CLR_AEW_WBL_O,
      /** Set VBUSM priority in the system (to the DDR EMIF)
       *  The default should be the highest priority in the system
       */
	  CSL_VPSS_CMD_DMA_PRI,
	  /** Module read request expand: argument @a (CSL_VpssRdExpInfo *).
       *  The number of clock cycles (150 MHz in normal mode) to allow 
       *  between two consecutive read requests from the module. This is 
       *  for non real-time reads and spreading them with respect to the 
       *  other traffic in the system thereby allowing lesser priority 
       *  requests in the system to not be locked out during the duration 
       *  of a frame being read from SDRAM. (0-1023) for PREV & HIST;
	   *  (0-32736 and must be a multiple of 32) for RESZ.
       */
	  CSL_VPSS_CMD_READ_EXPAND,
      /** VPSS read request expand calculator: argument @a (CSL_VpssRdExpInfo *).
	   *  Call this command after all of the VPFE modules are setup but 
	   *  before they are enabled.  This function is dependent on the image size 
	   *  and SDRAM starting address and line offset registers for its calculation.
	   *  This is only useful when the any of the front end modules are reading 
	   *  from DDR memory.  This function is passed the desired number of DMA clock 
	   *  cycles to process a single frame, and returns the total number of DMA
	   *  requests that are made to the DDR and a best case estimate of what the 
	   *  modRdExp value should be to spread the processing time out over that time
	   *  period.  This value may need to be modified further in order to fine tune 
	   *  processing depending on other bandwidth requirements in the system. 
       */
      CSL_VPSS_CMD_CALC_RD_EXPAND
      
} CSL_VpssHwControlCmd;

/** @brief Enumeration for identifying the module for the @a CSL_VpssRdExpInfo struct
 *
 * This is used to identify which module will have the Read Expand set.
 */

typedef enum {
		/** Preview Engine */  
		CSL_VPSS_PREV = 0,
		/** Resizer */  
		CSL_VPSS_RESZ,
		/** Histogram */  
		CSL_VPSS_HIST
 } CSL_VpssModuleSelect;


/** @brief VPSS Peripheral ID, Class, and Revision structure
*
*  This structure is used for querying the VPSS peripheral ID, class, and revision 
*/
typedef struct CSL_VpssRevStatus_{
     /** VPSS Peripheral ID */
     Uint16 peripheralID;
     /** Class Identification */
     Uint16 classID;
     /**  Revision Number*/
     Uint16 revNum;
}CSL_VpssRevStatus;	 

	
/** @brief VPSS Read Expand structure
*/

typedef struct CSL_VpssRdExpInfo_{
	/** Module : CSL_VPSS_PREV, CSL_VPSS_RESZ, CSL_VPSS_HIST (Required by the 
		CSL_VPSS_CMD_READ_EXPAND and CSL_VPSS_CMD_CALC_RD_EXPAND commands)*/
	CSL_VpssModuleSelect module;
	/** The total numer of DMA cycles to process a single frame (150MHz DMA clock in normal mode). 
		(Required by the CSL_VPSS_CMD_CALC_RD_EXPAND command)*/
	Uint32 totalDmaCycles;
	/** The number of DMA cycles to wait in between DMA read requests for the module reads 
		(0-1023) for PREV & HIST; (0-32736)(must be a multiple of 32) for RESZ. (Required by the 
		CSL_VPSS_CMD_READ_EXPAND command or returned by the CSL_VPSS_CMD_CALC_RD_EXPAND command)*/
	Uint16 valRdExpand;
	/** The number of DMA read requests for the module reads (Returned by the 
		CSL_VPSS_CMD_CALC_RD_EXPAND command)*/
	Uint32 numRdRequests;
	
} CSL_VpssRdExpInfo; 


/** @brief This has all the fields required to configure VPSS at Power Up
 *  (After a Hardware Reset) or a Soft Reset
 *
 *  This structure is used to setup VPSS using @a CSL_vpssHwSetup() function
 */
 
typedef struct CSL_VpssHwSetup_  {
	
		/** Set DMA priority of the VPSS : (0-7) where 0 is highest priority (default) */
		Uint8 dmaPriority;
		/** Set the number of DMA cycles to wait in between DMA read requests for the prev reads 
			(0-1023) */
		Uint16 prevRdExp;

⌨️ 快捷键说明

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