📄 tw2834_def.h
字号:
/* extdrv/peripheral/vad/tw2834_def.h
*
*
*
* History:
* 10-Apr-2006 Start of Hi3510 tw2834 support
* 2006-04-27 set the register to default of manufacturer
* 2006-04-28 adjust the comb filter register
* 2006-04-29 set the register bound unable
* 2006-05-15 changed register 0x14 and 0xfc for filters
* 2006-08-12 change the tw2834 analog output from record path
* 2006-09-06 change register 0x3c 0x3d 0xf8 0xfc for picture quality
*/
#ifndef _TW2834_DEF_H
#define _TW2834_DEF_H
#define MASTER 0x03
#define PAGE0 0
#define PAGE1 1
#define PAGE2 2
#define NULL_PAGE 3
#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 BLINK_025_SEC 0
#define BLINK_05_SEC 1
#define BLINK_1_SEC 2
#define BLINK_2_SEC 3
#define TW2834_INFO_X_0 2
#define TW2834_INFO_Y_0 2
#define TW2834_INFO_X_1 16
#define TW2834_INFO_Y_1 2
#define TW2834_INFO_X_2 2
#define TW2834_INFO_Y_2 13
#define TW2834_INFO_X_3 16
#define TW2834_INFO_Y_3 13
#define FUNC_MODE_LIVE 0x00
#define FUNC_MODE_STROBE 0x01
#define FUNC_MODE_SWITCH 0x03
#define REG_BOXHL 0x11
#define REG_BOXHW 0x12
#define REG_BOXVT 0x13
#define REG_BOXVW 0x14
#define REG_BOXCOL10 0x05
#define BOX_PLNCOL1 0xf0
#define BOX_PLNCOL0 0x0f
#define REG_BOX_MODE 0x03
#define BOX_TYPE BIT7
#define BOX_EMP BIT6
#define REG_BOXCTL 0x10
#define BOX_EN_X BIT7
#define BOX_EN_Y BIT6
#define BOX_OBND BIT5
#define BOX_IBND BIT4
#define BOX_PLN_MIX BIT3
#define BOX_PLN_EN BIT2
#define BOX_HL0 BIT1
#define BOX_VT0 BIT0
#define REG_PB_CH_NUM 0x16
#define PB_AUTO_EN BIT7
#define PB_EVENT_EN BIT4
#define PB_CH_NUM 0x0f
#define REG_POPUP_CTL 0x70
#define POPUP_POS_CTL_EN BIT7
#define POPUP_TRIG_MODE BIT6
#define POPUP_TRIG BIT5
#define POPUP_INTR BIT4
#define TST_POS_CTL BIT3
#define POPUP_POS_RD_CTL BIT2
#define POPUP_DATA_RD_CTL 0x03
#define REG_PICHL 0x30
#define REG_PICHR 0x31
#define REG_PICVT 0x32
#define REG_PICVB 0x33
#define REG_DMPICHL 0x40
#define REG_DMPICHR 0x41
#define REG_DMPICVT 0x42
#define REG_DMPICVB 0x43
#define REG_2DBOX_HL 0x62
#define REG_2DBOX_HW 0x63
#define REG_2DBOX_VT 0x64
#define REG_2DBOX_VW 0x65
/*register address for record path control*/
#define REG_RECORD_MOD 0x51
#define REG_PIC_SIZE 0x6c
#define REG_PIC_POS 0x6d
#define REG_SCLFLT 0x15
#define VSFLT_Y 0xc0
#define VSFLT_X 0x30
#define HSFLT_Y 0x0c
#define HSFLT_X 0x03
#define REG_CURCTL 0x00
#define CUR_ON_X BIT7
#define CUR_ON_Y BIT6
#define CUR_TYPE BIT5
#define CUR_SUB BIT4
#define CUR_BLINK BIT3
#define CUR_HP0 BIT1
#define CUR_VP0 BIT0
#define REG_VSCLCON_X 0x20
#define VFLT_MD_X BIT6
#define VBW_X 0x30
#define PALDLY_X BIT3
#define ODD_EN_X BIT2
#define EVEN_EN_X BIT1
#define REG_VSCLCON_Y 0x21
#define VFLT_MD_Y BIT6
#define VBW_Y 0x30
#define PALDLY_Y BIT3
#define ODD_EN_Y BIT2
#define EVEN_EN_Y BIT1
#define REG_COMB_X 0x16
#define YBWI_X BIT7
#define COMBMD_X 0x60
#define REG_COMB_Y 0x17
#define YBWI_Y BIT7
#define COMBMD_Y 0x60
#define REG_PEAKCKIL 0x14
#define YPEAK_Y 0xc0
#define YPEAK_X 0x30
#define CKILL 0x03
#define REG_SCLFLT 0x15
#define VSFLT_Y 0xc0
#define VSFLT_X 0x30
#define HSFLT_Y 0x0c
#define REG_VSCLMSB_X 0x18
#define REG_VSCLLSB_X 0x19
#define REG_VSCLMSB_Y 0x1a
#define REG_VSCLLSB_Y 0x1b
#define REG_HSCLMSB_X 0x1c
#define REG_HSCLLSB_X 0x1d
#define REG_HSCLMSB_Y 0x1e
#define REG_HSCLLSB_Y 0x1f
#define REG_FUNC_MODE_X 0x10
#define REG_FUNC_MODE_Y 0x60
#define CH_EN BIT7
#define POP_UP BIT6
#define FUNC_MODE 0x30
#define DMCH_EN BIT3
#define DMCH_PATH BIT2
#define DEC_PATH 0x03
#define RW_ADDR 0x8000
#define REG_QUE_DATA 0x59
#define QUE_PERIOD98 0xc0
#define EXT_TRIG BIT5
#define MUX_INTR BIT4
#define QUE_CH 0x0f
#define REG_QUE_ADDR 0x5a
#define QUE_WR BIT7
#define QUE_ADDR 0x7f
#define REG_MCLK_CTL 0x7e
#define MCLK_CLK_X 0xf0
#define MCLK_CLK_Y 0x0f
#define REG_CLK_CTL 0x7f
#define MEM_INIT BIT7
#define ENCCLK_Y BIT6
#define ENCCLK_X BIT5
#define CLK_CTL 0x1f
#define REG_MPP_SET 0x50
#define MPPSET1 0xf0
#define MPPSET0 0x0f
#define REG_QUE_SIZE 0x57
#define QUE_SIZE 0x7f
#define REG_POPUP_SIZE 0x71
#define POPUP_PERIOD98 0xc0
#define POPUP_SIZE 0x1f
#define REG_POPUP_DATA01 0x73
#define REG_POPUP_DATA23 0x74
#define REG_POPUP_ADDR 0x75
#define POPUP_WR BIT7
#define POPUP_CNT_RST BIT6
#define POPUP_POS_RST BIT5
#define POPUP_ADDR 0x1f
#define REG_2DBOX_CTL 0x60
#define REG_2DBOX_NUM 0x66
#define _2DBOX_HNUM 0xf0
#define _2DBOX_VNUM 0x0f
#define REG_2DBOX_CUR_POS 0x67
#define _2DBOX_CUR_HP 0xf0
#define _2DBOX_CUR_VP 0x0f
#define REG_MD_LVSENS 0x82
#define MD_CELSENS 0xc0
#define MD_MASK_RDEN BIT5
#define MD_LVSENS 0x1f
#define REG_MD_MASK_0 0x86
#define TW2834_PATH_X BIT7
#define TW2834_PATH_Y BIT6
#define TW2834_PATH_ALL (TW2834_PATH_X|TW2834_PATH_Y)
/*process of bit*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -