12 years, 8 months ago.

KL25Z web compiler failure

#define LEDON 0
#define LEDOFF 1

DigitalOut rLed(LED_RED);
DigitalOut gLed(LED_GREEN);
DigitalOut bLed(LED_BLUE);

int main() {
  rLed = gLed = bLed = LEDOFF;  // why doesn't this work?
}

If I run the above code, the assignment is not passed through to each variable: rLed is not turned off. For an LPC1768, this code works as written. For a KL25Z, I have to assign each variable individually to get it to work.

Is this a bug?

Be the first to answer this question.