main.c
来自「这是44B0开发板的一些源代码,对于学习嵌入式系统开发的同志来说,是一个很好的资」· C语言 代码 · 共 47 行
C
47 行
#include "option.h"
#include "def.h"
#include "44b.h"
#include "44blib.h"
void Main(void)
{
U8 aa;
rSYSCFG=CACHECFG; // Using 8KB Cache//
Port_Init();
Beep(0);
Led_Display(0x0);
Uart_Init(0,57600);
Delay(10);
Uart_Select(0); //Select UART0
Uart_Printf("\nS3C44B0X串口测试");
Uart_Printf("\nPlease Press 'a'or'b'or'c'");
while(1){
aa= Uart_Getch();
switch(aa)
{
case 'a':
Uart_Printf("\nYou Pressed 'a'");
break;
case 'b':
Uart_Printf("\nYou Pressed 'b'");
break;
case 'c':
Uart_Printf("\nYou Pressed 'c'");
break;
case 0x1b:
break;
default :
break;
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?