From d269ed2854354e7046c85b700a1633e78aae398f Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Tue, 23 Jun 2015 16:59:56 +0000 Subject: rework PUSBCallbacks initialization --- cores/arduino/PluggableUSB.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'cores/arduino/PluggableUSB.h') 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); -- cgit v1.2.3-18-g5258