📄 adv7175.h
字号:
/*------------------------------------------------------------------------
$Workfile: ADV7175.H $
$Date: 5/06/97 10:55a $
$Revision: 10 $
* Purpose:
* Header for ADV7175 Video Encoder Chip.
* Notes:
*
$History: ADV7175.H $
*
* ***************** Version 10 *****************
* User: Dstarr Date: 5/06/97 Time: 10:55a
* Updated in $/601test
* Add symbol definitions to support closed captioning
*
* ***************** Version 9 *****************
* User: Stevel Date: 8/24/96 Time: 7:00p
* Updated in $/601cman
* Add new constant for RGB video output.
*
* ***************** Version 8 *****************
* User: Dstarr Date: 8/07/96 Time: 1:27p
* Updated in $/601cman
* Support Phillips Mode
*
* ***************** Version 7 *****************
* User: Stevel Date: 7/29/96 Time: 4:59p
* Updated in $/601cman
* Delete RGB definition.
*
* ***************** Version 6 *****************
* User: Stevel Date: 7/25/96 Time: 8:10p
* Updated in $/601cman
* Add a RGB output enable bit definition for the parameter output_video,
* in dac_init().
*
* ***************** Version 5 *****************
* User: Dstarr Date: 5/02/96 Time: 2:05p
* Updated in $/601cman
* Removed COMPOSITE and S_VIDEO. These are defined in globsym.h, and are
* needed there. If you get undefined on these two include the most
* recent version of globsym.h
* .
*
* ***************** Version 4 *****************
* User: Dstarr Date: 4/09/96 Time: 9:31a
* Updated in $/601cman
* Removed the macro vision registers. 7176's don't have them, If
* program tries to init them on a 7176 it gets in trouble. Easier just
* to leave them alone.
*
* ***************** Version 3 *****************
* User: Dstarr Date: 3/13/96 Time: 5:09p
* Updated in $/601cman
* Checked out in lab. 601test plays beauty thru dll. Made all dll
* objects dllimport.
*
* ***************** Version 2 *****************
* User: Stevel Date: 3/10/96 Time: 10:18p
* Updated in $/601cman
* Add dllimport keyword to export functions for diagnostic test.
*
* ***************** Version 1 *****************
* User: Stevel Date: 3/06/96 Time: 7:53p
* Created in $/601cman
* Initial release
This code and information is provided "as is" without warranty of any
kind, either expressed or implied, including but not limited to the
implied warranties of merchantability and/or fitness for a particular
purpose.
1996 Analog Devices, Inc.
-------------------------------------------------------------------------*/
#define NMACROV 14 /* Number of Macro Vision Registers */
#define LINKTODLL __declspec(dllimport)
typedef struct tagADV7175_REG
{
byte chipaddr;
byte subaddr; // Index Reg. (W)
byte ModeReg0; // Mode Regs (R/W)
byte ModeReg1; // Mode Regs (R/W)
dword SubCarrierFrq; // SubCarry Frequency Regs (R/W)
byte SubCarrierPhase; // SubCarry Phase Regs (R/W)
byte TimMode0; // Timing Reg (R/W)
word CCaption_Xdata; // Close Captioning Extended Data Regs (R/W)
word CCaption_Data; // Close Captioning Data Regs (R/W)
byte TimMode1;
byte ModeReg2;
dword Pedestal;
/* byte MacroVision[NMACROV];*/ // MacroVision Regs (R/W)
} ADV7175_REG;
#define ALL7175REGS (sizeof(ADV7175_REG) - 2)
#define ALL7176REGS (sizeof(ADV7175_REG) - 2)
#define CHIP7175 0xD4 /* IIC bus address of a 7175 */
#define CHIP7176 0x54 /* Likewise a 7176 */
#define MODE_REG0 0 /* Register Number for MR0 */
/* Mode Reg 0 Bits */
#define PEDSTAL 4
#define WIDE_LFILTER 0x10
#define RGBSYN 0x20
#define RGBOUT 0x40
#define NTSCOUT 0
#define PALOUT 1
#define MODE_REG1 1 /* ditto for MR1 */
/* Mode reg 1 bits */
#define PROGRESSIVE 1 /* non-interlaced scan */
#define CCAPODD 2 /* CloseCaption field 1 */
#define CCAPEVEN 4 /* CloseCaption field 2 */
#define CCAPBOTH (CCAPODD + CCAPEVEN)
#define RED_DAC_OFF 8 /* Set DAC_OFF to save power */
#define GREEN_DAC_OFF 0x10
#define BLUE_DAC_OFF 0x20
#define CVBS_DAC_OFF 0x40
#define SIGGEN 0x80 /* Turn on internal color bar gen*/
#define TIMMODE0 7 /* Register Number for T. Mode 0 */
/* Timing register 0 bits */
#define MASTER 1 /* Master Sync Mode */
#define SLAVE 0 /* Slave Sync Mode */
/* Timing (actually sync) Mode control codes */
#define CCIR656 0 /* Sync embedded in video stream */
#define HBLANK_FIELD 2 /* sync off h, blank & field1/2 */
#define HVBLANK 4 /* Sync off H&V Sync & Blank */
#define HVFIELD 6 /* Sync off H&V sync & field1/2 */
#define PIXELPORT16 0x40 /* 16 bit video data bus */
#define TIME_RESET 0x80 /* 7175 timer reset bit */
#define CCAP_REG 10 /* Closed captioning register */
#define TIMMODE1 12 /* Register Number for T. Mode 1 */
/* Mode reg 2 Bits */
#define RTCO_ACTIVE 0x6 /* Use RTCO data to fix color */
#define CCIR_601_OUT 0x04 /* Use CCIR 601 video standard */
/* Declare functions */
LINKTODLL int dac_init(int video_format,int direction,int output_video);
/* Declare global variables */
LINKTODLL ADV7175_REG init_7175;
LINKTODLL int encoder_iic ;
LINKTODLL int encoder_nreg ;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -