From aa1f78bfd558dcf55be9af268ee15e5bad663351 Mon Sep 17 00:00:00 2001 From: Jeff Hoefs Date: Thu, 5 Nov 2015 22:27:11 -0800 Subject: [PATCH] enable Firmata to compile for Intel boards --- Boards.h | 6 +++--- utility/EthernetClientStream.cpp | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Boards.h b/Boards.h index 8c566cad..aed83ef2 100644 --- a/Boards.h +++ b/Boards.h @@ -250,8 +250,8 @@ writePort(port, value, bitmask): Write an 8 bit port. #define TOTAL_PINS 25 // 14 digital + 6 analog + 2 i2c + 3 spi #define TOTAL_PORTS 3 // set when TOTAL_PINS > num digitial I/O pins #define VERSION_BLINK_PIN LED_BUILTIN -#define PIN_SERIAL1_RX 0 -#define PIN_SERIAL1_TX 1 +//#define PIN_SERIAL1_RX 0 // already defined in zero core variant.h +//#define PIN_SERIAL1_TX 1 // already defined in zero core variant.h #define IS_PIN_DIGITAL(p) ((p) >= 0 && (p) <= 19) #define IS_PIN_ANALOG(p) ((p) >= 14 && (p) < 14 + TOTAL_ANALOG_PINS) #define IS_PIN_PWM(p) digitalPinHasPWM(p) @@ -391,7 +391,7 @@ writePort(port, value, bitmask): Write an 8 bit port. #define PIN_TO_SERVO(p) (p) -// Intel Galileo Board +// Intel Galileo Board (gen 1 and 2) and Intel Edison #elif defined(ARDUINO_LINUX) #define TOTAL_ANALOG_PINS 6 #define TOTAL_PINS 20 // 14 digital + 6 analog diff --git a/utility/EthernetClientStream.cpp b/utility/EthernetClientStream.cpp index 81ccf839..4a13ba3f 100644 --- a/utility/EthernetClientStream.cpp +++ b/utility/EthernetClientStream.cpp @@ -68,12 +68,16 @@ EthernetClientStream::write(uint8_t c) void EthernetClientStream::maintain(IPAddress localip) { +// temporary hack to Firmata to compile for Intel Galileo +// the issue is documented here: https://github.com/firmata/arduino/issues/218 +#if !defined(ARDUINO_LINUX) if (this->localip!=localip) { this->localip = localip; if (connected) stop(); } +#endif } void