KBD LEDs

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
The_Pro

KBD LEDs

Post by The_Pro »

i know you would have answered such a question alot. whenever i try to set the kbd leds, it fails. it doesn't give any error msg in BOCHS and it doesn't work in real hardware.

WaitForKBD();
outb(0x60, 0xED);
outb(0x60, 0x07);  // To set all LEDs ON



void WaitForKBD()
{
   UCHAR bfr;
   do
   {
     bfr = inb(0x64);
   }while((bfr & 1) != 0);
}
User avatar
gaf
Member
Member
Posts: 349
Joined: Thu Oct 21, 2004 11:00 pm
Location: Munich, Germany

RE:KBD LEDs

Post by gaf »

Hi
I think should call WaitForKBD before every outport

WaitForKBD();
outb(0x60, 0xED);
WaitForKBD();
outb(0x60, 0x07);

regards,
gaf
Post Reply