diff options
author | Martino Facchin <m.facchin@arduino.cc> | 2015-06-08 17:34:59 +0200 |
---|---|---|
committer | Cristian Maglie <c.maglie@arduino.cc> | 2015-07-16 13:12:15 +0200 |
commit | 8fbc30bd8afab6e70dfa4624250a5a6b676de553 (patch) | |
tree | 3fa15b2af07eb11fadfedf6922088fa44dcd56bc /cores/arduino/PluggableUSB.cpp | |
parent | b38d7f07f0ee8e5e9bdc912966dcee4ae3a8b3e7 (diff) |
add numInterfaces field to PUSBCallbacks
Diffstat (limited to 'cores/arduino/PluggableUSB.cpp')
-rw-r--r-- | cores/arduino/PluggableUSB.cpp | 4 |
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??? } |