File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
hardware/arduino/avr/cores/arduino Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -29,19 +29,23 @@ PluggableUSB_ PluggableUSB;
29
29
30
30
int PluggableUSB_::getInterface (uint8_t * interfaceNum)
31
31
{
32
- int ret = 0 ;
32
+ int sent = 0 ;
33
33
PUSBListNode* node;
34
34
for (node = rootNode; node; node = node->next ) {
35
- ret = node->getInterface (interfaceNum);
35
+ int res = node->getInterface (interfaceNum);
36
+ if (res == -1 )
37
+ return -1 ;
38
+ sent += res;
36
39
}
37
- return ret ;
40
+ return sent ;
38
41
}
39
42
40
- int PluggableUSB_::getDescriptor (int8_t t )
43
+ int PluggableUSB_::getDescriptor (int8_t type )
41
44
{
42
45
PUSBListNode* node;
43
46
for (node = rootNode; node; node = node->next ) {
44
- int ret = node->getDescriptor (t);
47
+ int ret = node->getDescriptor (type);
48
+ // ret!=0 -> request has been processed
45
49
if (ret)
46
50
return ret;
47
51
}
You can’t perform that action at this time.
0 commit comments