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

📄 kb.c

📁 一个简单的helloworld编程
💻 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 + -