X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=bootcensus;a=blobdiff_plain;f=src%2Fkeyb.c;h=3e86f43df38445b3d3e0a2646cfc77c21a664621;hp=0b6187129b305b010e21efe9fc7b77222a908391;hb=9358438bef42dbbcd1492a52d9010899a9756d2c;hpb=5e8cc93aaf1173688852acaa0825698c2dc0cb3f diff --git a/src/keyb.c b/src/keyb.c index 0b61871..3e86f43 100644 --- a/src/keyb.c +++ b/src/keyb.c @@ -22,6 +22,11 @@ along with this program. If not, see . #include "asmops.h" #include "kbregs.h" +#define delay7us() \ + do { \ + iodelay(); iodelay(); iodelay(); iodelay(); \ + iodelay(); iodelay(); iodelay(); \ + } while(0) /* table with rough translations from set 1 scancodes to ASCII-ish */ static int scantbl[] = { @@ -156,6 +161,7 @@ void kb_send_data(unsigned char data) unsigned char kb_read_data(void) { kb_wait_read(); + delay7us(); return inb(KB_DATA_PORT); }