Skip to content

Commit 997462e

Browse files
Do not use typedef for the USB Setup struct
Using typedef for structs was relevant in C code to be able to leave out "struct" when using the type. In C++, this is no longer needed. Removing the typedef makes it easier to forward-declare the Setup struct later. Since USBAPI.h can only be included from C++ code, removing this typedef should not break any code.
1 parent f2214f6 commit 997462e

File tree

1 file changed

+2
-2
lines changed
  • hardware/arduino/avr/cores/arduino

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,15 +215,15 @@ extern Keyboard_ Keyboard;
215215
//================================================================================
216216
// Low level API
217217

218-
typedef struct
218+
struct Setup
219219
{
220220
uint8_t bmRequestType;
221221
uint8_t bRequest;
222222
uint8_t wValueL;
223223
uint8_t wValueH;
224224
uint16_t wIndex;
225225
uint16_t wLength;
226-
} Setup;
226+
};
227227

228228
//================================================================================
229229
//================================================================================

0 commit comments

Comments
 (0)