Until to now, my keyboard 'driver' worked fine. Now I hacked some keyboard led support code, and at first it seemed to work like a charm. On Bochs and 4 of the 5 computers I tested it on, it worked. On that particular PC (Acer aspire M7811, if you want to know) the leds didn't do anything. The led lights just kept in their standard bios setting (numlock on).
Now you may wonder, what code do you use?
This:
Code: Select all
#define OL_KBC_STATUS_REGISTER 0x64
#define OL_KBC_OUTPUT_BUFFER 0x60
#define OL_KBC_COMMAND_PORT 0x64
#define OL_KBC_DATA_PORT 0x60
static void
toggle_kb_leds(uint8_t status)
{
while((inb(OL_KBC_STATUS_REGISTER) & 0x2) != 0);
outb(OL_KBC_DATA_PORT, 0xed);
while((inb(OL_KBC_STATUS_REGISTER) & 0x2) != 0);
outb(OL_KBC_DATA_PORT, status);
}
Code: Select all
#define OL_SCROLL_LED 0x1
#define OL_NUM_LED 0x2
#define OL_CAPS_LED 0x4
status ^= oneofabovedefs
Greets,
Bietje