Skip to content

Commit f42b26c

Browse files
committed
[HID] renamed HIDDescriptorListNode to HIDSubDescriptor
1 parent 2e75538 commit f42b26c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

libraries/HID/HID.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ int HID_::getDescriptor(USBSetup& setup)
4747
if (setup.wIndex != pluggedInterface) { return 0; }
4848

4949
int total = 0;
50-
HIDDescriptorListNode* node;
50+
HIDSubDescriptor* node;
5151
for (node = rootNode; node; node = node->next) {
5252
int res = USB_SendControl(TRANSFER_PGM, node->data, node->length);
5353
if (res == -1)
@@ -57,12 +57,12 @@ int HID_::getDescriptor(USBSetup& setup)
5757
return total;
5858
}
5959

60-
void HID_::AppendDescriptor(HIDDescriptorListNode *node)
60+
void HID_::AppendDescriptor(HIDSubDescriptor *node)
6161
{
6262
if (!rootNode) {
6363
rootNode = node;
6464
} else {
65-
HIDDescriptorListNode *current = rootNode;
65+
HIDSubDescriptor *current = rootNode;
6666
while (current->next) {
6767
current = current->next;
6868
}

libraries/HID/HID.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ typedef struct
7474
EndpointDescriptor in;
7575
} HIDDescriptor;
7676

77-
class HIDDescriptorListNode {
77+
class HIDSubDescriptor {
7878
public:
79-
HIDDescriptorListNode *next = NULL;
80-
HIDDescriptorListNode(const void *d, const uint16_t l) : data(d), length(l) { }
79+
HIDSubDescriptor *next = NULL;
80+
HIDSubDescriptor(const void *d, const uint16_t l) : data(d), length(l) { }
8181

8282
const void* data;
8383
const uint16_t length;
@@ -89,7 +89,7 @@ class HID_ : public PluggableUSBModule
8989
HID_(void);
9090
int begin(void);
9191
void SendReport(uint8_t id, const void* data, int len);
92-
void AppendDescriptor(HIDDescriptorListNode* node);
92+
void AppendDescriptor(HIDSubDescriptor* node);
9393

9494
protected:
9595
// Implementation of the PluggableUSBModule
@@ -100,7 +100,7 @@ class HID_ : public PluggableUSBModule
100100
private:
101101
uint8_t epType[1];
102102

103-
HIDDescriptorListNode* rootNode;
103+
HIDSubDescriptor* rootNode;
104104
uint16_t descriptorSize;
105105

106106
uint8_t protocol;

0 commit comments

Comments
 (0)