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

📄 def.h

📁 stv0297 寄存器 tuner 驱动 5105 方案
💻 H
字号:
#ifndef _DEF_h_
#define _DEF_h_
/************************************************************************/
//#include "COMPIL.H"

/*********** I2C structure definition ***********************************/
typedef enum {OK = 0,NOACK,WRONGADR}	PPSTATE;

/*********** Register structure definition ******************************/
typedef enum {M_NO = 0, M_YES = 1} FLAG ;

/*********** Signal structure *******************************************/
typedef struct
{
	long        	Frequency ;             /* carrier frequency (in Hz)   */ 
	long	        SymbolRate;		/* Symbol Rate (in Baud)       */
	int  		QAMSize;		/* QAM size (16/32/64/128/256) */
	FLAG   		SpectrumInversion;      /* SpectrumInversion(YES or NO)*/ 
}	SIGNAL;

/*********** Status structure *******************************************/
typedef struct
{
	enum       	{ NO_LOCKED = 0, LOCKED = 1 , LOCK_LOSS = 2 } Status;     
	int  		NbLockLoss;				
}	SIGNAL_STATUS;

/*********** Register structure ******************************************/
typedef struct
{
	unsigned char	Addr,		//Address
			Reset,		//Default value
			Value,		//Current value
			Store;          //Stored value 
	char 		Name[30];	//Name
}	REGISTER;

typedef struct
{
	int		Reg;		//Register index
	unsigned char 	Pos,		//Bit position
			Bits,		//Bit width
			Type,		//Signed or unsigned
			Mask;		//Mask compute with width and position
	char 		Name[30];	//Name 
}   FIELD;


				      
#define	NBREG		 86
#define NBFIELD		188

#define UNSIGNED 	0
#define SIGNED		1

#define QAM16	 0
#define QAM32    1
#define QAM64	 4
#define QAM128   2
#define QAM256	 3
/************************************************************************/
			/* MACRO deinitions */
#define MAX(X,Y) ((X)>=(Y)) ? (X) : (Y)
#define MIN(X,Y) ((X)<=(Y)) ? (X) : (Y) 
/************************************************************************/
#endif

⌨️ 快捷键说明

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