am-tests,keyboard: fix comparison of char
* The sign of char is implemention-defined. char is unsigned in RISC-V.
This commit is contained in:
parent
7bb7b1a94f
commit
33c0dd0d85
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ static void drain_keys() {
|
||||||
if (has_uart) {
|
if (has_uart) {
|
||||||
while (1) {
|
while (1) {
|
||||||
char ch = io_read(AM_UART_RX).data;
|
char ch = io_read(AM_UART_RX).data;
|
||||||
if (ch == -1) break;
|
if (ch == (char)-1) break;
|
||||||
printf("Got (uart): %c (%d)\n", ch, ch & 0xff);
|
printf("Got (uart): %c (%d)\n", ch, ch & 0xff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue