|
23 | 23 |
|
24 | 24 | HID_ HID;
|
25 | 25 |
|
26 |
| -//================================================================================ |
27 |
| -//================================================================================ |
28 |
| -// HID Interface |
29 |
| - |
30 |
| -HIDDescriptor HID_::hidInterface; |
31 |
| - |
32 |
| -HIDDescriptorListNode* HID_::rootNode = NULL; |
33 |
| -uint16_t HID_::sizeof_hidReportDescriptor = 0; |
34 |
| -uint8_t HID_::modules_count = 0; |
35 |
| -uint8_t HID_::epType[] = { EP_TYPE_INTERRUPT_IN }; |
36 |
| - |
37 |
| -//================================================================================ |
38 |
| -//================================================================================ |
39 |
| -// Driver |
40 |
| - |
41 |
| -uint8_t HID_::protocol = 1; |
42 |
| -uint8_t HID_::idle = 1; |
43 |
| - |
44 | 26 | int HID_::getInterface(uint8_t* interfaceNum)
|
45 | 27 | {
|
46 | 28 | interfaceNum[0] += 1; // uses 1
|
@@ -128,7 +110,13 @@ bool HID_::setup(USBSetup& setup, uint8_t i)
|
128 | 110 | }
|
129 | 111 | }
|
130 | 112 |
|
131 |
| -HID_::HID_(void) : PUSBListNode(1, 1, epType) |
| 113 | +// XXX: I've found no way to pass literal value directly in |
| 114 | +// the PUSBListNode constructor |
| 115 | +static uint8_t epTypeDef[] = { EP_TYPE_INTERRUPT_IN }; |
| 116 | + |
| 117 | +HID_::HID_(void) : PUSBListNode(1, 1, epTypeDef), |
| 118 | + rootNode(NULL), sizeof_hidReportDescriptor(0), |
| 119 | + modules_count(0), protocol(1), idle(1) |
132 | 120 | {
|
133 | 121 | // XXX: Shall this be done in PUSBListNode(...) constructor?
|
134 | 122 | PluggableUSB.plug(this);
|
|
0 commit comments