feature (kernel): Implemented 'io_wait'

This commit is contained in:
antifallobst 2023-02-14 22:31:20 +01:00
parent 9fc370e549
commit c9d1454efc
2 changed files with 5 additions and 0 deletions

View File

@ -21,5 +21,6 @@
// sends one byte to a port // sends one byte to a port
void io_out_byte (uint16_t port, uint8_t data); void io_out_byte (uint16_t port, uint8_t data);
uint8_t io_in_byte (uint16_t port); uint8_t io_in_byte (uint16_t port);
void io_wait ();
#endif //NOX_IO_H #endif //NOX_IO_H

View File

@ -23,4 +23,8 @@ uint8_t io_in_byte(uint16_t port) {
uint8_t data; uint8_t data;
asm volatile ("inb %1, %0" : "=a"(data) : "Nd"(port)); asm volatile ("inb %1, %0" : "=a"(data) : "Nd"(port));
return data; return data;
}
void io_wait() {
io_out_byte(0x80, 0);
} }