keyb leds
Posted: Wed Dec 10, 2003 3:13 pm
Not so sure where did I wrong but I can not change kyb leds.
Code: Select all
unsigned int SetLedState(unsigned int LedNo, bool State)
{
if(State == ON)
KeyboardLeds |= LedNo;
else if(State == OFF)
KeyboardLeds &= ~LedNo;
else if(State == LED_REVERSE)
KeyboardLeds ^= LedNo;
while(!(in(KEYBOARD_COMMAND_PORT) & 2)); <- stucks here!
out(KEYBOARD_DATA_PORT, 0xED);
while(!(in(KEYBOARD_COMMAND_PORT) & 2));
out(KEYBOARD_DATA_PORT, KeyboardLeds);
return KeyboardLeds;
}
Code: Select all