aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/PluggableUSB.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cores/arduino/PluggableUSB.cpp')
-rw-r--r--cores/arduino/PluggableUSB.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/cores/arduino/PluggableUSB.cpp b/cores/arduino/PluggableUSB.cpp
index 15195b0..f59fc67 100644
--- a/cores/arduino/PluggableUSB.cpp
+++ b/cores/arduino/PluggableUSB.cpp
@@ -95,13 +95,13 @@ int8_t PUSB_AddFunction(PUSBCallbacks *cb, u8* interface)
}
*interface = lastIf;
- lastIf++;
+ lastIf += cb->numInterfaces;
for ( u8 i = 0; i< cb->numEndpoints; i++) {
_initEndpoints[lastEp] = cb->endpointType[i];
lastEp++;
}
modules_count++;
- return lastEp-1;
+ return lastEp - cb->numEndpoints;
// restart USB layer???
}