From 353ef39c23c7c9561fc5357d460c2d9cb3c4f320 Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Mon, 8 Jun 2015 11:30:34 +0200 Subject: remove useless variables --- cores/arduino/PluggableUSB.cpp | 13 +++++-------- cores/arduino/PluggableUSB.h | 12 ++++++------ 2 files changed, 11 insertions(+), 14 deletions(-) (limited to 'cores/arduino') diff --git a/cores/arduino/PluggableUSB.cpp b/cores/arduino/PluggableUSB.cpp index e389c35..b5e94ee 100644 --- a/cores/arduino/PluggableUSB.cpp +++ b/cores/arduino/PluggableUSB.cpp @@ -25,9 +25,6 @@ #define MAX_MODULES 6 -static u8 startIf = CDC_ACM_INTERFACE + CDC_INTERFACE_COUNT; -static u8 firstEp = CDC_FIRST_ENDPOINT + CDC_ENPOINT_COUNT; - static u8 lastIf = CDC_ACM_INTERFACE + CDC_INTERFACE_COUNT; static u8 lastEp = CDC_FIRST_ENDPOINT + CDC_ENPOINT_COUNT; @@ -36,18 +33,18 @@ extern u8 _initEndpoints[]; PUSBCallbacks cbs[MAX_MODULES]; u8 modules_count = 0; -int PUSB_GetInterface(u8* interfaceNum) +int8_t PUSB_GetInterface(u8* interfaceNum) { - int ret = 0; + int8_t ret = 0; for (u8 i=0; i= MAX_MODULES) { return 0; diff --git a/cores/arduino/PluggableUSB.h b/cores/arduino/PluggableUSB.h index 7b3722c..877a9b0 100644 --- a/cores/arduino/PluggableUSB.h +++ b/cores/arduino/PluggableUSB.h @@ -28,9 +28,9 @@ typedef struct { bool (*setup)(Setup& setup, u8 i); - int (*getInterface)(u8* interfaceNum); - int (*getDescriptor)(int t); - int numEndpoints; + int8_t (*getInterface)(u8* interfaceNum); + int8_t (*getDescriptor)(int8_t t); + int8_t numEndpoints; u8 endpointType[6]; } PUSBCallbacks; @@ -40,11 +40,11 @@ typedef struct u8 firstEndpoint; } PUSBReturn; -int PUSB_AddFunction(PUSBCallbacks *cb, u8 *interface); +int8_t PUSB_AddFunction(PUSBCallbacks *cb, u8 *interface); -int PUSB_GetInterface(u8* interfaceNum); +int8_t PUSB_GetInterface(u8* interfaceNum); -int PUSB_GetDescriptor(int t); +int8_t PUSB_GetDescriptor(int8_t t); bool PUSB_Setup(Setup& setup, u8 i); -- cgit v1.2.3-18-g5258