Skip to content

Commit b8fa4de

Browse files
committed
rename Setup typedef struct to USBSetup
was really too common
1 parent 2fcf041 commit b8fa4de

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

hardware/arduino/avr/cores/arduino/CDC.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ const CDCDescriptor _cdcInterface =
5353
D_ENDPOINT(USB_ENDPOINT_IN (CDC_ENDPOINT_IN ),USB_ENDPOINT_TYPE_BULK,0x40,0)
5454
};
5555

56-
int WEAK CDC_GetInterface(u8* interfaceNum)
56+
int CDC_GetInterface(u8* interfaceNum)
5757
{
5858
interfaceNum[0] += 2; // uses 2
5959
return USB_SendControl(TRANSFER_PGM,&_cdcInterface,sizeof(_cdcInterface));
6060
}
6161

62-
bool WEAK CDC_Setup(Setup& setup)
62+
bool CDC_Setup(USBSetup& setup)
6363
{
6464
u8 r = setup.bRequest;
6565
u8 requestType = setup.bmRequestType;

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ int PUSB_GetDescriptor(int8_t t)
5757
return ret;
5858
}
5959

60-
bool PUSB_Setup(Setup& setup, u8 j)
60+
bool PUSB_Setup(USBSetup& setup, u8 j)
6161
{
6262
bool ret = false;
6363
PUSBListNode* node = rootNode;

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
typedef struct
2929
{
30-
bool (*setup)(Setup& setup, u8 i);
30+
bool (*setup)(USBSetup& setup, u8 i);
3131
int (*getInterface)(u8* interfaceNum);
3232
int (*getDescriptor)(int8_t t);
3333
int8_t numEndpoints;
@@ -54,7 +54,7 @@ int PUSB_GetInterface(u8* interfaceNum);
5454

5555
int PUSB_GetDescriptor(int8_t t);
5656

57-
bool PUSB_Setup(Setup& setup, u8 i);
57+
bool PUSB_Setup(USBSetup& setup, u8 i);
5858

5959
void PUSB_Begin();
6060

hardware/arduino/avr/cores/arduino/USBAPI.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,15 @@ typedef struct
118118
uint8_t wValueH;
119119
uint16_t wIndex;
120120
uint16_t wLength;
121-
} Setup;
121+
} USBSetup;
122122

123123
//================================================================================
124124
//================================================================================
125125
// MSC 'Driver'
126126

127127
int MSC_GetInterface(uint8_t* interfaceNum);
128128
int MSC_GetDescriptor(int i);
129-
bool MSC_Setup(Setup& setup);
129+
bool MSC_Setup(USBSetup& setup);
130130
bool MSC_Data(uint8_t rx,uint8_t tx);
131131

132132
//================================================================================
@@ -135,7 +135,7 @@ bool MSC_Data(uint8_t rx,uint8_t tx);
135135

136136
int CDC_GetInterface(uint8_t* interfaceNum);
137137
int CDC_GetDescriptor(int i);
138-
bool CDC_Setup(Setup& setup);
138+
bool CDC_Setup(USBSetup& setup);
139139

140140
//================================================================================
141141
//================================================================================

hardware/arduino/avr/cores/arduino/USBCore.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ void InitEndpoints()
352352

353353
// Handle CLASS_INTERFACE requests
354354
static
355-
bool ClassInterfaceRequest(Setup& setup)
355+
bool ClassInterfaceRequest(USBSetup& setup)
356356
{
357357
u8 i = setup.wIndex;
358358

@@ -465,7 +465,7 @@ bool SendConfiguration(int maxlen)
465465
u8 _cdcComposite = 0;
466466

467467
static
468-
bool SendDescriptor(Setup& setup)
468+
bool SendDescriptor(USBSetup& setup)
469469
{
470470
int ret;
471471
u8 t = setup.wValueH;
@@ -517,7 +517,7 @@ ISR(USB_COM_vect)
517517
if (!ReceivedSetupInt())
518518
return;
519519

520-
Setup setup;
520+
USBSetup setup;
521521
Recv((u8*)&setup,8);
522522
ClearSetupInt();
523523

hardware/arduino/avr/libraries/HID/HID.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void HID_SendReport(u8 id, const void* data, int len)
7272
USB_Send(HID_TX | TRANSFER_RELEASE,data,len);
7373
}
7474

75-
bool HID_Setup(Setup& setup, u8 i)
75+
bool HID_Setup(USBSetup& setup, u8 i)
7676
{
7777
if (HID_INTERFACE != i) {
7878
return false;

0 commit comments

Comments
 (0)