Skip to content

Commit a151349

Browse files
committed
[HID] renamed HIDDescriptorListNode to HIDSubDescriptor
1 parent 11440d3 commit a151349

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

hardware/arduino/avr/libraries/HID/HID.cpp

Lines changed: 3 additions & 3 deletions
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
}

hardware/arduino/avr/libraries/HID/HID.h

Lines changed: 5 additions & 5 deletions
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;

libraries/Keyboard/src/Keyboard.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static const uint8_t _hidReportDescriptor[] PROGMEM = {
6262

6363
Keyboard_::Keyboard_(void)
6464
{
65-
static HIDDescriptorListNode node(_hidReportDescriptor, sizeof(_hidReportDescriptor));
65+
static HIDSubDescriptor node(_hidReportDescriptor, sizeof(_hidReportDescriptor));
6666
HID().AppendDescriptor(&node);
6767
}
6868

libraries/Mouse/src/Mouse.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static const uint8_t _hidReportDescriptor[] PROGMEM = {
6262

6363
Mouse_::Mouse_(void) : _buttons(0)
6464
{
65-
static HIDDescriptorListNode node(_hidReportDescriptor, sizeof(_hidReportDescriptor));
65+
static HIDSubDescriptor node(_hidReportDescriptor, sizeof(_hidReportDescriptor));
6666
HID().AppendDescriptor(&node);
6767
}
6868

0 commit comments

Comments
 (0)