?? 51main.c
字號:
//********http://www.arm88.com*********//
#include<stdio.h>
#include "option.h"
#include "def.h"
#include "44b.h"
#include "44blib.h"
#define prompt() Uart_Printf("\n\\>")
#define ENTER_KEY 0x0d
char * py_ime(char *);
char input_string[6];
unsigned char key,i = 0;
void Main(void)
{
rSYSCFG=CACHECFG; // Using 8KB Cache//
Port_Init();
Uart_Init(0,57600);
Delay(10);
Uart_Select(0); //Select UART0
Uart_Printf("\n請輸入拼音字母 **按回車鍵結束!");
prompt();
i = 0;
for(;;)
{
if(kbhit())
{
key =Uart_GetKey ();
if(key == ENTER_KEY)
{
input_string[i] = 0;
prompt();
Uart_Printf("%s",py_ime(input_string));
prompt();
i = 0;
}
else
{
if(i<7)
{
input_string[i++] = key;
Uart_SendByte(key);
}
else
{
Uart_Printf("\n@@@@@@輸入有誤!");
prompt();
i = 0;
}
}
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -