diff options
Diffstat (limited to 'cores/arduino')
-rw-r--r-- | cores/arduino/PluggableUSB.cpp | 4 | ||||
-rw-r--r-- | cores/arduino/PluggableUSB.h | 1 | ||||
-rw-r--r-- | cores/arduino/USBCore.cpp | 4 |
3 files changed, 3 insertions, 6 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??? } diff --git a/cores/arduino/PluggableUSB.h b/cores/arduino/PluggableUSB.h index e066d37..8e7f5d7 100644 --- a/cores/arduino/PluggableUSB.h +++ b/cores/arduino/PluggableUSB.h @@ -31,6 +31,7 @@ typedef struct int8_t (*getInterface)(u8* interfaceNum); int8_t (*getDescriptor)(int8_t t); int8_t numEndpoints; + int8_t numInterfaces; u8 endpointType[]; } PUSBCallbacks; diff --git a/cores/arduino/USBCore.cpp b/cores/arduino/USBCore.cpp index 53c71d9..d936a6b 100644 --- a/cores/arduino/USBCore.cpp +++ b/cores/arduino/USBCore.cpp @@ -33,7 +33,6 @@ extern const u16 STRING_LANGUAGE[] PROGMEM; extern const u8 STRING_PRODUCT[] PROGMEM; extern const u8 STRING_MANUFACTURER[] PROGMEM; extern const DeviceDescriptor USB_DeviceDescriptor PROGMEM; -extern const DeviceDescriptor USB_DeviceDescriptorA PROGMEM; extern const DeviceDescriptor USB_DeviceDescriptorB PROGMEM; const u16 STRING_LANGUAGE[2] = { @@ -72,9 +71,6 @@ const u8 STRING_MANUFACTURER[] PROGMEM = USB_MANUFACTURER; const DeviceDescriptor USB_DeviceDescriptor = D_DEVICE(0x00,0x00,0x00,64,USB_VID,USB_PID,0x100,IMANUFACTURER,IPRODUCT,0,1); -const DeviceDescriptor USB_DeviceDescriptorA = - D_DEVICE(DEVICE_CLASS,0x00,0x00,64,USB_VID,USB_PID,0x100,IMANUFACTURER,IPRODUCT,0,1); - const DeviceDescriptor USB_DeviceDescriptorB = D_DEVICE(0xEF,0x02,0x01,64,USB_VID,USB_PID,0x100,IMANUFACTURER,IPRODUCT,0,1); |