mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-18 12:54:25 +01:00
[PUSB] renamed some parameters
This commit is contained in:
parent
8bc21f7e36
commit
5b1b0330b2
@ -25,12 +25,12 @@
|
||||
|
||||
extern uint8_t _initEndpoints[];
|
||||
|
||||
int PluggableUSB_::getInterface(uint8_t* interfaceNum)
|
||||
int PluggableUSB_::getInterface(uint8_t* interfaceCount)
|
||||
{
|
||||
int sent = 0;
|
||||
PUSBListNode* node;
|
||||
for (node = rootNode; node; node = node->next) {
|
||||
int res = node->getInterface(interfaceNum);
|
||||
int res = node->getInterface(interfaceCount);
|
||||
if (res < 0)
|
||||
return -1;
|
||||
sent += res;
|
||||
@ -50,11 +50,11 @@ int PluggableUSB_::getDescriptor(int8_t type)
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool PluggableUSB_::setup(USBSetup& setup, uint8_t j)
|
||||
bool PluggableUSB_::setup(USBSetup& setup, uint8_t interfaceNum)
|
||||
{
|
||||
PUSBListNode* node;
|
||||
for (node = rootNode; node; node = node->next) {
|
||||
if (node->setup(setup, j)) {
|
||||
if (node->setup(setup, interfaceNum)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -35,8 +35,8 @@ public:
|
||||
inline int8_t endpoint() const { return pluggedEndpoint; }
|
||||
|
||||
protected:
|
||||
virtual bool setup(USBSetup& setup, uint8_t i) = 0;
|
||||
virtual int getInterface(uint8_t* interfaceNum) = 0;
|
||||
virtual bool setup(USBSetup& setup, uint8_t interfaceNum) = 0;
|
||||
virtual int getInterface(uint8_t* interfaceCount) = 0;
|
||||
virtual int getDescriptor(int8_t t) = 0;
|
||||
|
||||
uint8_t pluggedInterface;
|
||||
@ -55,9 +55,9 @@ class PluggableUSB_ {
|
||||
public:
|
||||
PluggableUSB_();
|
||||
bool plug(PUSBListNode *node);
|
||||
int getInterface(uint8_t* interfaceNum);
|
||||
int getDescriptor(int8_t t);
|
||||
bool setup(USBSetup& setup, uint8_t i);
|
||||
int getInterface(uint8_t* interfaceCount);
|
||||
int getDescriptor(int8_t type);
|
||||
bool setup(USBSetup& setup, uint8_t interfaceNum);
|
||||
|
||||
private:
|
||||
uint8_t lastIf;
|
||||
|
@ -27,9 +27,9 @@ HID_& HID()
|
||||
return obj;
|
||||
}
|
||||
|
||||
int HID_::getInterface(uint8_t* interfaceNum)
|
||||
int HID_::getInterface(uint8_t* interfaceCount)
|
||||
{
|
||||
*interfaceNum += 1; // uses 1
|
||||
*interfaceCount += 1; // uses 1
|
||||
HIDDescriptor hidInterface = {
|
||||
D_INTERFACE(interface(), 1, 3, 0, 0),
|
||||
D_HIDREPORT(descriptorSize),
|
||||
|
@ -79,7 +79,7 @@ public:
|
||||
|
||||
protected:
|
||||
// Implementation of the PUSBListNode
|
||||
int getInterface(uint8_t* interfaceNum);
|
||||
int getInterface(uint8_t* interfaceCount);
|
||||
int getDescriptor(int8_t type);
|
||||
bool setup(USBSetup& setup, uint8_t interfaceNum);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user