5752036 [rkeene@sledge /home/rkeene/devel/old/kbauthd]$ cat -n kbd.c
 1 #include "kbd.h"
 2 
 3 /*
 4     Lock the keyboard at the hardware level.
 5 */
 6 void disablekbd(void) {
 7   outb(0xa7,KBDBASE+4);
 8   outb(0xad,KBDBASE+4);
 9   outb(0xaf,KBDBASE+4);
10 }
11 
12 /*
13     Unlock the keyboard at the hardware level
14 */
15 void enablekbd(void) {
16   outb(0xa8,KBDBASE+4);
17   outb(0xae,KBDBASE+4);
18   outb(0xb0,KBDBASE+4);
19   outb(0xf4,KBDBASE);
20 }
21 
22 /*
23     Check keyboard hardware status
24 */
25 int checkkbdlock(void) {
26   int stats;
27   outb(0xa9,KBDBASE+4);
28   stats=inb(KBDBASE);
29   if (stats==1) { return 1; }
30   return 0;
31 }
5752037 [rkeene@sledge /home/rkeene/devel/old/kbauthd]$

Click here to go back to the directory listing.
Click here to download this file.
last modified: 1999-09-06 16:10:07