Skip to content

Commit 7d3154b

Browse files
committed
Work around Arduino IDE bug
See: arduino/Arduino#1726
1 parent b46ead8 commit 7d3154b

File tree

40 files changed

+130
-62
lines changed

40 files changed

+130
-62
lines changed

examples/Bluetooth/BTHID/BTHID.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
#include <usbhub.h>
99
#include "KeyboardParser.h"
1010
#include "MouseParser.h"
11-
// Satisfy IDE, which only needs to see the include statment in the ino.
12-
#ifdef dobogusinclude
11+
12+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
13+
#include <SPI.h>
1314
#include <spi4teensy3.h>
1415
#endif
1516

examples/Bluetooth/PS3BT/PS3BT.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66

77
#include <PS3BT.h>
88
#include <usbhub.h>
9-
// Satisfy IDE, which only needs to see the include statment in the ino.
10-
#ifdef dobogusinclude
9+
10+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
11+
#include <SPI.h>
1112
#include <spi4teensy3.h>
1213
#endif
1314

examples/Bluetooth/PS3Multi/PS3Multi.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77

88
#include <PS3BT.h>
99
#include <usbhub.h>
10-
// Satisfy IDE, which only needs to see the include statment in the ino.
11-
#ifdef dobogusinclude
10+
11+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
12+
#include <SPI.h>
1213
#include <spi4teensy3.h>
1314
#endif
1415

examples/Bluetooth/PS3SPP/PS3SPP.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
#include <PS3BT.h>
1313
#include <SPP.h>
1414
#include <usbhub.h>
15-
// Satisfy IDE, which only needs to see the include statment in the ino.
16-
#ifdef dobogusinclude
15+
16+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
17+
#include <SPI.h>
1718
#include <spi4teensy3.h>
1819
#endif
1920

examples/Bluetooth/PS4BT/PS4BT.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#include <PS4BT.h>
88
#include <usbhub.h>
99

10-
// Satisfy IDE, which only needs to see the include statment in the ino.
11-
#ifdef dobogusinclude
10+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
11+
#include <SPI.h>
1212
#include <spi4teensy3.h>
1313
#endif
1414

examples/Bluetooth/SPP/SPP.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66

77
#include <SPP.h>
88
#include <usbhub.h>
9-
// Satisfy IDE, which only needs to see the include statment in the ino.
10-
#ifdef dobogusinclude
9+
10+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
11+
#include <SPI.h>
1112
#include <spi4teensy3.h>
1213
#endif
1314

examples/Bluetooth/SPPMulti/SPPMulti.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66

77
#include <SPP.h>
88
#include <usbhub.h>
9-
// Satisfy IDE, which only needs to see the include statement in the ino.
10-
#ifdef dobogusinclude
9+
10+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
11+
#include <SPI.h>
1112
#include <spi4teensy3.h>
1213
#endif
1314

examples/Bluetooth/Wii/Wii.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66

77
#include <Wii.h>
88
#include <usbhub.h>
9-
// Satisfy IDE, which only needs to see the include statment in the ino.
10-
#ifdef dobogusinclude
9+
10+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
11+
#include <SPI.h>
1112
#include <spi4teensy3.h>
1213
#endif
1314

examples/Bluetooth/WiiIRCamera/WiiIRCamera.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ Otherwise, wire up a IR LED yourself.
1313

1414
#include <Wii.h>
1515
#include <usbhub.h>
16-
// Satisfy IDE, which only needs to see the include statment in the ino.
17-
#ifdef dobogusinclude
16+
17+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
18+
#include <SPI.h>
1819
#include <spi4teensy3.h>
1920
#endif
2021

examples/Bluetooth/WiiMulti/WiiMulti.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77

88
#include <Wii.h>
99
#include <usbhub.h>
10-
// Satisfy IDE, which only needs to see the include statment in the ino.
11-
#ifdef dobogusinclude
10+
11+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
12+
#include <SPI.h>
1213
#include <spi4teensy3.h>
1314
#endif
1415

examples/Bluetooth/WiiUProController/WiiUProController.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66

77
#include <Wii.h>
88
#include <usbhub.h>
9-
// Satisfy IDE, which only needs to see the include statment in the ino.
10-
#ifdef dobogusinclude
9+
10+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
11+
#include <SPI.h>
1112
#include <spi4teensy3.h>
1213
#endif
1314

examples/HID/USBHIDBootKbd/USBHIDBootKbd.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#include <hidboot.h>
22
#include <usbhub.h>
3-
// Satisfy IDE, which only needs to see the include statment in the ino.
4-
#ifdef dobogusinclude
3+
4+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
5+
#include <SPI.h>
56
#include <spi4teensy3.h>
67
#endif
78

examples/HID/USBHIDBootKbdAndMouse/USBHIDBootKbdAndMouse.ino

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#include <hidboot.h>
22
#include <usbhub.h>
33

4+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
5+
#include <SPI.h>
6+
#include <spi4teensy3.h>
7+
#endif
8+
49
class MouseRptParser : public MouseReportParser
510
{
611
protected:

examples/HID/USBHIDBootMouse/USBHIDBootMouse.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#include <hidboot.h>
22
#include <usbhub.h>
3-
// Satisfy IDE, which only needs to see the include statment in the ino.
4-
#ifdef dobogusinclude
3+
4+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
5+
#include <SPI.h>
56
#include <spi4teensy3.h>
67
#endif
78

examples/HID/USBHIDJoystick/USBHIDJoystick.ino

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
#include "hidjoystickrptparser.h"
66

7+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
8+
#include <SPI.h>
9+
#include <spi4teensy3.h>
10+
#endif
11+
712
USB Usb;
813
USBHub Hub(&Usb);
914
HIDUniversal Hid(&Usb);

examples/HID/USBHID_desc/USBHID_desc.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
#include <hidescriptorparser.h>
44
#include <usbhub.h>
55
#include "pgmstrings.h"
6-
// Satisfy IDE, which only needs to see the include statment in the ino.
7-
#ifdef dobogusinclude
6+
7+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
8+
#include <SPI.h>
89
#include <spi4teensy3.h>
910
#endif
1011

examples/HID/le3dp/le3dp.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
#include <usbhub.h>
66

77
#include "le3dp_rptparser.h"
8-
// Satisfy IDE, which only needs to see the include statment in the ino.
9-
#ifdef dobogusinclude
8+
9+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
10+
#include <SPI.h>
1011
#include <spi4teensy3.h>
1112
#endif
1213

examples/HID/scale/scale.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
#include <usbhub.h>
77

88
#include "scale_rptparser.h"
9-
// Satisfy IDE, which only needs to see the include statment in the ino.
10-
#ifdef dobogusinclude
9+
10+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
11+
#include <SPI.h>
1112
#include <spi4teensy3.h>
1213
#endif
1314

examples/PS3USB/PS3USB.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
*/
66

77
#include <PS3USB.h>
8-
// Satisfy IDE, which only needs to see the include statment in the ino.
9-
#ifdef dobogusinclude
8+
9+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
10+
#include <SPI.h>
1011
#include <spi4teensy3.h>
1112
#endif
1213

examples/PS4USB/PS4USB.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
#include <PS4USB.h>
88

9-
// Satisfy IDE, which only needs to see the include statment in the ino.
10-
#ifdef dobogusinclude
9+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
10+
#include <SPI.h>
1111
#include <spi4teensy3.h>
1212
#endif
1313

examples/PSBuzz/PSBuzz.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
#include <PSBuzz.h>
88

9-
// Satisfy IDE, which only needs to see the include statment in the ino.
10-
#ifdef dobogusinclude
9+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
10+
#include <SPI.h>
1111
#include <spi4teensy3.h>
1212
#endif
1313

examples/USB_desc/USB_desc.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#include <usbhub.h>
22

33
#include "pgmstrings.h"
4-
// Satisfy IDE, which only needs to see the include statment in the ino.
5-
#ifdef dobogusinclude
4+
5+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
6+
#include <SPI.h>
67
#include <spi4teensy3.h>
78
#endif
89

examples/Xbox/XBOXOLD/XBOXOLD.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66

77
#include <XBOXOLD.h>
88
#include <usbhub.h>
9-
// Satisfy IDE, which only needs to see the include statment in the ino.
10-
#ifdef dobogusinclude
9+
10+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
11+
#include <SPI.h>
1112
#include <spi4teensy3.h>
1213
#endif
1314

examples/Xbox/XBOXRECV/XBOXRECV.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
*/
77

88
#include <XBOXRECV.h>
9-
// Satisfy IDE, which only needs to see the include statment in the ino.
10-
#ifdef dobogusinclude
9+
10+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
11+
#include <SPI.h>
1112
#include <spi4teensy3.h>
1213
#endif
1314

examples/Xbox/XBOXUSB/XBOXUSB.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
*/
66

77
#include <XBOXUSB.h>
8-
// Satisfy IDE, which only needs to see the include statment in the ino.
9-
#ifdef dobogusinclude
8+
9+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
10+
#include <SPI.h>
1011
#include <spi4teensy3.h>
1112
#endif
1213

examples/acm/acm_terminal/acm_terminal.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
#include "pgmstrings.h"
55

6-
// Satisfy IDE, which only needs to see the include statment in the ino.
7-
#ifdef dobogusinclude
6+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
7+
#include <SPI.h>
88
#include <spi4teensy3.h>
99
#endif
1010

examples/adk/ArduinoBlinkLED/ArduinoBlinkLED.ino

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
// The code for the Android application is heavily based on this guide: http://allaboutee.com/2011/12/31/arduino-adk-board-blink-an-led-with-your-phone-code-and-explanation/ by Miguel
33
#include <adk.h>
44

5+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
6+
#include <SPI.h>
7+
#include <spi4teensy3.h>
8+
#endif
9+
510
USB Usb;
611
ADK adk(&Usb, "TKJElectronics", // Manufacturer Name
712
"ArduinoBlinkLED", // Model Name

examples/adk/adk_barcode/adk_barcode.ino

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
#include <hidboot.h>
66
#include <usbhub.h>
77

8+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
9+
#include <SPI.h>
10+
#include <spi4teensy3.h>
11+
#endif
12+
813
USB Usb;
914
USBHub Hub1(&Usb);
1015
USBHub Hub2(&Usb);

examples/adk/demokit_20/demokit_20.ino

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#include <adk.h>
22
#include <usbhub.h>
33

4+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
5+
#include <SPI.h>
6+
#include <spi4teensy3.h>
7+
#endif
8+
49
USB Usb;
510
USBHub hub0(&Usb);
611
USBHub hub1(&Usb);

examples/adk/term_test/term_test.ino

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#include <adk.h>
22
#include <usbhub.h>
33

4+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
5+
#include <SPI.h>
6+
#include <spi4teensy3.h>
7+
#endif
8+
49
USB Usb;
510
//USBHub Hub(&Usb);
611

examples/adk/term_time/term_time.ino

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#include <adk.h>
22
#include <usbhub.h>
33

4+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
5+
#include <SPI.h>
6+
#include <spi4teensy3.h>
7+
#endif
8+
49
USB Usb;
510

611
ADK adk(&Usb,"Circuits@Home, ltd.",

examples/board_qc/board_qc.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
/* otherwise press any key after getting GPIO error to complete the test */
55
/**/
66
#include <usbhub.h>
7-
// Satisfy IDE, which only needs to see the include statment in the ino.
8-
#ifdef dobogusinclude
7+
8+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
9+
#include <SPI.h>
910
#include <spi4teensy3.h>
1011
#endif
1112

examples/ftdi/USBFTDILoopback/USBFTDILoopback.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
#include <usbhub.h>
33

44
#include "pgmstrings.h"
5-
// Satisfy IDE, which only needs to see the include statment in the ino.
6-
#ifdef dobogusinclude
5+
6+
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
7+
#include <SPI.h>
78
#include <spi4teensy3.h>
89
#endif
910

0 commit comments

Comments
 (0)