aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino
diff options
context:
space:
mode:
Diffstat (limited to 'cores/arduino')
-rw-r--r--cores/arduino/PluggableUSB.cpp8
-rw-r--r--cores/arduino/PluggableUSB.h8
-rw-r--r--cores/arduino/USBCore.cpp4
3 files changed, 10 insertions, 10 deletions
diff --git a/cores/arduino/PluggableUSB.cpp b/cores/arduino/PluggableUSB.cpp
index 95d4079..21dc7a8 100644
--- a/cores/arduino/PluggableUSB.cpp
+++ b/cores/arduino/PluggableUSB.cpp
@@ -38,11 +38,11 @@ int PluggableUSB_::getInterface(uint8_t* interfaceCount)
return sent;
}
-int PluggableUSB_::getDescriptor(int8_t type)
+int PluggableUSB_::getDescriptor(USBSetup& setup)
{
PUSBListNode* node;
for (node = rootNode; node; node = node->next) {
- int ret = node->getDescriptor(type);
+ int ret = node->getDescriptor(setup);
// ret!=0 -> request has been processed
if (ret)
return ret;
@@ -50,11 +50,11 @@ int PluggableUSB_::getDescriptor(int8_t type)
return 0;
}
-bool PluggableUSB_::setup(USBSetup& setup, uint8_t interfaceNum)
+bool PluggableUSB_::setup(USBSetup& setup)
{
PUSBListNode* node;
for (node = rootNode; node; node = node->next) {
- if (node->setup(setup, interfaceNum)) {
+ if (node->setup(setup)) {
return true;
}
}
diff --git a/cores/arduino/PluggableUSB.h b/cores/arduino/PluggableUSB.h
index b7c52d6..d12c4c4 100644
--- a/cores/arduino/PluggableUSB.h
+++ b/cores/arduino/PluggableUSB.h
@@ -35,9 +35,9 @@ public:
inline uint8_t endpoint() const { return pluggedEndpoint; }
protected:
- virtual bool setup(USBSetup& setup, uint8_t interfaceNum) = 0;
+ virtual bool setup(USBSetup& setup) = 0;
virtual int getInterface(uint8_t* interfaceCount) = 0;
- virtual int getDescriptor(int8_t t) = 0;
+ virtual int getDescriptor(USBSetup& setup) = 0;
uint8_t pluggedInterface;
uint8_t pluggedEndpoint;
@@ -56,8 +56,8 @@ public:
PluggableUSB_();
bool plug(PUSBListNode *node);
int getInterface(uint8_t* interfaceCount);
- int getDescriptor(int8_t type);
- bool setup(USBSetup& setup, uint8_t interfaceNum);
+ int getDescriptor(USBSetup& setup);
+ bool setup(USBSetup& setup);
private:
uint8_t lastIf;
diff --git a/cores/arduino/USBCore.cpp b/cores/arduino/USBCore.cpp
index 5db9f52..f67bfea 100644
--- a/cores/arduino/USBCore.cpp
+++ b/cores/arduino/USBCore.cpp
@@ -362,7 +362,7 @@ bool ClassInterfaceRequest(USBSetup& setup)
return CDC_Setup(setup);
#ifdef PLUGGABLE_USB_ENABLED
- return PluggableUSB().setup(setup, i);
+ return PluggableUSB().setup(setup);
#endif
return false;
}
@@ -476,7 +476,7 @@ bool SendDescriptor(USBSetup& setup)
InitControl(setup.wLength);
#ifdef PLUGGABLE_USB_ENABLED
- ret = PluggableUSB().getDescriptor(t);
+ ret = PluggableUSB().getDescriptor(setup);
if (ret != 0) {
return (ret > 0 ? true : false);
}