60 lines
1.9 KiB
C
60 lines
1.9 KiB
C
|
|
|
|
void kb_test()
|
|
{
|
|
byte temp=0, secs=0;
|
|
|
|
puts("\nTHIS WILL TEST FEW COMMANDS OF THE PS/2 KEYBOARD.\n");
|
|
|
|
|
|
puts("\nEcho... ");
|
|
while ((inportb(0x64)&2)!=0);
|
|
outportb(0x60, 0xEE);
|
|
/* while ((inportb(0x64)&1)!=0);
|
|
temp = inportb(0x60);
|
|
putc_font('[', 0x07, 0x02);
|
|
putc_font(hex[temp/16], 0x07, 0x02);
|
|
putc_font(hex[temp%16], 0x07, 0x02);
|
|
putc_font(']', 0x07, 0x02);*/
|
|
|
|
|
|
puts("\nSet LEDs - SCROLL on... ");
|
|
while ((inportb(0x64)&2)!=0);
|
|
outportb(0x60, 0xED);
|
|
/* while ((inportb(0x64)&2)!=0);
|
|
outportb(0x60, 1);
|
|
while ((inportb(0x64)&1)!=0);
|
|
temp = inportb(0x60);*/
|
|
putc_font('[', 0x07, 0x02);
|
|
putc_font(hex[temp/16], 0x07, 0x02);
|
|
putc_font(hex[temp%16], 0x07, 0x02);
|
|
putc_font(']', 0x07, 0x02);
|
|
|
|
|
|
puts("\nGet current scancode set... ");
|
|
while ((inportb(0x64)&2)!=0);
|
|
outportb(0x60, 0xF0);
|
|
while ((inportb(0x64)&2)!=0);
|
|
outportb(0x60, 0);
|
|
|
|
/* while ((inportb(0x64)&1)!=0);
|
|
temp = inportb(0x60);
|
|
putc_font('[', 0x07, 0x02);
|
|
putc_font(hex[temp/16], 0x07, 0x02);
|
|
putc_font(hex[temp%16], 0x07, 0x02);
|
|
putc_font(']', 0x07, 0x02);*/
|
|
|
|
|
|
puts("\nTurning on 2 leds (don't know which ones :P)... ");
|
|
while ((inportb(0x64)&2)!=0);
|
|
outportb(0x60, 0xED);
|
|
while ((inportb(0x64)&2)!=0);
|
|
outportb(0x60, (byte)1|2);
|
|
/* while ((inportb(0x64)&1)!=0);
|
|
temp = inportb(0x60);
|
|
putc_font('[', 0x07, 0x02);
|
|
putc_font(hex[temp/16], 0x07, 0x02);
|
|
putc_font(hex[temp%16], 0x07, 0x02);
|
|
putc_font(']', 0x07, 0x02);*/
|
|
|
|
} |