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

📄 tidtv_mcucomm.h

📁 ti的数字电视芯片 tvp9000的源码
💻 H
字号:
/*******************************************************************************
*	@ModuleName  ::	TiDTV_McuComm.h
*	
*	@Copyright	 ::	Copyright 2005- Texas Instruments, Inc.
*	
*	@Description ::	Constants and definitions for MSP430 Communication
*	
*	@History     ::
*---------------------------------------
*	02-26-2005	W.Shi	Created
*******************************************************************************/

#ifndef	_TI_DTV_MCU_COMM_H_
#define	_TI_DTV_MCU_COMM_H_

//----------------------------------------------------------
// Button code assignments
//
enum _TI_DTV_BUTTON_enum_ {
	TI_DTV_BUTTON_POWER = 1,		// Power ON/OFF
	TI_DTV_BUTTON_CH_UP,			// Channel Up (++)
	TI_DTV_BUTTON_CH_DOWN,			// Channel Down (--)
	TI_DTV_BUTTON_VOL_UP,			// Volume Up (++) (Right)
	TI_DTV_BUTTON_VOL_DOWN,			// Volume Down (--) (Left)
	TI_DTV_BUTTON_INPUT,			// TV/Video Input Selection
	TI_DTV_BUTTON_MENU,				// DTV Menu
	TI_DTV_BUTTON_SELECT			// Select/Enter/OK
};

//----------------------------------------------------------
// Key buffer definitions
//	Input from two sources: Front Panel (MCU) or IR Remote
//
#define	TI_DTV_MAX_KEY_BUF_SIZE			16
#define	TI_DTV_MAX_DIGIT_KEY_BUF_SIZE	8

typedef struct _TI_DTV_KEY_BUF_ {
	OS_EVENT	*pCountSem;						// Key codes buffer Counting Semaphore
	
	UCHAR	CurKeyCodeMenu;						// Current processing Key code by Menu Task
	UCHAR	CurKeyCodePromptMsg;				// Current processing Key code for Prompt Message Task
	
	UINT16	RepeatCtrl;							// Repeat Scan ctrl: bit-7 = flag
	UINT16	TimeCount;							// Time counter
	
	UINT8	NumDigitKey;						// number of Digits Key
	char	DigitKeyBuf[TI_DTV_MAX_DIGIT_KEY_BUF_SIZE];	// Digits Key Buffer
	
	UCHAR	CurKeyCode;							// Current processing Key code
	UCHAR	ReadPtr;							// Key code ring buffer's Read pointer
	UCHAR	WritePtr;							// Key code ring buffer's Write pointer
	UCHAR	KeyCode[TI_DTV_MAX_KEY_BUF_SIZE];	// Key codes ring buffer
} TI_DTV_KEY_BUF;

#define	TI_DTV_KEY_REPEAT_SCAN		0x8000		// flag of Repeat Scan for Key Inputs

//----------------------------------------------------------
// Defined in "TiDTV_McuComm.c"
//
extern TI_DTV_KEY_BUF TiDTV_KeyBuf;

int   TiDTV_PutKeyCode(UCHAR KeyCode);
UCHAR TiDTV_GetKeyCode(void);
void  TiDTV_FlushKeyBuf(void);
void  TiDTV_KeyRptScan(UINT16 LeadTime, UINT16 SampleTime);
UCHAR TiDTV_ConvertIrKeyCode(UCHAR IrKeyCode);

//----------------------------------------------------------
// Defined in "TiDTV_Button.c"
//
int TiDTV_PromptMsgTaskStatus(void);

void TiDTV_CheckDigitKeyBuf(int Flag);	// Check Digits Key Buffer

//----------------------------------------------------------
//	Customized by Customers' IR Remote
//
extern const UCHAR DTV_IrKeyTable[];

#endif /* _TI_DTV_MCU_COMM_H_ */

⌨️ 快捷键说明

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