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

📄 main.c

📁 uart 44b0 rs232 send receive
💻 C
字号:
#include "../inc/option.h"
#include "../inc/def.h"
#include "../inc/44b.h"
#include "../inc/44blib.h"

void main(void)
{
    U8 aa;
    
    ChangePllValue(PLL_M,PLL_P,PLL_S);
    Delay(0);  //calibrate Delay()

   
    rINTCON=0x5;	  // Non-vectored,IRQ enable,FIQ disable    
    rINTMOD=0x0;	  // All=IRQ mode
    rINTMSK|=BIT_GLOBAL|BIT_EINT3;	  // All interrupt is masked.
    //Port_Init();
    Uart_Init(0,115200);
    Uart_Select(0);    
    
    Uart_Printf("\n start");
    Uart_Printf("\nHello,FS44B0X!");
    Uart_Printf("\nPlease Press 'a'or'b'or'c'");

     while(1)
    {       
    	     aa= Uart_Getch();
	    //scanf("%s",aa);
	    switch(aa)
	        {
	    	case 'a':
	    	    Uart_Printf("\nYou Pressed 'a'");
	    	    //Led_Display(0x1);
	    	    break;
	    	case 'b':
	    	    Uart_Printf("\nYou Pressed 'b'");
	    	    //Led_Display(0x2);
	    	    break;
	    	case 'c':
	            Uart_Printf("\nYou Pressed 'c'");
	    	    //Led_Display(0x4);
	    	    //isExit = 0;
	    	    break;
	    	default :
	    	    break;
	        }
    }
}


⌨️ 快捷键说明

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