?? kb.c
字號:
#include <string.h>
#include "..\inc\def.h"
#include "..\inc\44b.h"
#include "..\inc\44blib.h"
#include "..\inc\kb.h"
void Test_Kb(void)
{
U8 which_key;
rPCONG=0x00ff; //EINT7~0
rPUPG=0x0; //pull up enable
Delay(0); //calibrate Delay()
Led_Display(7);
Delay(1000); //calibrate Delay()
Led_Display(0);
Delay(5000); //calibrate Delay()
Led_Display(7);
Uart_Printf("\n now let's start, enter a key please, press any key return\n");
while(!Uart_GetKey())
{
while((rPDATG & 0xf0)==0xf0 )
{
if ( Uart_GetKey())
{
return ;
}
}
which_key=rPDATG&0xf0;
switch(which_key)
{
case 0xe0:
Led_Display(0x1);
break;
case 0xd0:
Led_Display(0x2);
break;
case 0xb0:
Led_Display(0x4);
break;
case 0x70:
Led_Display(0x7);
break;
default :
break;
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -