亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? keymenu.c

?? RABBIT3000單片機的鍵盤處理程序
?? C
?? 第 1 頁 / 共 2 頁
字號:
/***************************************************************************
	keymenu.c
	Z-World, 2002

	This sample program is for the LCD MSCG12232 Display Module and
	LP3500 series controllers.

	Description
	===========
  	This program demonstrates how to implement a menu system using a
  	highlight bar on a graphic LCD display.  It uses functions from
  	LCD122KEY7.LIB	and devPowerSet() to enable the module.

	The menu options for this sample	are as follows:

  	1.	Set Date & Time
  	2.	Display Date/Time
  	3.	Turn backlight OFF
  	4. Turn backlight ON
  	5. Toggle LEDS
  	6. Increment LEDS
  	7. Disable LEDS

  	To select a option use the scroll keys(Scroll and/or Page UP/DOWN keys)
  	to highlight the option that you want to select and then press the ENTER
  	key.

	Once the option is selected the operation will be completed or you
	will be prompted to do additional steps to complete the option
	selected.


	Development Note:
	-----------------
	Menu options can be added/deleted and the highlight bar will automatically
	adjust to the new menu list. This will also require that you add/delete case
	statements in main() to match your menu list.
**************************************************************************/
#class auto
#memmap xmem

//---------------------------------------------------------
// Bitmaps
//---------------------------------------------------------
// Bitmap : Zwbw5_bmp
// Buffer Size : 203
// Monochrome  : White Foreground, Black Background
// Mode   : Landscape
// Height : 29 pixels.
// Width  : 53 pixels.
// Init   : glXPutBitmap (leftedge,topedge,53,29,Zwbw5_bmp);

xdata Zwbw5_bmp {
'\x00','\x00','\x1F','\xF8','\x00','\x00','\x07',
'\x00','\x00','\xFF','\xFF','\x80','\x00','\x07',
'\x00','\x03','\xF3','\xF0','\xE0','\x00','\x07',
'\x00','\x0F','\xFF','\xE0','\x38','\x00','\x07',
'\x00','\x3F','\x0F','\xFC','\x0E','\x00','\x07',
'\x00','\x7E','\x1E','\x07','\x83','\x00','\x07',
'\x00','\xFC','\x38','\x01','\xE1','\x80','\x07',
'\x01','\xB8','\x30','\x00','\x38','\xC0','\x07',
'\x03','\x30','\x70','\x00','\x0C','\x60','\x07',
'\x06','\x60','\xE0','\x00','\x03','\x70','\x07',
'\x0E','\x60','\xC0','\x00','\x01','\xF0','\x07',
'\x0C','\xC1','\x80','\x00','\x00','\xE8','\x07',
'\x1F','\xFF','\xE0','\x00','\x00','\x2C','\x37',
'\x3F','\x83','\x7F','\x00','\x00','\x34','\x1F',
'\x31','\x03','\x01','\xE0','\x00','\x2A','\x3F',
'\x31','\x02','\x00','\x1C','\x00','\x26','\x67',
'\x62','\x06','\x00','\x07','\x00','\x27','\xC7',
'\x62','\x04','\x00','\x01','\x80','\x27','\x07',
'\x00','\x00','\x00','\x00','\x00','\x70','\x07',
'\x00','\x00','\x00','\x00','\x03','\x80','\x07',
'\x7C','\x21','\x0D','\xF9','\xF8','\x7C','\x07',
'\x08','\x31','\x8B','\x0F','\x84','\x63','\x07',
'\x18','\x11','\x8F','\xE1','\x14','\x61','\x07',
'\x11','\x93','\xF0','\x05','\x34','\x61','\x07',
'\x31','\xC0','\x54','\x07','\xE4','\x61','\x07',
'\x20','\x0A','\x56','\x05','\x44','\x61','\x07',
'\x40','\x0C','\x62','\x05','\x24','\x63','\x07',
'\x40','\x04','\x21','\x99','\x34','\x6E','\x07',
'\xFC','\x04','\x20','\xF1','\x17','\xF8','\x07'
};

//---------------------------------------------------------
// Macro's
//---------------------------------------------------------
#define MAXDISPLAYROWS	4
#define LEDOFF				0
#define TOGGLE				1
#define INCREMENT			2
#define OPERATE			3

#define ASCII				0
#define NUMBER				1

//----------------------------------------------------------
// Main_Menu options
//----------------------------------------------------------
// Can insert/delete menu options. The highlight bar is setup
// to start with the first MENU option and stop at the last
// menu option in the MENU.
//
// When adding/deleting menu options you must match up the
// case statements to the menu option number.
//
const char *main_menu [] =
{		" <<<<Main Menu>>>>",
		"1.Set Date & Time",
		"2.Display Date/Time",
		"3.Turn Backlight OFF",
		"4.Turn Backlight ON",
		"5.Toggle LED's",
		"6.Increment LED's",
		"7.Disable LED's",
		NULL
};

//----------------------------------------------------------
// Structures, arrays, variables
//----------------------------------------------------------
fontInfo fi6x8, fi8x10, fi12x16;
windowFrame textWindow;

typedef struct  {
	int data;
	char *ptr;
} fieldupdate;

struct tm CurTime;

char szTime[40];
char szString[20];
const char Days[] = {"SunMonTueWedThuFriSat"};
const char Months[] = {"JanFebMarAprMayJunJulAugSepOctNovDec"};


int ledCntrl;
int beeperTick, timerTick ;
int max_menu_options;
int max_cmds_options;
unsigned long ulTime;
char *keybuffer;


//------------------------------------------------------------------------
// Milli-sec delay function
//------------------------------------------------------------------------
nodebug
void msDelay(unsigned int delay)
{
	auto unsigned long done_time;

	done_time = MS_TIMER + delay;
   while( (long) (MS_TIMER - done_time) < 0 );
}


//------------------------------------------------------------------------
// Process key to do number and ASCII field changes
//------------------------------------------------------------------------
int ProcessKeyField(int mode, fieldupdate *field)
{
	static int wKey;

	keyProcess();
	msDelay(100);
	if((wKey = keyGet()) != 0)
	{
		switch(wKey)
		{
			// Decrement number by 10 or pointer by 3
			case '-':
				if(mode == NUMBER)
					field->data -= 10;
				else
					field->ptr  -= 3;
				break;

			// Increment number by 10 or pointer by 3
			case '+':
				if(mode == NUMBER)
					field->data += 10;
				else
					field->ptr  += 3;
				break;

			// Increment number or pointer by 1
			case 'U':
				if(mode == NUMBER)
					field->data++;
				else
					field->ptr++;
				break;

			// Decrement number or pointer by 1
			case 'D':	// Decrement X1
				if(mode == NUMBER)
					field->data--;
				else
					field->ptr--;
				break;

			// Done Editing field
			case 'E':
				wKey = 'E';
				break;

			default:
				wKey = -1;
		  		break;
		}
	}
	return(wKey);
}


//------------------------------------------------------------------------
// Get and process the users MENU option
//------------------------------------------------------------------------
int GetKeypadOption( int *offset, int *highlight )
{
	static int wKey;

	if((wKey = keyGet()) != 0)
	{
		switch(wKey)
		{
			case '-':	// Page down
				if(*offset < ((sizeof(main_menu)/sizeof(int)) - 1))
				{
					if((*offset + MAXDISPLAYROWS) < ((sizeof(main_menu)/sizeof(int)) - 1))
						*offset += 4;
				}
				if(*offset == 0)
					*highlight = 1;
				else
					*highlight = 0;
				wKey = -1;
				break;

			case '+':	// Page up
				if(*offset > 3)
					*offset -=4;
				else
					*offset = 0;
				if(*offset == 0)
					*highlight = 1;
				else
					*highlight = 0;
				wKey = -1;
				break;

			case 'U':	// Scroll-up by one line
				*highlight -= 1;
				if(*highlight < 0)
				{
					*offset -= 1;
					*highlight = 0;
				}
				if(*offset == 0 && *highlight == 0)
					*highlight = 1;
				wKey = -1;
				break;

			case 'D':	// Scroll-down by one line
				if((*offset + (*highlight) + 1) < ((sizeof(main_menu)/sizeof(int)) - 1))
				{
					*highlight += 1;
					if(*highlight > 3)
					{
						*offset += 1;
						*highlight = 3;
					}
				}
				wKey = -1;
				break;

			case 'E':	// Select option
				wKey = *offset + *highlight;
				break;

			default:
				wKey = -1;
		  		break;
		}
	}
	return(wKey);
}

//------------------------------------------------------------------------
// Display a MENU on the LCD display and get the menu option from the user
//------------------------------------------------------------------------
int display_menu ( char **line, int initialize)
{
	static int offset, tmpoffset, i;
	static int menu_option;
	static int lasthighlight;
	static int scrolling;
	static int highlight;

	costate
	{
		if(initialize)
		{
			offset = 0;				// Initialize menu line index
			highlight = 1;			// Assumes all menus have a heading
			tmpoffset = ~offset;
		}

		menu_option = 0;			// Initially set to no option selected
		scrolling = FALSE;

		// Wait until you get a valid user option
		while(menu_option == 0)
		{
			// Display menu option
			if(tmpoffset != offset)
			{
				glBlankScreen();
				for(i=0; i < 4; i++)
				{	// Display up to 4 lines of menu options
					TextGotoXY(&textWindow, 0, i);
					TextPrintf(&textWindow, "%s", line[offset]);
					if(line[offset + 1] == NULL) {
			 			break;
					}
					offset++;
				}

				// Reset the offset back to the first option displayed
				offset = offset-i;
				tmpoffset = offset;
			}
			glSetBrushType(PIXXOR);
			glBlock (0, highlight*8, 122, 8);
			glSetBrushType(PIXBLACK);
			lasthighlight = highlight;

			// Get the user's option
			waitfor((menu_option = GetKeypadOption(&offset, &highlight)));
			// Check if user selected the scrolling option

			glSetBrushType(PIXXOR);
			glBlock (0, lasthighlight*8, 122, 8);
			glSetBrushType(PIXBLACK);
			if(menu_option == -1)
			{

				// Set menu option to zero due to scrolling operation
				menu_option = 0;
				scrolling = TRUE;
			}
		}
	}
	tmpoffset = offset;
	return(menu_option);
}

//------------------------------------------------------------------------
// Format the Date and Time for the LCD display
//------------------------------------------------------------------------
void FormatDateTime ( void )
{
	char Day[4], Mon[4];

	ulTime = read_rtc ();			// get the RTC value
	mktm( &CurTime, ulTime );		// convert seconds to date values

	strncpy ( Day, &Days[CurTime.tm_wday*3], 3 );
	strncpy ( Mon, &Months[(CurTime.tm_mon-1)*3], 3 );
	Day[3] = 0;
	Mon[3] = 0;

	sprintf ( szTime, "%s %s %d, %d \n%02d:%02d:%02d",
		Day, Mon, CurTime.tm_mday, CurTime.tm_year+1900,
		CurTime.tm_hour, CurTime.tm_min, CurTime.tm_sec );
}

//------------------------------------------------------------------------
// Display the Date and Time on the LCD display
//------------------------------------------------------------------------
int dispDate( void )
{
	static int status;
	auto int wKey;

	costate
	{
		// Get current Date/Time

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品高清在线观看| 日韩天堂在线观看| 蜜芽一区二区三区| 人人爽香蕉精品| 日本一区二区综合亚洲| 亚洲色图视频免费播放| 国产精品久久免费看| 国产精品乱码一区二三区小蝌蚪| 亚洲h精品动漫在线观看| 欧美国产视频在线| 国产精品网友自拍| 国产精品免费久久久久| 色94色欧美sute亚洲线路一久| 成人一区二区三区视频在线观看| 国产综合久久久久久鬼色| 国产又黄又大久久| 国产91富婆露脸刺激对白 | 日本亚洲天堂网| 日韩激情视频在线观看| 蜜臀精品久久久久久蜜臀| 国内精品在线播放| 从欧美一区二区三区| 91成人国产精品| 欧美va亚洲va在线观看蝴蝶网| 国产网站一区二区三区| 自拍偷拍亚洲激情| 午夜电影一区二区三区| 精品一区二区三区日韩| 成人激情图片网| 欧美日韩另类一区| 中文字幕的久久| 亚洲成人黄色影院| 国产精品一区二区黑丝| 日本久久电影网| 久久人人97超碰com| 一区二区三区四区亚洲| 久久99国产精品久久99果冻传媒 | 国产精品美女久久久久久久网站| 亚洲日穴在线视频| 国产最新精品精品你懂的| 色综合久久66| 久久精品视频免费| 亚洲成人免费观看| 不卡的av电影在线观看| 欧美变态tickle挠乳网站| 国产精品你懂的在线| 蜜臀久久99精品久久久画质超高清| 成人美女视频在线看| 日韩一区二区在线观看视频播放| 国产精品理伦片| 激情综合网最新| 91精品久久久久久久99蜜桃| 亚洲欧洲一区二区在线播放| 激情图片小说一区| 91精品国产91久久久久久一区二区 | 91视视频在线直接观看在线看网页在线看| 欧美视频在线一区| 亚洲视频在线一区观看| 国产九色精品成人porny| 欧美精品vⅰdeose4hd| 亚洲人成7777| 99国产精品久久久久| 国产午夜亚洲精品不卡| 九一九一国产精品| 91麻豆精品国产91久久久久 | 日韩欧美国产精品一区| 亚洲精品美腿丝袜| av一二三不卡影片| 国产精品美女久久久久久久| 国产一区二区不卡| 精品久久一区二区三区| 免费av网站大全久久| 欧美一级在线视频| 蜜桃视频免费观看一区| 欧美福利一区二区| 日本视频一区二区三区| 欧美日韩一区二区三区不卡| 亚洲国产你懂的| 欧美日韩一级片在线观看| 亚洲在线免费播放| 欧美日本在线视频| 日本中文在线一区| 精品国产一二三| 国产成人综合在线| 亚洲人123区| 在线视频国产一区| 秋霞av亚洲一区二区三| 日韩欧美国产不卡| 国产99久久久国产精品潘金| 中国色在线观看另类| 97国产一区二区| 香蕉成人啪国产精品视频综合网| 在线不卡中文字幕播放| 奇米影视一区二区三区| 久久女同互慰一区二区三区| 成人综合在线网站| 依依成人精品视频| 日韩亚洲欧美成人一区| 国产剧情一区在线| 亚洲精品精品亚洲| 日韩精品在线网站| 成人高清在线视频| 婷婷丁香久久五月婷婷| 国产欧美一区二区精品性色| 91蝌蚪porny九色| 蜜臂av日日欢夜夜爽一区| 国产日韩欧美高清| 欧美片在线播放| 国产白丝网站精品污在线入口| 亚洲精品亚洲人成人网 | 91麻豆精东视频| 日韩国产在线一| 中文字幕一区二区三区乱码在线| 日韩午夜在线观看视频| 国产69精品一区二区亚洲孕妇| 亚洲精品大片www| 久久久影院官网| 欧美日韩一卡二卡| 99在线视频精品| 另类欧美日韩国产在线| 亚洲欧美激情在线| 久久嫩草精品久久久久| 欧美色爱综合网| 成人精品视频.| 久久精品99国产精品| 成人免费在线播放视频| 精品国产亚洲在线| 欧美日韩免费不卡视频一区二区三区| 国产一区二区三区最好精华液| 亚洲国产日韩精品| 综合中文字幕亚洲| 国产日韩av一区| xf在线a精品一区二区视频网站| 欧美视频精品在线观看| av电影在线观看完整版一区二区| 麻豆91精品91久久久的内涵| 亚洲午夜电影网| 亚洲精品午夜久久久| 综合久久给合久久狠狠狠97色| 精品精品欲导航| 日韩欧美一区中文| 7777精品伊人久久久大香线蕉完整版 | 久久久久久免费网| 91精品国产丝袜白色高跟鞋| 欧美日韩大陆一区二区| 在线观看日产精品| 欧美四级电影网| 欧美午夜电影在线播放| 91丝袜高跟美女视频| www.欧美亚洲| 99视频在线精品| 99精品在线观看视频| 成人av网站在线观看免费| 国产精品一区不卡| 成人性生交大片免费看中文| 国产jizzjizz一区二区| 粉嫩高潮美女一区二区三区| 福利一区二区在线| 成人黄色在线网站| 91麻豆精品视频| 精品视频一区二区不卡| 欧美日韩国产高清一区| 在线综合视频播放| www欧美成人18+| 中文字幕免费观看一区| 中文字幕在线不卡视频| 亚洲激情成人在线| 亚洲成av人影院| 色综合久久久久综合体桃花网| 不卡av电影在线播放| 91美女精品福利| 欧美精品三级在线观看| 日韩欧美在线不卡| 国产精品第13页| 亚洲午夜精品17c| 久久aⅴ国产欧美74aaa| 国产99久久久国产精品| 在线视频一区二区免费| 91精品福利在线一区二区三区 | 日韩不卡免费视频| 国内久久精品视频| 色欧美日韩亚洲| 日韩一区二区三区免费观看| 国产丝袜欧美中文另类| 亚洲人成伊人成综合网小说| 日韩电影在线免费观看| 成人精品小蝌蚪| 欧美一区二区三区在| 国产农村妇女毛片精品久久麻豆| 亚洲精品高清视频在线观看| 极品少妇一区二区三区精品视频| av中文一区二区三区| 欧美精品aⅴ在线视频| 国产日韩视频一区二区三区| 亚洲成人免费观看| 懂色av一区二区三区免费观看 | 成人国产精品免费观看动漫| 色悠久久久久综合欧美99| 欧美成人性福生活免费看| 亚洲欧美aⅴ...|