Add the cortex-m0 support for XiUOS & Fix bugs on M3 and serial device
Add the cortex-m0 support for XiUOS & Fix bugs on M3 and serial device
Add the cortex-m0 support for XiUOS & Fix bugs on M3 and serial device
fix: enable the serial to retrieve the keys that consists of several characters, e.g., arrow keys
review 完了应该没啥问题,顺带在这个 MR 中修复了一个 uart driver 的 BUG
BUG:
当输入组合键(如上下左右,F1,F2等),M0中只会读取一个字符,且多余的其他两个字符会滞留在 uart 设备的 fifo 中。导致输入错位。在快速按键,一个中断处理过程中按下多个字符同样会触发该滞留导致的错位BUG。
BUG 原因:
uart.c 102行
ch = UART_RXD;
UART_RXDRDY = 0;
应当在读取之前将 RXDRDY 标志位清空。之前的 demo 写错了。即:
UART_RXDRDY = 0;
ch = UART_RXD;