(uart): supporting input new lines
This commit is contained in:
parent
8d5aae1ac9
commit
b4d5f8f6eb
1 changed files with 9 additions and 2 deletions
|
|
@ -30,10 +30,17 @@ char uart_getc()
|
|||
void uart_handle_interrupt()
|
||||
{
|
||||
char c = uart_getc();
|
||||
if (c != '\0')
|
||||
switch (c)
|
||||
{
|
||||
// Later, this will go into a "Circular Buffer"
|
||||
case '\r': // enter key
|
||||
knewline();
|
||||
break;
|
||||
case '\0':
|
||||
// do nowt
|
||||
break;
|
||||
default:
|
||||
kputchar(c);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue