From 7302965552a77c1af000e3870848b3cc35670c51 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Tue, 29 Sep 2015 16:40:27 +0200 Subject: [PUSB] PUSBCallback struct has been merged into PUSBListNode This slightly simplifies PluggableUSB API. --- cores/arduino/PluggableUSB.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'cores/arduino/PluggableUSB.h') diff --git a/cores/arduino/PluggableUSB.h b/cores/arduino/PluggableUSB.h index 33108db..9210d7c 100644 --- a/cores/arduino/PluggableUSB.h +++ b/cores/arduino/PluggableUSB.h @@ -25,21 +25,18 @@ #if defined(USBCON) -typedef struct __attribute__((packed)) -{ +class PUSBListNode { +public: + PUSBListNode() { } bool (*setup)(USBSetup& setup, u8 i); int (*getInterface)(u8* interfaceNum); int (*getDescriptor)(int8_t t); int8_t numEndpoints; int8_t numInterfaces; uint8_t *endpointType; -} PUSBCallbacks; -class PUSBListNode { public: PUSBListNode *next = NULL; - PUSBCallbacks *cb; - PUSBListNode(PUSBCallbacks *ncb) {cb = ncb;} }; int8_t PUSB_AddFunction(PUSBListNode *node, u8 *interface); -- cgit v1.2.3-18-g5258