Support spi4teensy3 in all examples automatically

This commit is contained in:
Andrew J. Kroll 2013-12-04 21:56:06 -05:00
parent ac12126477
commit edf9682923
27 changed files with 292 additions and 186 deletions

View file

@ -6,6 +6,10 @@
#include <PS3BT.h> #include <PS3BT.h>
#include <usbhub.h> #include <usbhub.h>
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
USB Usb; USB Usb;
//USBHub Hub1(&Usb); // Some dongles have a hub inside //USBHub Hub1(&Usb); // Some dongles have a hub inside

View file

@ -7,6 +7,10 @@
#include <PS3BT.h> #include <PS3BT.h>
#include <usbhub.h> #include <usbhub.h>
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
USB Usb; USB Usb;
//USBHub Hub1(&Usb); // Some dongles have a hub inside //USBHub Hub1(&Usb); // Some dongles have a hub inside

View file

@ -12,6 +12,10 @@
#include <PS3BT.h> #include <PS3BT.h>
#include <SPP.h> #include <SPP.h>
#include <usbhub.h> #include <usbhub.h>
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
USB Usb; USB Usb;
//USBHub Hub1(&Usb); // Some dongles have a hub inside //USBHub Hub1(&Usb); // Some dongles have a hub inside

View file

@ -6,6 +6,10 @@
#include <SPP.h> #include <SPP.h>
#include <usbhub.h> #include <usbhub.h>
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
USB Usb; USB Usb;
//USBHub Hub1(&Usb); // Some dongles have a hub inside //USBHub Hub1(&Usb); // Some dongles have a hub inside

View file

@ -6,6 +6,10 @@
#include <SPP.h> #include <SPP.h>
#include <usbhub.h> #include <usbhub.h>
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
USB Usb; USB Usb;
//USBHub Hub1(&Usb); // Some dongles have a hub inside //USBHub Hub1(&Usb); // Some dongles have a hub inside

View file

@ -6,6 +6,10 @@
#include <Wii.h> #include <Wii.h>
#include <usbhub.h> #include <usbhub.h>
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
USB Usb; USB Usb;
//USBHub Hub1(&Usb); // Some dongles have a hub inside //USBHub Hub1(&Usb); // Some dongles have a hub inside

View file

@ -13,6 +13,10 @@ Otherwise, wire up a IR LED yourself.
#include <Wii.h> #include <Wii.h>
#include <usbhub.h> #include <usbhub.h>
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
#ifndef WIICAMERA // Used to check if WIICAMERA is defined #ifndef WIICAMERA // Used to check if WIICAMERA is defined
#error "Uncomment WIICAMERA in Wii.h to use this example" #error "Uncomment WIICAMERA in Wii.h to use this example"

View file

@ -7,6 +7,10 @@
#include <Wii.h> #include <Wii.h>
#include <usbhub.h> #include <usbhub.h>
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
USB Usb; USB Usb;
//USBHub Hub1(&Usb); // Some dongles have a hub inside //USBHub Hub1(&Usb); // Some dongles have a hub inside

View file

@ -6,6 +6,10 @@
#include <Wii.h> #include <Wii.h>
#include <usbhub.h> #include <usbhub.h>
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
USB Usb; USB Usb;
//USBHub Hub1(&Usb); // Some dongles have a hub inside //USBHub Hub1(&Usb); // Some dongles have a hub inside

View file

@ -1,5 +1,9 @@
#include <hidboot.h> #include <hidboot.h>
#include <usbhub.h> #include <usbhub.h>
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
class KbdRptParser : public KeyboardReportParser class KbdRptParser : public KeyboardReportParser
{ {

View file

@ -1,5 +1,9 @@
#include <hidboot.h> #include <hidboot.h>
#include <usbhub.h> #include <usbhub.h>
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
class MouseRptParser : public MouseReportParser class MouseRptParser : public MouseReportParser
{ {

View file

@ -2,10 +2,11 @@
#include <hiduniversal.h> #include <hiduniversal.h>
#include <hidescriptorparser.h> #include <hidescriptorparser.h>
#include <usbhub.h> #include <usbhub.h>
#ifdef arm #include "pgmstrings.h"
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
#include <spi4teensy3.h> #include <spi4teensy3.h>
#endif #endif
#include "pgmstrings.h"
class HIDUniversal2 : public HIDUniversal class HIDUniversal2 : public HIDUniversal
{ {

View file

@ -5,6 +5,10 @@
#include <usbhub.h> #include <usbhub.h>
#include "le3dp_rptparser.h" #include "le3dp_rptparser.h"
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
USB Usb; USB Usb;
USBHub Hub(&Usb); USBHub Hub(&Usb);

View file

@ -6,6 +6,10 @@
#include <usbhub.h> #include <usbhub.h>
#include "scale_rptparser.h" #include "scale_rptparser.h"
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
USB Usb; USB Usb;
USBHub Hub(&Usb); USBHub Hub(&Usb);

View file

@ -5,6 +5,10 @@
*/ */
#include <PS3USB.h> #include <PS3USB.h>
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
USB Usb; USB Usb;
/* You can create the instance of the class in two ways */ /* You can create the instance of the class in two ways */

View file

@ -1,6 +1,10 @@
#include <usbhub.h> #include <usbhub.h>
#include "pgmstrings.h" #include "pgmstrings.h"
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
USB Usb; USB Usb;
//USBHub Hub1(&Usb); //USBHub Hub1(&Usb);

View file

@ -6,6 +6,10 @@
#include <XBOXOLD.h> #include <XBOXOLD.h>
#include <usbhub.h> #include <usbhub.h>
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
USB Usb; USB Usb;
USBHub Hub1(&Usb); // The controller has a built in hub, so this instance is needed USBHub Hub1(&Usb); // The controller has a built in hub, so this instance is needed

View file

@ -6,6 +6,10 @@
*/ */
#include <XBOXRECV.h> #include <XBOXRECV.h>
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
USB Usb; USB Usb;
XBOXRECV Xbox(&Usb); XBOXRECV Xbox(&Usb);

View file

@ -5,6 +5,10 @@
*/ */
#include <XBOXUSB.h> #include <XBOXUSB.h>
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
USB Usb; USB Usb;
XBOXUSB Xbox(&Usb); XBOXUSB Xbox(&Usb);

View file

@ -3,6 +3,11 @@
#include "pgmstrings.h" #include "pgmstrings.h"
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
class ACMAsyncOper : public CDCAsyncOper class ACMAsyncOper : public CDCAsyncOper
{ {
public: public:

View file

@ -4,6 +4,10 @@
/* otherwise press any key after getting GPIO error to complete the test */ /* otherwise press any key after getting GPIO error to complete the test */
/**/ /**/
#include <usbhub.h> #include <usbhub.h>
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
/* variables */ /* variables */
uint8_t rcode; uint8_t rcode;

View file

@ -2,6 +2,10 @@
#include <usbhub.h> #include <usbhub.h>
#include "pgmstrings.h" #include "pgmstrings.h"
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
class FTDIAsync : public FTDIAsyncOper class FTDIAsync : public FTDIAsyncOper
{ {

View file

@ -1,5 +1,9 @@
#include <usbhub.h> #include <usbhub.h>
#include "pgmstrings.h" #include "pgmstrings.h"
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
USB Usb; USB Usb;
USBHub Hub1(&Usb); USBHub Hub1(&Usb);

View file

@ -4,6 +4,10 @@
/* CDC support */ /* CDC support */
#include <cdcacm.h> #include <cdcacm.h>
#include <cdcprolific.h> #include <cdcprolific.h>
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
class PLAsyncOper : public CDCAsyncOper class PLAsyncOper : public CDCAsyncOper
{ {

View file

@ -5,6 +5,10 @@
/* CDC support */ /* CDC support */
#include <cdcacm.h> #include <cdcacm.h>
#include <cdcprolific.h> #include <cdcprolific.h>
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
class PLAsyncOper : public CDCAsyncOper class PLAsyncOper : public CDCAsyncOper
{ {

View file

@ -11,6 +11,10 @@
#include <cdcprolific.h> #include <cdcprolific.h>
#include <TinyGPS.h> #include <TinyGPS.h>
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
/* This sample code demonstrates the normal use of a TinyGPS object. /* This sample code demonstrates the normal use of a TinyGPS object.
Modified to be used with USB Host Shield Library r2.0 Modified to be used with USB Host Shield Library r2.0

View file

@ -5,6 +5,10 @@
/* CDC support */ /* CDC support */
#include <cdcacm.h> #include <cdcacm.h>
#include <cdcprolific.h> #include <cdcprolific.h>
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
class PLAsyncOper : public CDCAsyncOper class PLAsyncOper : public CDCAsyncOper
{ {