Files
multi-os-thingy/patch_library.txt
2026-04-26 14:54:20 +02:00

52 lines
1.7 KiB
Plaintext

Libraries must be patched before compiling
/libraries/DigisparkKeyboard/
------------------------------------------------------------
File: usbconfig.h
------------------------------------------------------------
Find and change these #define values to:
#define USB_CFG_IMPLEMENT_FN_WRITE 1
#define USB_CFG_IMPLEMENT_FN_WRITEOUT 1
#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 53
------------------------------------------------------------
File: DigiKeyboard.h
------------------------------------------------------------
Find:
0x81, 0x00, // INPUT (Data,Ary,Abs)
0xc0 // END_COLLECTION
Replace with:
0x81, 0x00, // INPUT (Data,Ary,Abs)
0x05, 0x08, // USAGE_PAGE (LEDs)
0x19, 0x01, // USAGE_MINIMUM (Num Lock)
0x29, 0x05, // USAGE_MAXIMUM (Kana)
0x95, 0x05, // REPORT_COUNT (5)
0x75, 0x01, // REPORT_SIZE (1)
0x91, 0x02, // OUTPUT (Data,Var,Abs) - 5 LED bits
0x95, 0x01, // REPORT_COUNT (1)
0x75, 0x03, // REPORT_SIZE (3)
0x91, 0x03, // OUTPUT (Const,Var,Abs) - padding
0xc0 // END_COLLECTION
Find inside usbFunctionSetup():
} else if (rq->bRequest == USBRQ_HID_SET_IDLE) {
idleRate = rq->wValue.bytes[1];
}
} else {
Replace with:
} else if (rq->bRequest == USBRQ_HID_SET_IDLE) {
idleRate = rq->wValue.bytes[1];
} else if (rq->bRequest == USBRQ_HID_SET_REPORT) {
return USB_NO_MSG;
}
} else {