File tree 2 files changed +9
-9
lines changed 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 27
27
28
28
class PUSBListNode {
29
29
public:
30
- PUSBListNode () { }
31
- int8_t numEndpoints;
32
- int8_t numInterfaces;
33
- uint8_t *endpointType;
30
+ PUSBListNode (int8_t numEps, int8_t numIfs, uint8_t *epType) :
31
+ numEndpoints (numEps), numInterfaces(numIfs), endpointType(epType)
32
+ { }
34
33
35
34
inline uint8_t interface () const { return pluggedInterface; }
36
35
inline int8_t endpoint () const { return pluggedEndpoint; }
@@ -43,6 +42,10 @@ class PUSBListNode {
43
42
uint8_t pluggedInterface;
44
43
int8_t pluggedEndpoint;
45
44
45
+ const int8_t numEndpoints;
46
+ const int8_t numInterfaces;
47
+ const uint8_t *endpointType;
48
+
46
49
public:
47
50
PUSBListNode *next = NULL ;
48
51
Original file line number Diff line number Diff line change @@ -128,12 +128,9 @@ bool HID_::setup(USBSetup& setup, uint8_t i)
128
128
}
129
129
}
130
130
131
- HID_::HID_ (void )
131
+ HID_::HID_ (void ) : PUSBListNode( 1 , 1 , epType)
132
132
{
133
- numEndpoints = 1 ;
134
- numInterfaces = 1 ;
135
- endpointType = epType;
136
-
133
+ // XXX: Shall this be done in PUSBListNode(...) constructor?
137
134
PluggableUSB.plug (this );
138
135
}
139
136
You can’t perform that action at this time.
0 commit comments