2021-05-17 08:56:52 +00:00
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
#include "../../bsp/include/uart.h"
|
|
|
|
#include "../../bsp/include/xprintf.h"
|
2021-09-10 01:56:21 +00:00
|
|
|
#include "../../bsp/include/pinmux.h"
|
2021-05-17 08:56:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
2021-09-29 01:24:04 +00:00
|
|
|
// UART0引脚配置
|
2021-09-10 01:56:21 +00:00
|
|
|
pinmux_set_io0_func(IO0_UART0_TX);
|
|
|
|
pinmux_set_io3_func(IO3_UART0_RX);
|
2021-09-29 01:24:04 +00:00
|
|
|
// UART0初始化
|
|
|
|
uart_init(UART0, uart0_putc);
|
2021-05-17 08:56:52 +00:00
|
|
|
|
|
|
|
while (1) {
|
|
|
|
// loopback
|
2021-08-10 03:09:53 +00:00
|
|
|
xprintf("%c", uart0_getc());
|
2021-05-17 08:56:52 +00:00
|
|
|
}
|
|
|
|
}
|