diff options
author | Cristian Maglie <c.maglie@arduino.cc> | 2015-10-12 12:17:42 +0200 |
---|---|---|
committer | Cristian Maglie <c.maglie@arduino.cc> | 2015-10-12 12:24:07 +0200 |
commit | f42b26c257859f1b76094972727c4ebc2b412a62 (patch) | |
tree | 41aabc829ca11634584ceeefd4cc02220e034a45 /libraries/HID | |
parent | 2e755384f50eee83bcf0c850978b1387f185a2be (diff) |
[HID] renamed HIDDescriptorListNode to HIDSubDescriptor
Diffstat (limited to 'libraries/HID')
-rw-r--r-- | libraries/HID/HID.cpp | 6 | ||||
-rw-r--r-- | libraries/HID/HID.h | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/libraries/HID/HID.cpp b/libraries/HID/HID.cpp index 7b17a66..411529e 100644 --- a/libraries/HID/HID.cpp +++ b/libraries/HID/HID.cpp @@ -47,7 +47,7 @@ int HID_::getDescriptor(USBSetup& setup) if (setup.wIndex != pluggedInterface) { return 0; } int total = 0; - HIDDescriptorListNode* node; + HIDSubDescriptor* node; for (node = rootNode; node; node = node->next) { int res = USB_SendControl(TRANSFER_PGM, node->data, node->length); if (res == -1) @@ -57,12 +57,12 @@ int HID_::getDescriptor(USBSetup& setup) return total; } -void HID_::AppendDescriptor(HIDDescriptorListNode *node) +void HID_::AppendDescriptor(HIDSubDescriptor *node) { if (!rootNode) { rootNode = node; } else { - HIDDescriptorListNode *current = rootNode; + HIDSubDescriptor *current = rootNode; while (current->next) { current = current->next; } diff --git a/libraries/HID/HID.h b/libraries/HID/HID.h index 638fb03..ba08da7 100644 --- a/libraries/HID/HID.h +++ b/libraries/HID/HID.h @@ -74,10 +74,10 @@ typedef struct EndpointDescriptor in; } HIDDescriptor; -class HIDDescriptorListNode { +class HIDSubDescriptor { public: - HIDDescriptorListNode *next = NULL; - HIDDescriptorListNode(const void *d, const uint16_t l) : data(d), length(l) { } + HIDSubDescriptor *next = NULL; + HIDSubDescriptor(const void *d, const uint16_t l) : data(d), length(l) { } const void* data; const uint16_t length; @@ -89,7 +89,7 @@ public: HID_(void); int begin(void); void SendReport(uint8_t id, const void* data, int len); - void AppendDescriptor(HIDDescriptorListNode* node); + void AppendDescriptor(HIDSubDescriptor* node); protected: // Implementation of the PluggableUSBModule @@ -100,7 +100,7 @@ protected: private: uint8_t epType[1]; - HIDDescriptorListNode* rootNode; + HIDSubDescriptor* rootNode; uint16_t descriptorSize; uint8_t protocol; |