From c9d1454efcff44dafec0a6b95b99316ecff80dee Mon Sep 17 00:00:00 2001 From: antifallobst Date: Tue, 14 Feb 2023 22:31:20 +0100 Subject: [PATCH] feature (kernel): Implemented 'io_wait' --- kernel/inc/utils/io.h | 1 + kernel/src/utils/io.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/kernel/inc/utils/io.h b/kernel/inc/utils/io.h index a3f5e1a..65947e7 100644 --- a/kernel/inc/utils/io.h +++ b/kernel/inc/utils/io.h @@ -21,5 +21,6 @@ // sends one byte to a port void io_out_byte (uint16_t port, uint8_t data); uint8_t io_in_byte (uint16_t port); +void io_wait (); #endif //NOX_IO_H diff --git a/kernel/src/utils/io.c b/kernel/src/utils/io.c index 6cfb015..aafd7be 100644 --- a/kernel/src/utils/io.c +++ b/kernel/src/utils/io.c @@ -23,4 +23,8 @@ uint8_t io_in_byte(uint16_t port) { uint8_t data; asm volatile ("inb %1, %0" : "=a"(data) : "Nd"(port)); return data; +} + +void io_wait() { + io_out_byte(0x80, 0); } \ No newline at end of file