mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Work around Arduino IDE bug
See: https://github.com/arduino/Arduino/pull/1726
This commit is contained in:
parent
b46ead88e8
commit
7d3154bce7
40 changed files with 130 additions and 62 deletions
|
@ -8,8 +8,9 @@
|
|||
#include <usbhub.h>
|
||||
#include "KeyboardParser.h"
|
||||
#include "MouseParser.h"
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
|
||||
#include <PS3BT.h>
|
||||
#include <usbhub.h>
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -7,8 +7,9 @@
|
|||
|
||||
#include <PS3BT.h>
|
||||
#include <usbhub.h>
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -12,8 +12,9 @@
|
|||
#include <PS3BT.h>
|
||||
#include <SPP.h>
|
||||
#include <usbhub.h>
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
#include <PS4BT.h>
|
||||
#include <usbhub.h>
|
||||
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
|
||||
#include <SPP.h>
|
||||
#include <usbhub.h>
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
|
||||
#include <SPP.h>
|
||||
#include <usbhub.h>
|
||||
// Satisfy IDE, which only needs to see the include statement in the ino.
|
||||
#ifdef dobogusinclude
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
|
||||
#include <Wii.h>
|
||||
#include <usbhub.h>
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -13,8 +13,9 @@ Otherwise, wire up a IR LED yourself.
|
|||
|
||||
#include <Wii.h>
|
||||
#include <usbhub.h>
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -7,8 +7,9 @@
|
|||
|
||||
#include <Wii.h>
|
||||
#include <usbhub.h>
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
|
||||
#include <Wii.h>
|
||||
#include <usbhub.h>
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#include <hidboot.h>
|
||||
#include <usbhub.h>
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
#include <hidboot.h>
|
||||
#include <usbhub.h>
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
class MouseRptParser : public MouseReportParser
|
||||
{
|
||||
protected:
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#include <hidboot.h>
|
||||
#include <usbhub.h>
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -4,6 +4,11 @@
|
|||
|
||||
#include "hidjoystickrptparser.h"
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
USB Usb;
|
||||
USBHub Hub(&Usb);
|
||||
HIDUniversal Hid(&Usb);
|
||||
|
|
|
@ -3,8 +3,9 @@
|
|||
#include <hidescriptorparser.h>
|
||||
#include <usbhub.h>
|
||||
#include "pgmstrings.h"
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -5,8 +5,9 @@
|
|||
#include <usbhub.h>
|
||||
|
||||
#include "le3dp_rptparser.h"
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
#include <usbhub.h>
|
||||
|
||||
#include "scale_rptparser.h"
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -5,8 +5,9 @@
|
|||
*/
|
||||
|
||||
#include <PS3USB.h>
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
#include <PS4USB.h>
|
||||
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
#include <PSBuzz.h>
|
||||
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
#include <usbhub.h>
|
||||
|
||||
#include "pgmstrings.h"
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
|
||||
#include <XBOXOLD.h>
|
||||
#include <usbhub.h>
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
*/
|
||||
|
||||
#include <XBOXRECV.h>
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -5,8 +5,9 @@
|
|||
*/
|
||||
|
||||
#include <XBOXUSB.h>
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
#include "pgmstrings.h"
|
||||
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
// 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
|
||||
#include <adk.h>
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
USB Usb;
|
||||
ADK adk(&Usb, "TKJElectronics", // Manufacturer Name
|
||||
"ArduinoBlinkLED", // Model Name
|
||||
|
|
|
@ -5,6 +5,11 @@
|
|||
#include <hidboot.h>
|
||||
#include <usbhub.h>
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
USB Usb;
|
||||
USBHub Hub1(&Usb);
|
||||
USBHub Hub2(&Usb);
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
#include <adk.h>
|
||||
#include <usbhub.h>
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
USB Usb;
|
||||
USBHub hub0(&Usb);
|
||||
USBHub hub1(&Usb);
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
#include <adk.h>
|
||||
#include <usbhub.h>
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
USB Usb;
|
||||
//USBHub Hub(&Usb);
|
||||
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
#include <adk.h>
|
||||
#include <usbhub.h>
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
USB Usb;
|
||||
|
||||
ADK adk(&Usb,"Circuits@Home, ltd.",
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
/* otherwise press any key after getting GPIO error to complete the test */
|
||||
/**/
|
||||
#include <usbhub.h>
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
#include <usbhub.h>
|
||||
|
||||
#include "pgmstrings.h"
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#include <usbhub.h>
|
||||
#include "pgmstrings.h"
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -5,6 +5,11 @@
|
|||
|
||||
#include <max_LCD.h>
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
USB Usb;
|
||||
Max_LCD lcd(&Usb);
|
||||
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
/* CDC support */
|
||||
#include <cdcacm.h>
|
||||
#include <cdcprolific.h>
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -5,8 +5,9 @@
|
|||
/* CDC support */
|
||||
#include <cdcacm.h>
|
||||
#include <cdcprolific.h>
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -11,8 +11,9 @@
|
|||
#include <cdcprolific.h>
|
||||
|
||||
#include <TinyGPS.h>
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -5,8 +5,9 @@
|
|||
/* CDC support */
|
||||
#include <cdcacm.h>
|
||||
#include <cdcprolific.h>
|
||||
// Satisfy IDE, which only needs to see the include statment in the ino.
|
||||
#ifdef dobogusinclude
|
||||
|
||||
#ifdef dobogusinclude // Satisfy the IDE, which needs to see the include statment in the ino too.
|
||||
#include <SPI.h>
|
||||
#include <spi4teensy3.h>
|
||||
#endif
|
||||
|
||||
|
|
1
examples/testusbhostFAT/testusbhostFAT.ino
Executable file → Normal file
1
examples/testusbhostFAT/testusbhostFAT.ino
Executable file → Normal file
|
@ -59,6 +59,7 @@
|
|||
#if WANT_HUB_TEST
|
||||
#include <usbhub.h>
|
||||
#endif
|
||||
#include <SPI.h>
|
||||
#include <masstorage.h>
|
||||
#include <Storage.h>
|
||||
#include <PCpartition/PCPartition.h>
|
||||
|
|
Loading…
Reference in a new issue