| 354 | } |
| 355 | |
| 356 | int PS2Keyboard::read() { |
| 357 | uint8_t result; |
| 358 | |
| 359 | result = UTF8next; |
| 360 | if (result) { |
| 361 | UTF8next = 0; |
| 362 | } else { |
| 363 | result = CharBuffer; |
| 364 | if (result) { |
| 365 | CharBuffer = 0; |
| 366 | } else { |
| 367 | result = get_iso8859_code(); |
| 368 | } |
| 369 | if (result >= 128) { |
| 370 | UTF8next = (result & 0x3F) | 0x80; |
| 371 | result = ((result >> 6) & 0x1F) | 0xC0; |
| 372 | } |
| 373 | } |
| 374 | if (!result) return -1; |
| 375 | return result; |
| 376 | } |
| 377 | |
| 378 | int PS2Keyboard::readUnicode() { |
| 379 | int result; |
nothing calls this directly
no test coverage detected