Skip to content

Commit 7687928

Browse files
Merge pull request firmata#240 from firmata/galileo
enable Firmata to compile for Intel boards
2 parents 3f1cfd7 + aa1f78b commit 7687928

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Boards.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ writePort(port, value, bitmask): Write an 8 bit port.
250250
#define TOTAL_PINS 25 // 14 digital + 6 analog + 2 i2c + 3 spi
251251
#define TOTAL_PORTS 3 // set when TOTAL_PINS > num digitial I/O pins
252252
#define VERSION_BLINK_PIN LED_BUILTIN
253-
#define PIN_SERIAL1_RX 0
254-
#define PIN_SERIAL1_TX 1
253+
//#define PIN_SERIAL1_RX 0 // already defined in zero core variant.h
254+
//#define PIN_SERIAL1_TX 1 // already defined in zero core variant.h
255255
#define IS_PIN_DIGITAL(p) ((p) >= 0 && (p) <= 19)
256256
#define IS_PIN_ANALOG(p) ((p) >= 14 && (p) < 14 + TOTAL_ANALOG_PINS)
257257
#define IS_PIN_PWM(p) digitalPinHasPWM(p)
@@ -391,7 +391,7 @@ writePort(port, value, bitmask): Write an 8 bit port.
391391
#define PIN_TO_SERVO(p) (p)
392392

393393

394-
// Intel Galileo Board
394+
// Intel Galileo Board (gen 1 and 2) and Intel Edison
395395
#elif defined(ARDUINO_LINUX)
396396
#define TOTAL_ANALOG_PINS 6
397397
#define TOTAL_PINS 20 // 14 digital + 6 analog

utility/EthernetClientStream.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,16 @@ EthernetClientStream::write(uint8_t c)
6868
void
6969
EthernetClientStream::maintain(IPAddress localip)
7070
{
71+
// temporary hack to Firmata to compile for Intel Galileo
72+
// the issue is documented here: https://github.com/firmata/arduino/issues/218
73+
#if !defined(ARDUINO_LINUX)
7174
if (this->localip!=localip)
7275
{
7376
this->localip = localip;
7477
if (connected)
7578
stop();
7679
}
80+
#endif
7781
}
7882

7983
void

0 commit comments

Comments
 (0)