/* Simplified Logitech Extreme 3D Pro Joystick Report Parser */ #include #include #include #include "le3dp_rptparser.h" // Satisfy the IDE, which needs to see the include statment in the ino too. #ifdef dobogusinclude #include #include #endif USBHost usb; USBHub Hub(&usb); HIDUniversal Hid(&usb); JoystickEvents JoyEvents; JoystickReportParser Joy(&JoyEvents); void setup() { Serial.begin( 115200 ); #if !defined(__MIPSEL__) while (!Serial); // Wait for serial port to connect - used on Leonardo, Teensy and other boards with built-in USB CDC serial connection #endif Serial.println("Start"); if (usb.Init() == -1) Serial.println("OSC did not start."); delay( 200 ); if (!Hid.SetReportParser(0, &Joy)) ErrorMessage(PSTR("SetReportParser"), 1 ); } void loop() { usb.Task(); }