From 5d2be701af64d826d268301d83119a6d2ad04f15 Mon Sep 17 00:00:00 2001 From: Bill Porter Date: Sat, 3 Dec 2011 20:03:27 -0600 Subject: [PATCH] Added Arduino 1.0 Compatibility Signed-off-by: Bill Porter --- PS2X_lib/PS2X_lib.cpp | 4 ++++ PS2X_lib/PS2X_lib.h | 13 +++++++++++-- ReadME.txt | 5 +++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/PS2X_lib/PS2X_lib.cpp b/PS2X_lib/PS2X_lib.cpp index 6ecbe9f..69532a3 100644 --- a/PS2X_lib/PS2X_lib.cpp +++ b/PS2X_lib/PS2X_lib.cpp @@ -3,8 +3,12 @@ #include #include #include +#if ARDUINO > 22 +#include "Arduino.h" +#else #include "WProgram.h" #include "pins_arduino.h" +#endif diff --git a/PS2X_lib/PS2X_lib.h b/PS2X_lib/PS2X_lib.h index ac28df5..e22dd7d 100644 --- a/PS2X_lib/PS2X_lib.h +++ b/PS2X_lib/PS2X_lib.h @@ -1,5 +1,5 @@ /****************************************************************** -* Super amazing PS2 controller Arduino Library v1.6 +* Super amazing PS2 controller Arduino Library v1.8 * details and example sketch: * http://www.billporter.info/?p=240 * @@ -52,6 +52,12 @@ * Changed config_gamepad() call to include rumble and pressures options * This was to fix controllers that will only go into config mode once * Old methods should still work for backwards compatibility +* 1.7 +* Integrated Kurt's fixes for the interrupts messing with servo signals +* Reorganized directory so examples show up in Arduino IDE menu +* 1.8 +* Added Arduino 1.0 compatibility. +* * * *This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or(at your option) any later version. @@ -73,8 +79,11 @@ GNU General Public License for more details. #ifndef PS2X_lib_h #define PS2X_lib_h +#if ARDUINO > 22 +#include "Arduino.h" +#else #include "WProgram.h" - +#endif #include #include diff --git a/ReadME.txt b/ReadME.txt index c575a7d..359ebbd 100644 --- a/ReadME.txt +++ b/ReadME.txt @@ -1,5 +1,5 @@ /****************************************************************** -* Super amazing PS2 controller Arduino Library v1.7 +* Super amazing PS2 controller Arduino Library v1.8 * details and example sketch: * http://www.billporter.info/?p=240 * @@ -55,7 +55,8 @@ * 1.7 * Integrated Kurt's fixes for the interrupts messing with servo signals * Reorganized directory so examples show up in Arduino IDE menu -* +* 1.8 +* Added Arduino 1.0 compatibility. * * *This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or(at your option) any later version.