File tree Expand file tree Collapse file tree 2 files changed +11
-14
lines changed
hardware/arduino/avr/cores/arduino Expand file tree Collapse file tree 2 files changed +11
-14
lines changed Original file line number Diff line number Diff line change 25
25
26
26
#define MAX_MODULES 6
27
27
28
- static u8 startIf = CDC_ACM_INTERFACE + CDC_INTERFACE_COUNT;
29
- static u8 firstEp = CDC_FIRST_ENDPOINT + CDC_ENPOINT_COUNT;
30
-
31
28
static u8 lastIf = CDC_ACM_INTERFACE + CDC_INTERFACE_COUNT;
32
29
static u8 lastEp = CDC_FIRST_ENDPOINT + CDC_ENPOINT_COUNT;
33
30
@@ -36,18 +33,18 @@ extern u8 _initEndpoints[];
36
33
PUSBCallbacks cbs[MAX_MODULES];
37
34
u8 modules_count = 0 ;
38
35
39
- int PUSB_GetInterface (u8 * interfaceNum)
36
+ int8_t PUSB_GetInterface (u8 * interfaceNum)
40
37
{
41
- int ret = 0 ;
38
+ int8_t ret = 0 ;
42
39
for (u8 i=0 ; i<modules_count; i++) {
43
40
ret = cbs[i].getInterface (interfaceNum);
44
41
}
45
42
return ret;
46
43
}
47
44
48
- int PUSB_GetDescriptor (int t)
45
+ int8_t PUSB_GetDescriptor (int8_t t)
49
46
{
50
- int ret = 0 ;
47
+ int8_t ret = 0 ;
51
48
for (u8 i=0 ; i<modules_count && ret == 0 ; i++) {
52
49
ret = cbs[i].getDescriptor (t);
53
50
}
@@ -63,7 +60,7 @@ bool PUSB_Setup(Setup& setup, u8 j)
63
60
return ret;
64
61
}
65
62
66
- int PUSB_AddFunction (PUSBCallbacks *cb, u8 * interface)
63
+ int8_t PUSB_AddFunction (PUSBCallbacks *cb, u8 * interface)
67
64
{
68
65
if (modules_count >= MAX_MODULES) {
69
66
return 0 ;
Original file line number Diff line number Diff line change 28
28
typedef struct
29
29
{
30
30
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 ;
34
34
u8 endpointType [6 ];
35
35
} PUSBCallbacks ;
36
36
@@ -40,11 +40,11 @@ typedef struct
40
40
u8 firstEndpoint ;
41
41
} PUSBReturn ;
42
42
43
- int PUSB_AddFunction (PUSBCallbacks * cb , u8 * interface );
43
+ int8_t PUSB_AddFunction (PUSBCallbacks * cb , u8 * interface );
44
44
45
- int PUSB_GetInterface (u8 * interfaceNum );
45
+ int8_t PUSB_GetInterface (u8 * interfaceNum );
46
46
47
- int PUSB_GetDescriptor (int t );
47
+ int8_t PUSB_GetDescriptor (int8_t t );
48
48
49
49
bool PUSB_Setup (Setup & setup , u8 i );
50
50
You can’t perform that action at this time.
0 commit comments