main.c

来自「这是三星arm s3c44b0x开发板上的一些实例程序」· C语言 代码 · 共 48 行

C
48
字号
#include "option.h"
#include "def.h"
#include "44b.h"
#include "44blib.h"


void Main(void)
{
    U8 aa;		
    
    rSYSCFG=CACHECFG;   // Using 8KB Cache//

    Port_Init();
    
    Led_Display(0x0);

    Uart_Init(0,57600);
    Delay(10);
    Uart_Select(0); //Select UART0

    Uart_Printf("\nHello,FS44B0X!");

    Uart_Printf("\nPlease Press 'a'or'b'or'c'");
    while(1){
    aa= Uart_Getch();
    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);
    	    break;
    	case 0x1b:
    	    Led_Display(0x0);
    	    break;
    	default :
    	    break;
        }
    }
}

⌨️ 快捷键说明

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