Skip to content

Commit dbaec17

Browse files
committed
[PUSB] epType array is now part of HID class
1 parent f8b2d8a commit dbaec17

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

libraries/HID/HID.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,11 @@ bool HID_::setup(USBSetup& setup, uint8_t i)
110110
}
111111
}
112112

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),
113+
HID_::HID_(void) : PUSBListNode(1, 1, epType),
118114
rootNode(NULL), sizeof_hidReportDescriptor(0),
119115
modules_count(0), protocol(1), idle(1)
120116
{
121-
// XXX: Shall this be done in PUSBListNode(...) constructor?
117+
epType[0] = EP_TYPE_INTERRUPT_IN;
122118
PluggableUSB.plug(this);
123119
}
124120

libraries/HID/HID.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ class HID_ : public PUSBListNode
8888

8989
private:
9090
HIDDescriptor hidInterface;
91+
uint8_t epType[1];
9192

9293
HIDDescriptorListNode* rootNode;
9394
uint16_t sizeof_hidReportDescriptor;

0 commit comments

Comments
 (0)