projects
/
seabios.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Don't save/restore flags and ebp on external calls - saves on stack space.
[seabios.git]
/
src
/
util.c
1
#include "util.h" // usleep
2
3
// Sleep for n microseconds. currently using the
4
// refresh request port 0x61 bit4, toggling every 15usec
5
void
6
usleep(u32 count)
7
{
8
count = count / 15;
9
u8 kbd = inb(PORT_PS2_CTRLB);
10
while (count)
11
if ((inb(PORT_PS2_CTRLB) ^ kbd) & KBD_REFRESH)
12
count--;
13
}