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

📄 tvp5146.h

📁 IT projecotr reference design.
💻 H
字号:
/*****************************************************************************
**             TEXAS INSTRUMENTS PROPRIETARY INFORMATION
**
**  (c) Copyright, Texas Instruments Incorporated, 2006.
**      All Rights Reserved.
**
**  Property of Texas Instruments Incorporated. Restricted Rights -
**  Use, duplication, or disclosure is subject to restrictions set
**  forth in TI's program license agreement and associated documentation.
******************************************************************************/

#ifndef _TVP_5146_H_
#define _TVP_5146_H_

#include "common.h"
#include "i2c.h"

/* Various Source Types */
typedef enum _SourceType
{
    SOURCE_VGA          = 0,
    SOURCE_DVI          = 1,
    SOURCE_COMPONENT    = 2,
    SOURCE_COMPOSITE    = 3,
    SOURCE_SVIDEO       = 4,
    SOURCE_SOLID_FIELD  = 5,
    SOURCE_PIP_BORDER   = 6, // only for secondary channel
    SOURCE_TEST_PATTERN = 7,
    SOURCE_SPLASH       = 8,
    SOURCE_SEARCH       = 9,
    SOURCE_NEXT         = 10,
    SOURCE_DEFAULT      = 11,  
    SOURCE_PIP_NOT_PRESENT  = 12,
    SOURCE_PIP_NEW      = 13,
    SOURCE_INVALID
} DPATH_SOURCE_TYPE_ENUM;


typedef enum videostdtype
{
	AUTO,
	NTSC,
	PAL,
	PALM,
	PALN,
	NTSC443,
	SECAM,
	PAL60,
	MAX_VIDEO
}VideoStdTypeEnum;

/* Misc structs and enums */
typedef struct I2C_REGISTER
{
	uint08 SubAddress;
	uint08 Data;
}I2C_REGISTER;

typedef enum 
{
	NO_COMB, /* SVIDEO doesn't need comb filter */
	WEAK,
	NOMINAL,
	STRONG,
	
	MAX_COMB
}CombSetupType;

typedef enum
{
	AS_NONE,
	AS_ALL,
	AS_NTSC,
	AS_NTSC_SUBSTANDARDS, /* standard & substandards */
	AS_PAL,
	AS_PAL_SUBSTANDARDS, /* standard & substandards */
	AS_SECAM,
	AS_NTSC_PAL_SECAM, /* only widely used standards */
	MAX_AS
}AutoStandardSetupType;


typedef enum
{
	FREQ_50,
	FREQ_60,
	MAX_FREQ
}FrequencyType;
typedef enum
{
	ACTIVE,
	CLOCK_HALF,
	CLOCK_QUARTER,
	CLOCK_EIGHTH,
	MAX_POWER
}DEC_POWER_LEVELS;

typedef struct {
    VideoStdTypeEnum video_std;
    BOOL progressive;
} VIDEO_TYPE;


int08 DEC_i2c_MasterWrite( I2CPORT  Port, uint16  DeviceAddress,  uint32  NumOfBytes,  
                                uint08 *  WriteBuffer, uint32  ByteDelay, uint32  Timeout,  
                                uint32 *  BytesWritten );
int08 DEC_i2c_MasterWriteRestartRead  (  I2CPORT Port, uint16  DeviceAddress,  uint32  NumOfWrtBytes,  
                                    uint08 * WriteBuffer, uint32  ByteDelay, uint32  NumOfRdBytes,  
                                    uint08 * ReadBuffer,  uint32  Timeout,  uint32 *  BytesWritten,  
                                    uint32 *  BytesRead );
                                                                     
int08 DEC_I2CMasterWriteCmds(  uint08 *pI2cCmdData);		// 11-28-2003 by W.Shi
int08 DEC_uCodeDownload(  int16 CodeSize, uint08 *puCode);	// 11-19-2003 by W.Shi
int08 DEC_InitCommon(void);										// 11-19-2003 by W.Shi

int08 DEC_GetDeviceID(  uint32 *DeviceID);			        // 11-28-2003 by W.Shi
int08 DEC_GetSoftwareVersion(  uint16 *version);			// 11-28-2003 by W.Shi
int08 DEC_Init( uint08 deci2caddr, I2CPORT i2cport );											// 11-28-2003 by W.Shi
int08 DEC_MiscSetup(void);										// 11-28-2003 by W.Shi

int08 DEC_DisableOutput(void);									// 11-28-2003 by W.Shi
int08 DEC_EnableOutput(void);									// 11-28-2003 by W.Shi
int08 DEC_GetOutputEnable(  BOOL* enable);					// 11-28-2003 by W.Shi
int08 DEC_SetPowerLevel(  DEC_POWER_LEVELS level);			// 11-28-2003 by W.Shi (?)
int08 DEC_SoftReset(void);										// 11-28-2003 by W.Shi
int08 DEC_IsProgressive(  BOOL *progressive );                  // 10-12-2005 BY Duck
int08 DEC_SelectSVideo(void);									// 11-28-2003 by W.Shi
int08 DEC_SelectComposite(void);								// 11-28-2003 by W.Shi
int08 DEC_SelectComponent(void);								// 11-28-2003 by W.Shi
int08 DEC_GetConnectorType(  DPATH_SOURCE_TYPE_ENUM* conn);				// 11-28-2003 by W.Shi

int08 DEC_SetStandard(  VideoStdTypeEnum standard);				// 11-27-2003 by W.Shi
int08 DEC_SetAutoStandard(  VideoStdTypeEnum standard);			// 11-27-2003 by W.Shi
int08 DEC_GetStandard(  VideoStdTypeEnum* standard);			// 11-28-2003 by W.Shi
int08 DEC_GetStandardDetected(  VideoStdTypeEnum* standard);	// 11-28-2003 by W.Shi
int08 DEC_EnableAutoStandard(  AutoStandardSetupType std);	// 11-28-2003 by W.Shi
int08 DEC_IsSignalPresent(  BOOL* signal);					// 11-27-2003 by W.Shi

int08 DEC_SetupOutputWindows(  FrequencyType freq, VideoStdTypeEnum std);	// 11-28-2003 by W.Shi
int08 DEC_SetMacrovisionConfig(  uint16 first_line, uint16 last_line);	// 11-28-2003 by W.Shi (?)
int08 DEC_GetMacrovisionDetect(  uint08 *pMacDetect);					// 11-28-2003 by W.Shi

int08 DEC_SetGain(  uint08 percent);						// 12-03-2003 by W.Shi
int08 DEC_GetGain(  uint08 *percent);						// 12-03-2003 by W.Shi
int08 DEC_SetOffset(  uint08 percent);						// 12-03-2003 by W.Shi
int08 DEC_GetOffset(  uint08 *percent);						// 12-03-2003 by W.Shi
int08 DEC_SetupOutputWindows(  FrequencyType freq, VideoStdTypeEnum std);	// 12-03-2003 by W.Shi (?)
int08 DEC_SetTint(  uint08 percent);						// 12-03-2003 by W.Shi
int08 DEC_GetTint(  uint08 *percent);						// 12-03-2003 by W.Shi
int08 DEC_SetColor(  uint08 percent);						// 12-03-2003 by W.Shi
int08 DEC_GetColor(  uint08 *percent);						// 12-03-2003 by W.Shi
int08 DEC_GetLinesPerField(  uint16 *lines);				// 12-03-2003 by W.Shi
int08 DEC_GetLinesPerFrame(  uint16 *lines);				// 12-03-2003 by W.Shi

int08 DEC_GetPixelsPerLine(  uint16 *pixels);
int08 DEC_GetCombFilterSetup(  CombSetupType *config);
int08 DEC_SetCombFilterSetup(  CombSetupType config);

int08 DEC_WriteI2cRegister(  I2C_REGISTER *reg);	// 11-28-2003
int08 DEC_ReadI2cRegister(  I2C_REGISTER *reg);		// 11-28-2003
int08 DEC_VerifyBusControlSetup(void);									// 11-28-2003

#endif	/* _TVP_5146_H_ */

⌨️ 快捷键说明

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