Skip to content

Commit 5e57a43

Browse files
facchinmcmaglie
authored andcommitted
remove useless variables
1 parent e524e88 commit 5e57a43

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

hardware/arduino/avr/cores/arduino/PluggableUSB.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@
2525

2626
#define MAX_MODULES 6
2727

28-
static u8 startIf = CDC_ACM_INTERFACE + CDC_INTERFACE_COUNT;
29-
static u8 firstEp = CDC_FIRST_ENDPOINT + CDC_ENPOINT_COUNT;
30-
3128
static u8 lastIf = CDC_ACM_INTERFACE + CDC_INTERFACE_COUNT;
3229
static u8 lastEp = CDC_FIRST_ENDPOINT + CDC_ENPOINT_COUNT;
3330

@@ -36,18 +33,18 @@ extern u8 _initEndpoints[];
3633
PUSBCallbacks cbs[MAX_MODULES];
3734
u8 modules_count = 0;
3835

39-
int PUSB_GetInterface(u8* interfaceNum)
36+
int8_t PUSB_GetInterface(u8* interfaceNum)
4037
{
41-
int ret = 0;
38+
int8_t ret = 0;
4239
for (u8 i=0; i<modules_count; i++) {
4340
ret = cbs[i].getInterface(interfaceNum);
4441
}
4542
return ret;
4643
}
4744

48-
int PUSB_GetDescriptor(int t)
45+
int8_t PUSB_GetDescriptor(int8_t t)
4946
{
50-
int ret = 0;
47+
int8_t ret = 0;
5148
for (u8 i=0; i<modules_count && ret == 0; i++) {
5249
ret = cbs[i].getDescriptor(t);
5350
}
@@ -63,7 +60,7 @@ bool PUSB_Setup(Setup& setup, u8 j)
6360
return ret;
6461
}
6562

66-
int PUSB_AddFunction(PUSBCallbacks *cb, u8* interface)
63+
int8_t PUSB_AddFunction(PUSBCallbacks *cb, u8* interface)
6764
{
6865
if (modules_count >= MAX_MODULES) {
6966
return 0;

hardware/arduino/avr/cores/arduino/PluggableUSB.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
typedef struct
2929
{
3030
bool (*setup)(Setup& setup, u8 i);
31-
int (*getInterface)(u8* interfaceNum);
32-
int (*getDescriptor)(int t);
33-
int numEndpoints;
31+
int8_t (*getInterface)(u8* interfaceNum);
32+
int8_t (*getDescriptor)(int8_t t);
33+
int8_t numEndpoints;
3434
u8 endpointType[6];
3535
} PUSBCallbacks;
3636

@@ -40,11 +40,11 @@ typedef struct
4040
u8 firstEndpoint;
4141
} PUSBReturn;
4242

43-
int PUSB_AddFunction(PUSBCallbacks *cb, u8 *interface);
43+
int8_t PUSB_AddFunction(PUSBCallbacks *cb, u8 *interface);
4444

45-
int PUSB_GetInterface(u8* interfaceNum);
45+
int8_t PUSB_GetInterface(u8* interfaceNum);
4646

47-
int PUSB_GetDescriptor(int t);
47+
int8_t PUSB_GetDescriptor(int8_t t);
4848

4949
bool PUSB_Setup(Setup& setup, u8 i);
5050

0 commit comments

Comments
 (0)