Re: uLisp v3.0c won't compile for Micro:bit


#1

Alas, I was sick last week and couldn’t response before you closed out the bug.
For your consideration, may I suggest this:

void serialbegin (int address, int baud) {
#if defined(ARDUINO_SAM_DUE)
  if (address == 1) Serial1.begin((long)baud*100);
  else if (address == 2) Serial2.begin((long)baud*100);
  else if (address == 3) Serial3.begin((long)baud*100);
  else
#elif !defined(_VARIANT_BBC_MICROBIT_)
  if (address == 1) Serial1.begin((long)baud*100);
  else 
#endif
  error(WITHSERIAL, PSTR("port not supported"), number(address));
}

True, “extra” 'else’s but no if(false) ;.
For what it’s worth.
-Rusty-


#2

Thanks - I’ll tidy it up next release.


#3

That’s kewl. :)


#4

This is fixed in uLisp Version 3.1. Thanks for reporting it.


#5