📄 uart.c
字号:
/*
Module Name : uart_test.c
Functions : UARTInit
Purpose : Initialize UART0 and UART1
Notes :
*/
// Local header files
#include <demo/uart270.h>
//
// Uart initialize Uart0( DM270 <-> PC ), Uart1( DM270 <-> MCU )
void UARTInit(void) {
{
UART_ConfigData uart0;
uart0.baudRate = 115200;
uart0.charLength = UART_CHAR_LEN_8;
uart0.stopBits = UART_STOPBIT1;
uart0.parity = UART_EVEN_PARITY;
UART_setConfig( UART0, &uart0 );
}
{
UART_ConfigData uart1;
uart1.baudRate = 20834;
uart1.charLength = UART_CHAR_LEN_8;
uart1.stopBits = UART_STOPBIT1;
uart1.parity = UART_NO_PARITY;
UART_setConfig( UART1, &uart1 );
}
UI_init();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -