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

📄 osd_trtbl.c

📁 LCD显示驱动控制程序
💻 C
字号:
////////////////////////////////////////////////////////////////////////////////
//    Genesis Microchip, Inc.
// This file was generated by Genesis Workbench. PLEASE DO NOT EDIT MANUALLY
////////////////////////////////////////////////////////////////////////////////

#include "Inc\all.h"

gmt_ST_TRANSLATION_TABLE_ENTRY ROM TrTbl_PowerOffStateTbl[] =
{
	{
		{ Key_None, 0x00 },
		{ Key1, 0x00 }, //PowerKey
 		OE_PowerOn,
		0x00,
		0x00,
		0x00,
		TTEF_TableEnds
	}
};

gmt_ST_TRANSLATION_TABLE_ENTRY ROM TrTbl_GeneralTrTable[] =
{
	{
		{ Key2, 0x00 }, //One
 		{ Key_None, 0x00 },
		OE_OneDown,
		0x00,
		0x00,
		0x00,
		TTEF_TableContinues
	},
	{
		{ Key_None, 0x00 },
		{ Key3, 0x00 }, //Left
 		OE_LeftDown,
		12,
		2,
		0x01,
		TTEF_TableContinues
	},
	{
		{ Key_None, 0x00 },
		{ Key4, 0x00 }, //Right
 		OE_RightDown,
		12,
		2,
		0x01,
		TTEF_TableContinues
	},
	{
		{ Key_None, 0x00 },
		{ Key1, 0x00 }, //PowerKey
 		OE_PowerOff,
		0x00,
		0x00,
		0x00,
		TTEF_TableContinues
	},
	{
		{ Key_None, 0x00 },
		{ Key5, 0x00 }, //Two
 		OE_TwoDown,
		0x00,
		0x00,
		0x00,
		TTEF_TableContinues
	},
	{
		{ Key_None, 0x00 },
		{ Key6, 0x4b }, //I_key
 		OE_HotKey,
		0x00,
		0x00,
		0x00,
		TTEF_TableContinues
	},
	{
		{ Key_None, 0x00 },
		{ Key2, 0x4b }, //One
 		OE_HotKey,
		0x00,
		0x00,
		0x00,
		TTEF_TableContinues
	},
	{
		{ Key6, 0x00 }, //I_key
 		{ Key_None, 0x00 },
		OE_Ikey,
		0x00,
		0x00,
		0x00,
		TTEF_TableEnds
	}
};

gmt_ST_TRANSLATION_TABLE_ENTRY ROM TrTbl_ValidModeTrTable[] =
{
	{
		{ Key_None, 0x00 },
		{ Key2, 0x00 }, //One
 		OE_OneDown,
		0x00,
		0x00,
		0x00,
		TTEF_TableContinues
	},
	{
		{ Key_None, 0x00 },
		{ Key1, 0x00 }, //PowerKey
 		OE_PowerOff,
		0x00,
		0x00,
		0x00,
		TTEF_TableContinues
	},
	{
		{ Key4, 0x00 }, //Right
 		{ Key7, 0x00 }, //Right, Left
 		OE_HotKey,
		0x00,
		0x00,
		0x00,
		TTEF_TableContinues
	},
	{
		{ Key_None, 0x00 },
		{ Key4, 0x00 }, //Right
 		OE_Brightness,
		0x00,
		0x00,
		0x00,
		TTEF_TableContinues
	},
	{
		{ Key4, 0x00 }, //Right
 		{ Key8, 0x00 }, //Right, Two
 		OE_InternalPatterns,
		0x00,
		0x00,
		0x00,
		TTEF_TableContinues
	},
	{
		{ Key_None, 0x00 },
		{ Key5, 0x00 }, //Two
 		OE_TwoDown,
		0x00,
		0x00,
		0x00,
		TTEF_TableContinues
	},
	{
		{ Key_None, 0x00 },
		{ Key6, 0x00 }, //I_key
 		OE_Ikey,
		0x00,
		0x00,
		0x00,
		TTEF_TableContinues
	},
	{
		{ Key_None, 0x00 },
		{ Key3, 0x00 }, //Left
 		OE_Contrast,
		0x00,
		0x00,
		0x00,
		TTEF_TableContinues
	},
	{
		{ Key9, 0x00 }, //I_key, One
 		{ Key10, 0x00 }, //I_key, Two, One
 		OE_AutoColor,
		0x00,
		0x00,
		0x00,
		TTEF_TableEnds
	}
};

gmt_ST_TRANSLATION_TABLE_ENTRY ROM TrTbl_NoSyncTrTable[] =
{
	{
		{ Key_None, 0x00 },
		{ Key1, 0x00 }, //PowerKey
 		OE_PowerOff,
		0x00,
		0x00,
		0x00,
		TTEF_TableContinues
	},
	{
		{ Key_None, 0x00 },
		{ Key2, 0x00 }, //One
 		OE_OneDown,
		0x00,
		0x00,
		0x00,
		TTEF_TableEnds
	}
};

gmt_ST_TRANSLATION_TABLE_ENTRY ROM TrTbl_SleepStateTrTable[] =
{
	{
		{ Key_None, 0x00 },
		{ Key1, 0x00 }, //PowerKey
 		OE_PowerOff,
		0x00,
		0x00,
		0x00,
		TTEF_TableContinues
	},
	{
		{ Key4, 0x00 }, //Right
 		{ Key8, 0x00 }, //Right, Two
 		OE_InternalPatterns,
		0x00,
		0x00,
		0x00,
		TTEF_TableContinues
	},
	{
		{ Key_None, 0x00 },
		{ Key3, 0x00 }, //Left
 		OE_LeftDown,
		0x00,
		0x00,
		0x00,
		TTEF_TableContinues
	},
	{
		{ Key_None, 0x00 },
		{ Key4, 0x00 }, //Right
 		OE_RightDown,
		0x00,
		0x00,
		0x00,
		TTEF_TableEnds
	}
};

BYTE ROM KEYPAD_DEBOUNCE_PERIOD = 20;

////////////////////////////////////////////////////////////////////////////////
//    Translation tables
////////////////////////////////////////////////////////////////////////////////

gmt_ST_TRANSLATION_TABLE_ENTRY ROM * ROM GlobalTranslTableSet[] =
{
	TrTbl_PowerOffStateTbl,
	TrTbl_GeneralTrTable,
	TrTbl_ValidModeTrTable,
	TrTbl_NoSyncTrTable,
	TrTbl_SleepStateTrTable
};

#define GPIO_1		0x0000
#define GPIO_2		0x0001

gmt_ST_GPIO ROM KeyMapping[] =
{
	{ GPIO_2, 7 }, //I_key
 	{ GPIO_2, 4 }, //Left
 	{ GPIO_2, 3 }, //One
 	{ GPIO_2, 5 }, //PowerKey
 	{ GPIO_2, 2 }, //Right
 	{ GPIO_2, 1 } //Two
 };

BYTE ROM NUMBER_OF_SCAN_KEY = 6;

gmt_ST_GPIO_TRANSLATION ROM GPIOValues[] =
{
	{ I_key, Key6 },
	{ Left, Key3 },
	{ One, Key2 },
	{ I_key | One, Key9 },
	{ PowerKey, Key1 },
	{ Right, Key4 },
	{ Left | Right, Key7 },
	{ Two, Key5 },
	{ I_key | One | Two, Key10 },
	{ Right | Two, Key8 }
};

BYTE ROM NUMBER_OF_GPIOValues = 10;

⌨️ 快捷键说明

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