?? main.c
字號:
/*********************************************************************************************
* File: main.c
* Author: embest
* Desc: c main entry
* History:
*********************************************************************************************/
/*--- include files ---*/
#include "44blib.h"
#include "44b.h"
#include "Uart.h"
/*--- function code ---*/
char str_send[17] = "Embest S3CEV40 >\0";
char str_error[50] = "TERMINAL OVERFLOW : 256 character max !";
char str[256];
char CR[1] = {0x0A};
/*********************************************************************************************
* name: main
* func: c code entry
* para: none
* ret: none
* modify:
* comment:
*********************************************************************************************/
int main(void)
{
char *pt_str = str;
sys_init();
rI_ISPC = 0xffffffff; /* clear all interrupt pend */
uart_init(0,115200); /* Initial Serial port 1 */
/* printf interface */
uart_printf("\n");
uart_printf(str_send);
/* get user input */
delay(2000);
//* Terminal handler
while(1)
{
//Test_Uart0() ;
//Test_Uart0Fifo() ;
//Test_Uart1() ;
//Test_Uart1Fifo() ;
//Test_Uart1IrDA_Rx();
//Test_Uart1IrDA_Tx();
//Test_UartAFC_Rx() ;
//Test_UartAFC_Tx() ;
*pt_str = uart_getch();
uart_sendbyte(*pt_str);
if (*pt_str == 0x0D)
{
if (pt_str != str)
{
// Send str_send
uart_sendbyte(CR[0]);
//Send received string
pt_str = str;
uart_printf("the string you just input is:\n\n");
while (*pt_str != 0x0D)
{
uart_sendbyte(*pt_str);
pt_str++;
}
pt_str = str;
}
uart_sendbyte(CR[0]);
uart_printf("\n");
uart_printf(str_send);
}
else
pt_str++;
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -