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

📄 hw_tw2834_api.h

📁 1、基于韩国at2041芯片开发的Linux环境的DVR代码。 2、以原来代码进行了修改。 3、主要修改网络通讯出现异常问题处理 4、硬盘覆盖录像不起作用
💻 H
字号:
/* set tabstop=4 */
/********************************************************************************
 *                                                                              *
 * Copyright(C) 2004  Penta-Micro                                               *
 *                                                                              *
 * ALL RIGHT RESERVED                                                           *
 *                                                                              *
 * This software is the property of Penta-Micro and is furnished under          *
 * license by Penta-Micro. This software may be used only in accordance         *	
 * with the terms of said license. This copyright notice may not be             *
 * removed, modified or obliterated without the prior written permission        *
 * of Penta-Micro.                                                              *
 *                                                                              *
 * This software may not be copyed, transmitted, provided to or otherwise       *
 * made available to any other person, company, corporation	or other entity     *
 * except as specified in the terms of said license.                            *
 *                                                                              *
 * No right, title, ownership or other interest in the software is hereby       *
 * granted or transferred.                                                      *
 *                                                                              *
 * The information contained herein is subject to change without notice and     *
 * should not be construed as a commitment by Penta-Micro.                      *
 *                                                                              *
 ********************************************************************************
 
  MODULE NAME:  HW_TW2834_API.H
  
  REVISION HISTORY:
  
  Date       Ver Name                  Description
  ---------- --- --------------------- -----------------------------------------
 06/16/2005 1.0 JiGwanKang(xchannel)       Created 
 ...............................................................................
 
  DESCRIPTION:
  
  This Module contains definition for TW2834 function.
  
 ...............................................................................
*/    
 
#ifndef _HW_TW2834_API_H
#define _HW_TW2834_API_H


/** ************************************************************************* ** 
 ** includes
 ** ************************************************************************* **/
#include "typedef.h"



/** ************************************************************************* ** 
 ** defines
 ** ************************************************************************* **/
//#define I2C_INTERFACE

#define MANUAL_VIDEO_MODE

#define TW2834_READ_CMD		0x42  //0x85 >> 1
#define TW2834_WRITE_CMD		0x42  //0x84 >> 1

/* define for TW2834 page */
#define	TW2834_PAGE0                 0
#define	TW2834_PAGE1                 1
#define	TW2834_PAGE2                 2
/* define for fonRAM page list */
#define	FONT_PAGE0	                 	0
#define	FONT_PAGE1				1
#define	FONT_PAGE2				2
#define	FONT_PAGE3				3
#define	FONT_PAGE4				4
#define	FONT_PAGE5	                 	5
#define	FONT_PAGE6				6
#define	FONT_PAGE7				7
#define	FONT_PAGE8				8
#define	FONT_PAGE9				9
#define	FONT_PAGE10	                 	10
#define	FONT_PAGE11				11
#define	FONT_PAGE12				12
#define	FONT_PAGE13				13
#define	FONT_PAGE14				14
#define	FONT_PAGE15				15

/* define for TW2834 character and bitmap color */
#define	WHITE75		0
#define	YELLOW		1
#define	CYAN			2
#define	GREEN			3
#define	MAGENTA		4
#define	RED			5
#define	BLUE			6
#define	BLACK			7
#define	WHITE100		8
#define	WHITE50		9
#define	WHITE25		10
#define	BLUE75		11
#define	COL_LUT0	      12
#define	COL_LUT1	      13
#define	COL_LUT2	      14
#define	COL_LUT3	      15

#define	BIT0			0x01
#define	BIT1			0x02
#define	BIT2			0x04
#define	BIT3			0x08
#define	BIT4			0x10
#define	BIT5			0x20
#define	BIT6			0x40
#define	BIT7			0x80

/* define for the display path ( VAOUTxY or VAOUTxX ) */
#define	X_PATH		BIT7
#define	Y_PATH		BIT6
#define	ALL_PATH	      (X_PATH|Y_PATH)

#define	OSD_OPTION			0x60
#define	OSD_PROP_ONE		0x20
#define	OSD_PROP_ALL		0x40

#define	OSD_CLEAR			BIT5

#define	OSD_DELAY_V			2

#define	OSD_EN_EVEN		BIT4
#define	OSD_EN_ODD			BIT5

#define	OSD_PAGE0			0
#define	OSD_MODE_BMP		BIT7
#define  OSD_OPT_MIX            BIT3
#define  OSD_OPT_BLINK        BIT2
#define  OSD_OPT_CLASS0     0x00
#define  OSD_OPT_CLASS1     0x01
#define  OSD_OPT_CLASS2     0x02
#define  OSD_OPT_CLASS3     0x03

#define	REG_CURCTL			0x00
#define  REG_CLK_CTL            0x7f
#define	REG_MCLK_CTL		0x7e
#define	MEM_INIT				0x80

#define 	BOX_EN_X				BIT7
#define	BOX_EN_Y				BIT6
#define	BOX_OBND			BIT5
#define	BOX_IBND				BIT4
#define	BOX_PLNMIX			BIT3
#define	BOX_PLN_EN			BIT2

#define  CHAR_WR_MODE		0x20 /* Write 1 Character Line Attribute 					*/
#define  CHAR_RD_FLD			0x30 /* Both odd and even field font is used for frame display */
#define  CHAR_VF_SIZE		0x00 /* 10 Line 											*/
#define  CHAR_HF_SIZE		0x05 /* 16 dots with 720 pixels resolution 					*/
#define	IfBitSet(x,y)		if(((x)&(y)) == (y))
#define	SetBit(x,y)			((x) |= (y))

/* ioctl command */
#define REGISTER_WRITE   	  	0x1
#define REGISTER_READ      		0x2
#define FONTRAM_WRITE   	  	0x3
#define OSDRAM_WRITE     	  	0x4

/** ************************************************************************* ** 
 ** typedefs
 ** ************************************************************************* **/

  
/** ************************************************************************* ** 
 ** function prototypes
 ** ************************************************************************* **/
RETURN      tw2834_open(void);
void	            tw2834_close(void);
RETURN      tw2834_font_upload(void);
RETURN      tw2834_write_reg(UNS8 page, UNS8 sub_addr, UNS8 data);
RETURN      tw2834_burst_write_reg(UNS8 page, UNS8 sub_addr, UNS8 *data, UNS16 length);
RETURN      tw2834_write_font(S16 path, S16 posx, S16 posy, S16 color, S16 property, S16 font_index);
RETURN      tw2834_write_string(S16 path, S16 posx, S16 posy, S16 color, S16 property, UNS8 *str);
RETURN      tw2834_read_reg(UNS8 page, UNS8 sub_addr, UNS8 *data, UNS16 length);
RETURN      tw2834_osd_clear(S16 path);
// pentamicro 2006.01.11
RETURN	     tw2834_set_mux_rec(VIDEO_SIZE size, VIDEO_MODE mode);
RETURN 	tw2834_motion_block_init(UNS16 ch, VIDEO_MODE mode, BOOL flag);
RETURN 	tw2834_cursor_set_pos(UNS16 ch, UNS16 posx, UNS16 posy);
RETURN 	tw2834_cursor_select(S16 ch, S16 posx, S16 posy, S16 color, BOOL flag);
RETURN 	tw2834_bg_box_draw(S16 box_num, S16 draw_flag, S16 mode, S16 posx, S16 posy, S16 sizex, S16 sizey);
#if 1//xchannel test
RETURN 	bg_image_draw(void);
#endif
#if 0//org code
void            tw2834_set_blink_time(S16 property);
#endif
RETURN      tw2834_initialize(VIDEO_MODE *mode);
#endif /* _HW_TW2834_API_H */

⌨️ 快捷键说明

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