The following changes to keyboard.cpp solved my problem with the mouse not working and the repeating Keyboard Control Callback.
It works with all four of my Logitech wireless keyboard/mouse combo's.
I changed line 142 in the keyboard claim function to:
Code:
mk_setup(setup, 0x21, 10, 0, 0, 0); // 10=SET_IDLE
I changed line 157 in the keyboard control function to:
Code:
mk_setup(setup, 0x21, 11, 0, 0, 0); // 11=SET_PROTOCOL BOOT
@KutrE
Could these two line have been reversed? I am curious to see if your wireless combo
Code:
// mk_setup(setup, 0x21, 11, 0, 0, 0); // 11=SET_PROTOCOL BOOT
mk_setup(setup, 0x21, 10, 0, 0, 0); // 10=SET_IDLE
queue_Control_Transfer(dev, &setup, NULL, this);
return true;
}
void KeyboardController::control(const Transfer_t *transfer)
{
println("control callback (keyboard)");
print_hexbytes(transfer->buffer, transfer->length);
// To decode hex dump to human readable HID report summary:
// http://eleccelerator.com/usbdescreqparser/
uint32_t mesg = transfer->setup.word1;
println(" mesg = ", mesg, HEX);
if (mesg == 0x001021 && transfer->length == 0) { // SET_PROTOCOL
mk_setup(setup, 0x21, 11, 0, 0, 0); // 11=SET_PROTOCOL BOOT
// mk_setup(setup, 0x21, 10, 0, 0, 0); // 10=SET_IDLE
queue_Control_Transfer(device, &setup, NULL, this);
}
}