keyprocess.c

来自「AT89C51开发例程 protues仿真 keil编程」· C语言 代码 · 共 37 行

C
37
字号
//*************************************************************************************************
//*																								  *
//*			 ******************************键码处理程序**************************				  *
//*																								  *
//*************************************************************************************************

#include "SMC1602.h"

void vKeyProcess(unsigned char ucKeyCode)
{
	vWriteCMD(0xC7);	

	switch(ucKeyCode)
		{
		case 11:vShowOneChar('7');break;							  //'7'
		case 12:vShowOneChar('8');break;							  //'8'
		case 13:vShowOneChar('9');break;							  //'9'
		case 21:vShowOneChar('4');break;							  //'4'
		case 22:vShowOneChar('5');break;							  //'5'
		case 23:vShowOneChar('6');break;							  //'6'
		case 31:vShowOneChar('1');break;							  //'1'
		case 32:vShowOneChar('2');break;							  //'2'
		case 33:vShowOneChar('3');break;							  //'3'
		case 42:vShowOneChar('0');break;							  //'0'

		case 14:vShowOneChar('/');break;							  //'/'
		case 24:vShowOneChar('*');break;							  //'*'
		case 34:vShowOneChar('-');break;							  //'-'
		case 44:vShowOneChar('+');break;							  //'+'
							  
		case 43:vShowOneChar('=');break;							  //'='

		case 41:vShowOneChar('C');break;							  //'ON/C'

		default:break;
		}
}

⌨️ 快捷键说明

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