diff options
author | Cristian Maglie <c.maglie@arduino.cc> | 2015-09-30 18:45:09 +0200 |
---|---|---|
committer | Cristian Maglie <c.maglie@arduino.cc> | 2015-10-02 11:59:23 +0200 |
commit | dbaec17c03fb846da28aaf249493fc2b872ca66a (patch) | |
tree | 6b769594b999fba15eac70125dbc75d5c63268f7 /libraries/HID | |
parent | f8b2d8acb3ff0bd12d40d428659401c851d6e8ba (diff) |
[PUSB] epType array is now part of HID class
Diffstat (limited to 'libraries/HID')
-rw-r--r-- | libraries/HID/HID.cpp | 8 | ||||
-rw-r--r-- | libraries/HID/HID.h | 1 |
2 files changed, 3 insertions, 6 deletions
diff --git a/libraries/HID/HID.cpp b/libraries/HID/HID.cpp index 10cd5a6..a871415 100644 --- a/libraries/HID/HID.cpp +++ b/libraries/HID/HID.cpp @@ -110,15 +110,11 @@ bool HID_::setup(USBSetup& setup, uint8_t i) } } -// XXX: I've found no way to pass literal value directly in -// the PUSBListNode constructor -static uint8_t epTypeDef[] = { EP_TYPE_INTERRUPT_IN }; - -HID_::HID_(void) : PUSBListNode(1, 1, epTypeDef), +HID_::HID_(void) : PUSBListNode(1, 1, epType), rootNode(NULL), sizeof_hidReportDescriptor(0), modules_count(0), protocol(1), idle(1) { - // XXX: Shall this be done in PUSBListNode(...) constructor? + epType[0] = EP_TYPE_INTERRUPT_IN; PluggableUSB.plug(this); } diff --git a/libraries/HID/HID.h b/libraries/HID/HID.h index bff51bb..9e6e675 100644 --- a/libraries/HID/HID.h +++ b/libraries/HID/HID.h @@ -88,6 +88,7 @@ protected: private: HIDDescriptor hidInterface; + uint8_t epType[1]; HIDDescriptorListNode* rootNode; uint16_t sizeof_hidReportDescriptor; |