mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-15 12:29:26 +01:00
[HID] removed unused modules_count field
This commit is contained in:
parent
8a5ad75c50
commit
81aa7df093
@ -56,7 +56,7 @@ int HID_::getDescriptor(int8_t type)
|
|||||||
|
|
||||||
void HID_::AppendDescriptor(HIDDescriptorListNode *node)
|
void HID_::AppendDescriptor(HIDDescriptorListNode *node)
|
||||||
{
|
{
|
||||||
if (modules_count == 0) {
|
if (!rootNode) {
|
||||||
rootNode = node;
|
rootNode = node;
|
||||||
} else {
|
} else {
|
||||||
HIDDescriptorListNode *current = rootNode;
|
HIDDescriptorListNode *current = rootNode;
|
||||||
@ -65,7 +65,6 @@ void HID_::AppendDescriptor(HIDDescriptorListNode *node)
|
|||||||
}
|
}
|
||||||
current->next = node;
|
current->next = node;
|
||||||
}
|
}
|
||||||
modules_count++;
|
|
||||||
sizeof_hidReportDescriptor += (uint16_t)node->length;
|
sizeof_hidReportDescriptor += (uint16_t)node->length;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,7 +115,7 @@ bool HID_::setup(USBSetup& setup, uint8_t interfaceNum)
|
|||||||
|
|
||||||
HID_::HID_(void) : PUSBListNode(1, 1, epType),
|
HID_::HID_(void) : PUSBListNode(1, 1, epType),
|
||||||
rootNode(NULL), sizeof_hidReportDescriptor(0),
|
rootNode(NULL), sizeof_hidReportDescriptor(0),
|
||||||
modules_count(0), protocol(1), idle(1)
|
protocol(1), idle(1)
|
||||||
{
|
{
|
||||||
epType[0] = EP_TYPE_INTERRUPT_IN;
|
epType[0] = EP_TYPE_INTERRUPT_IN;
|
||||||
PluggableUSB.plug(this);
|
PluggableUSB.plug(this);
|
||||||
|
@ -92,7 +92,6 @@ private:
|
|||||||
|
|
||||||
HIDDescriptorListNode* rootNode;
|
HIDDescriptorListNode* rootNode;
|
||||||
uint16_t sizeof_hidReportDescriptor;
|
uint16_t sizeof_hidReportDescriptor;
|
||||||
uint8_t modules_count;
|
|
||||||
|
|
||||||
uint8_t protocol;
|
uint8_t protocol;
|
||||||
uint8_t idle;
|
uint8_t idle;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user