aboutsummaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorCristian Maglie <c.maglie@arduino.cc>2015-10-01 12:39:57 +0200
committerCristian Maglie <c.maglie@arduino.cc>2015-10-02 11:59:23 +0200
commit0b3244c5ec3ac0f55550193b3144f5beb31891b2 (patch)
tree33c016eb364ace0e9f3283bb27ef8cbe306dc71c /libraries
parentbad9b58ce3e3770e12b9053c670b22c95aba8b45 (diff)
[HID] removed unused modules_count field
Diffstat (limited to 'libraries')
-rw-r--r--libraries/HID/HID.cpp5
-rw-r--r--libraries/HID/HID.h1
2 files changed, 2 insertions, 4 deletions
diff --git a/libraries/HID/HID.cpp b/libraries/HID/HID.cpp
index a109574..3a439f0 100644
--- a/libraries/HID/HID.cpp
+++ b/libraries/HID/HID.cpp
@@ -56,7 +56,7 @@ int HID_::getDescriptor(int8_t type)
void HID_::AppendDescriptor(HIDDescriptorListNode *node)
{
- if (modules_count == 0) {
+ if (!rootNode) {
rootNode = node;
} else {
HIDDescriptorListNode *current = rootNode;
@@ -65,7 +65,6 @@ void HID_::AppendDescriptor(HIDDescriptorListNode *node)
}
current->next = node;
}
- modules_count++;
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),
rootNode(NULL), sizeof_hidReportDescriptor(0),
- modules_count(0), protocol(1), idle(1)
+ protocol(1), idle(1)
{
epType[0] = EP_TYPE_INTERRUPT_IN;
PluggableUSB.plug(this);
diff --git a/libraries/HID/HID.h b/libraries/HID/HID.h
index ed08cf0..c6f9ab5 100644
--- a/libraries/HID/HID.h
+++ b/libraries/HID/HID.h
@@ -92,7 +92,6 @@ private:
HIDDescriptorListNode* rootNode;
uint16_t sizeof_hidReportDescriptor;
- uint8_t modules_count;
uint8_t protocol;
uint8_t idle;