aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/PluggableUSB.h
diff options
context:
space:
mode:
authorMartino Facchin <m.facchin@arduino.cc>2015-06-23 16:59:56 +0000
committerCristian Maglie <c.maglie@arduino.cc>2015-07-16 13:13:39 +0200
commitd269ed2854354e7046c85b700a1633e78aae398f (patch)
tree20117db788a831ec5538e6c40f59788477721caa /cores/arduino/PluggableUSB.h
parent3e516e93c4aa50a78112c704b89b38f5885a53d5 (diff)
rework PUSBCallbacks initialization
Diffstat (limited to 'cores/arduino/PluggableUSB.h')
-rw-r--r--cores/arduino/PluggableUSB.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/cores/arduino/PluggableUSB.h b/cores/arduino/PluggableUSB.h
index 8e7f5d7..f729deb 100644
--- a/cores/arduino/PluggableUSB.h
+++ b/cores/arduino/PluggableUSB.h
@@ -32,7 +32,7 @@ typedef struct
int8_t (*getDescriptor)(int8_t t);
int8_t numEndpoints;
int8_t numInterfaces;
- u8 endpointType[];
+ uint8_t *endpointType;
} PUSBCallbacks;
typedef struct
@@ -41,7 +41,14 @@ typedef struct
u8 firstEndpoint;
} PUSBReturn;
-int8_t PUSB_AddFunction(PUSBCallbacks *cb, u8 *interface);
+class PUSBListNode {
+public:
+ PUSBListNode *next = NULL;
+ PUSBCallbacks *cb;
+ PUSBListNode(PUSBCallbacks *ncb) {cb = ncb;}
+};
+
+int8_t PUSB_AddFunction(PUSBListNode *node, u8 *interface);
int8_t PUSB_GetInterface(u8* interfaceNum);