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

📄 csl_osd.h

📁 TI达芬奇dm644x各硬件模块测试代码
💻 H
📖 第 1 页 / 共 2 页
字号:
  *  windows
  */

 typedef struct CSL_OsdVideoModeData {

	 /** Expansion filter enable: 0==>Off, 1==>On */
	  Uint16 expfilter;
	 /** Video window vertical expansion enable: 0==> x1, 1==> x 6/5 */
	  Uint16 vertexpand;
	 /** Video window horizontal expansion enable: 0==> x1, 1==> x 9/8 */ 
	  Uint16 horzexpand;
	 /** Video window 0/1 expansion filter coeff. inverse: 0==> Normal,
	        1==> Inverse */
	  Uint16 expnfiltcoeff;
	 /** Video window RGB mode enable: 0==>Disable, 1==>Enable */
	  Uint16 rgben;
	 /** Video window select for RGB: 0==>Video Window 0, 1==> Video Window 1 */
	 Uint16 rgbwin;

 }CSL_OsdVideoModeData;

 /**
   *  @brief Set OSD window data address
   */

 typedef struct CSL_OsdWinAddr {

        /** Window identifier */
	 Uint16 winID;
	 /** OSD window data address */	
	 Uint32 address;			

 }CSL_OsdWinAddr;

 /**
   *  @brief set OSD window configuration	     
   */
 
 typedef struct CSL_OsdWinConfig {
 
	/**	window offset address */  
       Uint16 offset;
	/**window identifier */   
	Uint16  winID;
	/** Window Display mode: 0==> Field mode, 1==> Frame mode */
	Uint16  displaymode;
	/** Horizontal direction zoom */
	Uint16  hzoom;
	/** Vertical direction zoom */
	Uint16  vzoom;

 }CSL_OsdWinConfig;

 /**
   *  @brief  Set OSD window horizontal, vertical Size
   */

 typedef struct CSL_OsdSize {

        /**  window ID - identifies window */
	 Uint16  winID;
	 /** Window width */	
	 Uint16 width;
	 /** Window height */
	 Uint16 height;

 }CSL_OsdSize;

 /**
  *   @brief Set OSD window start position
  */

 typedef struct CSL_OsdStart {
              /** window identifier */
	        Uint16  winID;
	       /** windowX starting position */		  
		Uint16 startX;
	       /** window Y starting position */	
		Uint16 startY;

 }CSL_OsdStart;

 /**
   *  @brief Ping Pong Buffer toggle select structure
   */

 typedef struct CSL_OsdPingBuff {

	   /** Ping Pong buffer toggle select */
	   Uint16 pingPongBuff;

 }CSL_OsdPingBuff;

 /**
   *  @brief Enable/ disable OSD window
   */

 typedef struct CSL_OsdWinEnable {
	   /** Set image display for Video window 0 */  	  
	    Uint16 v0Enable;
	    /** Set image display for Video window 1 */  	  
	    Uint16 v1Enable;
	    /** OSD Window 0 active */	
	    Uint16 o0Enable;
	    /** OSD Window 1 active */		
	    Uint16 o1Enable;
	    /** Rectangular cursor active */	
	    Uint16 rectCurEnable;

 }CSL_OsdWinEnable;

 /**
   * @brief Get OSD window data address
   * return realtive SDRAM address
   */
 
 typedef struct CSL_GetWinAddr {
         /** Window identifier */
	  Uint16  winID;
          /** Windows address */
         Uint32  winAddr;		  

 }CSL_GetWinAddr;


 /**************************************************************************\
* OSD global function declarations
\**************************************************************************/

/**  This function is idempotent in that calling it many times is same as
 *   calling it once. This function initializes the OSD CSL data structures.
 *
 * <b> Usage Constraints: </b>
 * CSL system initialization must be successfully completed by invoking
 * @a CSL_sysInit() before calling this function. This function should be
 * called before using any of the CSL APIs
 *
 * @b Example:
 * @verbatim


   ...
   CSL_sysInit();
   if (CSL_SOK != CSL_osdInit()) {
       return;
   }
   @endverbatim
 *
 * @return returns the status of the operation
 *
 */
CSL_Status  CSL_osdInit(
   void
);


/** The open call sets up the data structures for the particular instance of
 *  OSD device. The device can be re-opened anytime after it has been normally
 *  closed if so required. OSD Hardware setup will be performed at the end of
 *  the open call only if the HwSetup Pointer supplied was non- NULL. The handle
 *  returned by this call is input as an essential argument for rest of the APIs
 *  described for this module.
 *
 *  <b> Usage Constraints: </b>
 *  The CSL system as well as osd must be successfully initialized
 *  via @a CSL_sysInit() and @a CSL_osdInit() before calling this
 *  function. Memory for the @a CSL_osdObj must be allocated outside
 *  this call. This object must be retained while usage of this peripheral.
 *
 *  @b Example:
 *  @verbatim

	  CSL_OsdObj     osdObj;
	  CSL_OsdHwSetup osdSetup;
	  CSL_Status       status;
 		...
	  hOsd = CSL_osdOpen(&osdObj,
                          CSL_OSD_0,
                          CSL_EXCLUSIVE,
                          &osdSetup,
                          &status);
   @endverbatim
 *
 * @return returns a handle @a CSL_OsdHandle to the requested instance of
 * OSD if the call is successful, otherwise, a @a NULL is returned.
 *
 */
CSL_OsdHandle CSL_osdOpen (
    /** Pointer to the object that holds reference to the
     *  instance of OSD requested after the call
     */
    CSL_OsdObj              *hOsdObj,
    /** Instance of OSD to which a handle is requested
     */
    CSL_OsdNum               osdNum,
    /** Specifies if OSD should be opened with exclusive or
     *  shared access to the associate pins
     */
    CSL_OpenMode                openMode,
    /** This returns the status (success/errors) of the call
     */
    CSL_Status                  *status
);

/**  The Close call releases the resource and appropriate shared pins.
 *
 * <b> Usage Constraints: </b>
 * Both @a CSL_osdInit() and @a CSL_osdOpen() must be called successfully
 * in that order before @a CSL_osdClose() can be called.
 *
 * @b Example:
 * @verbatim


   CSL_OsdHandle hOsd;
   ...
   CSL_osdClose(hOsd);
   @endverbatim
 *
 * @return returns the status of the operation (see @a CSL_Status)
 *
 */
CSL_Status  CSL_osdClose(
    /** Pointer to the object that holds reference to the
     *  instance of OSD requested after the call
     */
    CSL_OsdHandle                         hOsd
);


/** This function initializes the device registers with the appropriate values
 *  provided through the HwSetup Data structure. This function needs to be called
 *  only if the HwSetup Structure was not previously passed through the Open call.
 *  After the Setup is completed, the serial device is ready for data transfer.
 *  For information passed through the HwSetup Data structure refer
 *  @a CSL_OsdHwSetup.
 *
 *  <b> Usage Constraints: </b>
 *  Both @a CSL_osdInit() and @a CSL_osdOpen() must be called
 *  successfully in that order before this function can be called. The user
 *  has to allocate space for & fill in the main setup structure appropriately
 *  before calling this function
 *
 * @b Example:
 * @verbatim
     CSL_OsdHandle hOsd;
     CSL_OsdHwSetup hwSetup = CSL_OSD_HWSETUP_DEFAULTS;
     CSL_osdHwSetup(hOsd, &hwSetup);
  @endverbatim
 *
 * @return Returns the status of the setup operation
 *
 */
CSL_Status  CSL_osdHwSetup(
    /** Pointer to the object that holds reference to the
     *  instance of OSD requested after the call
     */
    CSL_OsdHandle                         hOsd,
    /** Pointer to setup structure which contains the
     *  information to program OSD to a useful state
     */
    CSL_OsdHwSetup                        *setup
);



/** Control operations for the OSD.  For a particular control operation, the
 *  pointer to the corresponding data type needs to be passed as argument HwControl
 *  function Call. All the arguments (Structure elements included) passed to  the
 *  HwControl function are inputs. For the list of commands supported and argument
 *  type that can be @a void* casted & passed with a particular command refer to
 *  @a CSL_OsdHwControlCmd.
 *
 *  <b> Usage Constraints: </b>
 *  Both @a CSL_osdInit() and @a CSL_osdOpen() must be called successfully
 *  in that order before @a CSL_osdHwControl() can be called. For the
 *  argument type that can be @a void* casted & passed with a particular command
 *  refer to @a CSL_OsdHwControlCmd
 *
 * @b Example:
 * @verbatim
       CSL_OsdHandle hOsd;
       CSL_Status status;
       ...
       status = CSL_osdHwControl(hOsd,
                                    CSL_OSD_CMD_START,
                                   &command);
   @endverbatim
 *
 *  @return returns the status of the operation (see @a CSL_Status)
 *
 */
CSL_Status  CSL_osdHwControl(
    /** Pointer to the object that holds reference to the
     *  instance of OSD requested after the call
     */
    CSL_OsdHandle                        hOsd,
    /** The command to this API indicates the action to be taken
     */
    CSL_OsdHwControlCmd                  cmd,
    /** An optional argument @a void* casted
     */
    void                                 *arg
);


/** This function is used to read the current device configuration, status flags
 *  and the value present associated registers. Following table details the various
 *  status queries supported and the associated data structure to record the response.
 *  User should allocate memory for the said data type and pass its pointer as an
 *  unadorned void* argument to the status query call. For details about the various
 *  status queries supported and the associated data structure to record the response,
 *  refer to @a CSL_OsdHwStatusQuery
 *
 *  <b> Usage Constraints: </b>
 *  Both @a CSL_osdInit() and @a CSL_osdOpen() must be called successfully
 *  in that order before @a CSL_osdGetHwStatus() can be called. For the
 *  argument type that can be @a void* casted & passed with a particular command
 *  refer to @a CSL_OsdHwStatusQuery
 *
 * @b Example:
 * @verbatim
	  CSL_OsdHandle hOsd;
	  CSL_Status status;
	  Uint16  *response;
	   ...
	  status = CSL_osdGetHwStatus(hOsd,
                           CSL_OSD_QUERY_BUS_BUSY,
                                  &response);
   @endverbatim
 *
 * @return Returns the status of the operation (see @a CSL_Status)
 *
 */
CSL_Status  CSL_osdGetHwStatus(
    /** Pointer to the object that holds reference to the
     *  instance of OSD requested after the call
     */
    CSL_OsdHandle                         hOsd,
    /** The query to this API which indicates the status
     *  to be returned
     */
    CSL_OsdHwStatusQuery                  query,
    /** Placeholder to return the status. @a void* casted */
    void                                    *response
);

#ifdef __cplusplus
}
#endif


#endif





⌨️ 快捷键说明

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