Skip to content

Commit 11440d3

Browse files
committed
[PUSB] Renamed PUSBListNode to PluggableUSBModule
1 parent 80b7900 commit 11440d3

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

hardware/arduino/avr/cores/arduino/PluggableUSB.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ extern uint8_t _initEndpoints[];
2828
int PluggableUSB_::getInterface(uint8_t* interfaceCount)
2929
{
3030
int sent = 0;
31-
PUSBListNode* node;
31+
PluggableUSBModule* node;
3232
for (node = rootNode; node; node = node->next) {
3333
int res = node->getInterface(interfaceCount);
3434
if (res < 0)
@@ -40,7 +40,7 @@ int PluggableUSB_::getInterface(uint8_t* interfaceCount)
4040

4141
int PluggableUSB_::getDescriptor(USBSetup& setup)
4242
{
43-
PUSBListNode* node;
43+
PluggableUSBModule* node;
4444
for (node = rootNode; node; node = node->next) {
4545
int ret = node->getDescriptor(setup);
4646
// ret!=0 -> request has been processed
@@ -52,7 +52,7 @@ int PluggableUSB_::getDescriptor(USBSetup& setup)
5252

5353
bool PluggableUSB_::setup(USBSetup& setup)
5454
{
55-
PUSBListNode* node;
55+
PluggableUSBModule* node;
5656
for (node = rootNode; node; node = node->next) {
5757
if (node->setup(setup)) {
5858
return true;
@@ -61,7 +61,7 @@ bool PluggableUSB_::setup(USBSetup& setup)
6161
return false;
6262
}
6363

64-
bool PluggableUSB_::plug(PUSBListNode *node)
64+
bool PluggableUSB_::plug(PluggableUSBModule *node)
6565
{
6666
if ((lastEp + node->numEndpoints) > USB_ENDPOINTS) {
6767
return false;
@@ -70,7 +70,7 @@ bool PluggableUSB_::plug(PUSBListNode *node)
7070
if (!rootNode) {
7171
rootNode = node;
7272
} else {
73-
PUSBListNode *current = rootNode;
73+
PluggableUSBModule *current = rootNode;
7474
while (current->next) {
7575
current = current->next;
7676
}

hardware/arduino/avr/cores/arduino/PluggableUSB.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525

2626
#if defined(USBCON)
2727

28-
class PUSBListNode {
28+
class PluggableUSBModule {
2929
public:
30-
PUSBListNode(uint8_t numEps, uint8_t numIfs, uint8_t *epType) :
30+
PluggableUSBModule(uint8_t numEps, uint8_t numIfs, uint8_t *epType) :
3131
numEndpoints(numEps), numInterfaces(numIfs), endpointType(epType)
3232
{ }
3333

@@ -43,23 +43,23 @@ class PUSBListNode {
4343
const uint8_t numInterfaces;
4444
const uint8_t *endpointType;
4545

46-
PUSBListNode *next = NULL;
46+
PluggableUSBModule *next = NULL;
4747

4848
friend class PluggableUSB_;
4949
};
5050

5151
class PluggableUSB_ {
5252
public:
5353
PluggableUSB_();
54-
bool plug(PUSBListNode *node);
54+
bool plug(PluggableUSBModule *node);
5555
int getInterface(uint8_t* interfaceCount);
5656
int getDescriptor(USBSetup& setup);
5757
bool setup(USBSetup& setup);
5858

5959
private:
6060
uint8_t lastIf;
6161
uint8_t lastEp;
62-
PUSBListNode* rootNode;
62+
PluggableUSBModule* rootNode;
6363
};
6464

6565
// Replacement for global singleton.

hardware/arduino/avr/libraries/HID/HID.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ bool HID_::setup(USBSetup& setup)
128128
return false;
129129
}
130130

131-
HID_::HID_(void) : PUSBListNode(1, 1, epType),
131+
HID_::HID_(void) : PluggableUSBModule(1, 1, epType),
132132
rootNode(NULL), descriptorSize(0),
133133
protocol(1), idle(1)
134134
{

hardware/arduino/avr/libraries/HID/HID.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class HIDDescriptorListNode {
8383
const uint16_t length;
8484
};
8585

86-
class HID_ : public PUSBListNode
86+
class HID_ : public PluggableUSBModule
8787
{
8888
public:
8989
HID_(void);
@@ -92,7 +92,7 @@ class HID_ : public PUSBListNode
9292
void AppendDescriptor(HIDDescriptorListNode* node);
9393

9494
protected:
95-
// Implementation of the PUSBListNode
95+
// Implementation of the PluggableUSBModule
9696
int getInterface(uint8_t* interfaceCount);
9797
int getDescriptor(USBSetup& setup);
9898
bool setup(USBSetup& setup);

0 commit comments

Comments
 (0)