Skip to content

Commit 2a199f4

Browse files
committed
Merge remote-tracking branch 'Lukas1818/master' into avr-update
Apply digistump/pull/93, addresses platformio/platform-atmelavr/issues/113
2 parents 111396f + 60eaeb5 commit 2a199f4

File tree

2 files changed

+47
-47
lines changed

2 files changed

+47
-47
lines changed

digistump-avr/libraries/DigisparkKeyboard/DigiKeyboard.h

+18-18
Original file line numberDiff line numberDiff line change
@@ -38,24 +38,24 @@ static uchar idleRate; // in 4 ms units
3838
* for the second INPUT item.
3939
*/
4040
const PROGMEM char usbHidReportDescriptor[USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH] = { /* USB report descriptor */
41-
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
42-
0x09, 0x06, // USAGE (Keyboard)
43-
0xa1, 0x01, // COLLECTION (Application)
44-
0x05, 0x07, // USAGE_PAGE (Keyboard)
45-
0x19, 0xe0, // USAGE_MINIMUM (Keyboard LeftControl)
46-
0x29, 0xe7, // USAGE_MAXIMUM (Keyboard Right GUI)
47-
0x15, 0x00, // LOGICAL_MINIMUM (0)
48-
0x25, 0x01, // LOGICAL_MAXIMUM (1)
49-
0x75, 0x01, // REPORT_SIZE (1)
50-
0x95, 0x08, // REPORT_COUNT (8)
51-
0x81, 0x02, // INPUT (Data,Var,Abs)
52-
0x95, 0x01, // REPORT_COUNT (simultaneous keystrokes)
53-
0x75, 0x08, // REPORT_SIZE (8)
54-
0x25, 0x65, // LOGICAL_MAXIMUM (101)
55-
0x19, 0x00, // USAGE_MINIMUM (Reserved (no event indicated))
56-
0x29, 0x65, // USAGE_MAXIMUM (Keyboard Application)
57-
0x81, 0x00, // INPUT (Data,Ary,Abs)
58-
0xc0 // END_COLLECTION
41+
(char) 0x05, (char) 0x01, // USAGE_PAGE (Generic Desktop)
42+
(char) 0x09, (char) 0x06, // USAGE (Keyboard)
43+
(char) 0xa1, (char) 0x01, // COLLECTION (Application)
44+
(char) 0x05, (char) 0x07, // USAGE_PAGE (Keyboard)
45+
(char) 0x19, (char) 0xe0, // USAGE_MINIMUM (Keyboard LeftControl)
46+
(char) 0x29, (char) 0xe7, // USAGE_MAXIMUM (Keyboard Right GUI)
47+
(char) 0x15, (char) 0x00, // LOGICAL_MINIMUM (0)
48+
(char) 0x25, (char) 0x01, // LOGICAL_MAXIMUM (1)
49+
(char) 0x75, (char) 0x01, // REPORT_SIZE (1)
50+
(char) 0x95, (char) 0x08, // REPORT_COUNT (8)
51+
(char) 0x81, (char) 0x02, // INPUT (Data,Var,Abs)
52+
(char) 0x95, (char) 0x01, // REPORT_COUNT (simultaneous keystrokes)
53+
(char) 0x75, (char) 0x08, // REPORT_SIZE (8)
54+
(char) 0x25, (char) 0x65, // LOGICAL_MAXIMUM (101)
55+
(char) 0x19, (char) 0x00, // USAGE_MINIMUM (Reserved (no event indicated))
56+
(char) 0x29, (char) 0x65, // USAGE_MAXIMUM (Keyboard Application)
57+
(char) 0x81, (char) 0x00, // INPUT (Data,Ary,Abs)
58+
(char) 0xc0 // END_COLLECTION
5959
};
6060

6161

digistump-avr/libraries/DigisparkMouse/DigiMouse.h

+29-29
Original file line numberDiff line numberDiff line change
@@ -60,35 +60,35 @@ static unsigned long last_report_time = 0;
6060
char usb_hasCommed = 0;
6161

6262
const PROGMEM unsigned char mouse_usbHidReportDescriptor[] = { /* USB report descriptor */
63-
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
64-
0x09, 0x02, // USAGE (Mouse)
65-
0xa1, 0x01, // COLLECTION (Application)
66-
0x09, 0x01, // USAGE_PAGE (Pointer)
67-
0xa1, 0x00, // COLLECTION (Physical)
68-
0x05, 0x09, // USAGE_PAGE (Button)
69-
0x19, 0x01, // USAGE_MINIMUM (Button 1)
70-
0x29, 0x03, // USAGE_MAXIMUM (Button 3)
71-
0x15, 0x00, // LOGICAL_MINIMUM (0)
72-
0x25, 0x01, // LOGICAL_MAXIMUM (1)
73-
0x95, 0x03, // REPORT_COUNT (3)
74-
0x75, 0x01, // REPORT_SIZE (1)
75-
0x81, 0x02, // INPUT (Data,Var,Abs)
76-
0x95, 0x01, // REPORT_COUNT (1)
77-
0x75, 0x05, // REPORT_SIZE (5)
78-
0x81, 0x01, // Input(Cnst)
79-
0x05, 0x01, // USAGE_PAGE(Generic Desktop)
80-
0x09, 0x30, // USAGE(X)
81-
0x09, 0x31, // USAGE(Y)
82-
0x15, 0x81, // LOGICAL_MINIMUM (-127)
83-
0x25, 0x7f, // LOGICAL_MAXIMUM (127)
84-
0x75, 0x08, // REPORT_SIZE (8)
85-
0x95, 0x02, // REPORT_COUNT (2)
86-
0x81, 0x06, // INPUT (Data,Var,Rel)
87-
0x09, 0x38, // Usage (Wheel)
88-
0x95, 0x01, // Report Count (1),
89-
0x81, 0x06, // Input (Data, Variable, Relative)
90-
0xc0, // END_COLLECTION
91-
0xc0 // END_COLLECTION
63+
(unsigned char) 0x05, (unsigned char) 0x01, // USAGE_PAGE (Generic Desktop)
64+
(unsigned char) 0x09, (unsigned char) 0x02, // USAGE (Mouse)
65+
(unsigned char) 0xa1, (unsigned char) 0x01, // COLLECTION (Application)
66+
(unsigned char) 0x09, (unsigned char) 0x01, // USAGE_PAGE (Pointer)
67+
(unsigned char) 0xa1, (unsigned char) 0x00, // COLLECTION (Physical)
68+
(unsigned char) 0x05, (unsigned char) 0x09, // USAGE_PAGE (Button)
69+
(unsigned char) 0x19, (unsigned char) 0x01, // USAGE_MINIMUM (Button 1)
70+
(unsigned char) 0x29, (unsigned char) 0x03, // USAGE_MAXIMUM (Button 3)
71+
(unsigned char) 0x15, (unsigned char) 0x00, // LOGICAL_MINIMUM (0)
72+
(unsigned char) 0x25, (unsigned char) 0x01, // LOGICAL_MAXIMUM (1)
73+
(unsigned char) 0x95, (unsigned char) 0x03, // REPORT_COUNT (3)
74+
(unsigned char) 0x75, (unsigned char) 0x01, // REPORT_SIZE (1)
75+
(unsigned char) 0x81, (unsigned char) 0x02, // INPUT (Data,Var,Abs)
76+
(unsigned char) 0x95, (unsigned char) 0x01, // REPORT_COUNT (1)
77+
(unsigned char) 0x75, (unsigned char) 0x05, // REPORT_SIZE (5)
78+
(unsigned char) 0x81, (unsigned char) 0x01, // Input(Cnst)
79+
(unsigned char) 0x05, (unsigned char) 0x01, // USAGE_PAGE(Generic Desktop)
80+
(unsigned char) 0x09, (unsigned char) 0x30, // USAGE(X)
81+
(unsigned char) 0x09, (unsigned char) 0x31, // USAGE(Y)
82+
(unsigned char) 0x15, (unsigned char) 0x81, // LOGICAL_MINIMUM (-127)
83+
(unsigned char) 0x25, (unsigned char) 0x7f, // LOGICAL_MAXIMUM (127)
84+
(unsigned char) 0x75, (unsigned char) 0x08, // REPORT_SIZE (8)
85+
(unsigned char) 0x95, (unsigned char) 0x02, // REPORT_COUNT (2)
86+
(unsigned char) 0x81, (unsigned char) 0x06, // INPUT (Data,Var,Rel)
87+
(unsigned char) 0x09, (unsigned char) 0x38, // Usage (Wheel)
88+
(unsigned char) 0x95, (unsigned char) 0x01, // Report Count (1),
89+
(unsigned char) 0x81, (unsigned char) 0x06, // Input (Data, Variable, Relative)
90+
(unsigned char) 0xc0, // END_COLLECTION
91+
(unsigned char) 0xc0 // END_COLLECTION
9292
};
9393

9494

0 commit comments

Comments
 (0)