diff options
author | Benji Dial <Benji3.141@gmail.com> | 2019-12-27 11:10:56 -0500 |
---|---|---|
committer | Benji Dial <Benji3.141@gmail.com> | 2019-12-27 11:10:56 -0500 |
commit | 3f3f9a806dc63ad827fe28724dabe694f6e67f1e (patch) | |
tree | 441ff1f1617086e200af097575889735dc08b0ad /src/kernel/keyb.c | |
parent | 1f309e75b808f7f9576a3f60dbbe925d1e43a714 (diff) | |
download | portland-os-3f3f9a806dc63ad827fe28724dabe694f6e67f1e.tar.gz |
apm and smbios stubs, get_char can now wait for printable
Diffstat (limited to 'src/kernel/keyb.c')
-rw-r--r-- | src/kernel/keyb.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/kernel/keyb.c b/src/kernel/keyb.c index bae462a..2c87422 100644 --- a/src/kernel/keyb.c +++ b/src/kernel/keyb.c @@ -21,7 +21,13 @@ OF THIS SOFTWARE. #include "vga.h" uint8_t get_char(bool echo) { - uint8_t ch = poll_port(COM2) ? read_byte(COM2) : 0;//TODO: from get_key + uint8_t ch = 0; + do + if (poll_port(COM2)) + ch = read_byte(COM2); + else + ;//TODO: get from get_key + while (!ch); if (echo) put_char(ch); return ch; |