mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 12:27:34 +00:00
Kernel: Let's say that IO::delay(N) delays for N microseconds
Supposedly that's how much delay you get when doing I/O on port 0x80.
This commit is contained in:
parent
85aafe492d
commit
03eb0e5638
3 changed files with 5 additions and 11 deletions
|
@ -94,12 +94,10 @@ inline void repeated_out16(u16 port, const u16* data, int data_size)
|
|||
: "d"(port));
|
||||
}
|
||||
|
||||
inline void delay()
|
||||
inline void delay(size_t microseconds)
|
||||
{
|
||||
// ~3 microsecs
|
||||
for (auto i = 0; i < 32; i++) {
|
||||
for (size_t i = 0; i < microseconds; ++i)
|
||||
IO::in8(0x80);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue