Skip to content

Commit 0b3244c

Browse files
committed
[HID] removed unused modules_count field
1 parent bad9b58 commit 0b3244c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

libraries/HID/HID.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ int HID_::getDescriptor(int8_t type)
5656

5757
void HID_::AppendDescriptor(HIDDescriptorListNode *node)
5858
{
59-
if (modules_count == 0) {
59+
if (!rootNode) {
6060
rootNode = node;
6161
} else {
6262
HIDDescriptorListNode *current = rootNode;
@@ -65,7 +65,6 @@ void HID_::AppendDescriptor(HIDDescriptorListNode *node)
6565
}
6666
current->next = node;
6767
}
68-
modules_count++;
6968
sizeof_hidReportDescriptor += (uint16_t)node->length;
7069
}
7170

@@ -116,7 +115,7 @@ bool HID_::setup(USBSetup& setup, uint8_t interfaceNum)
116115

117116
HID_::HID_(void) : PUSBListNode(1, 1, epType),
118117
rootNode(NULL), sizeof_hidReportDescriptor(0),
119-
modules_count(0), protocol(1), idle(1)
118+
protocol(1), idle(1)
120119
{
121120
epType[0] = EP_TYPE_INTERRUPT_IN;
122121
PluggableUSB.plug(this);

libraries/HID/HID.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ class HID_ : public PUSBListNode
9292

9393
HIDDescriptorListNode* rootNode;
9494
uint16_t sizeof_hidReportDescriptor;
95-
uint8_t modules_count;
9695

9796
uint8_t protocol;
9897
uint8_t idle;

0 commit comments

Comments
 (0)