first commit
This commit is contained in:
52
patch_library.txt
Normal file
52
patch_library.txt
Normal file
@@ -0,0 +1,52 @@
|
||||
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 {
|
||||
Reference in New Issue
Block a user