void up_ledon(int led) { /* We will control LED1 and LED2 not yet completed the boot sequence. */ if (!g_initialized) { int led1 = 0; int led2 = 0; switch (led) { case LED_STACKCREATED: g_initialized = true; case LED_STARTED: default: break; case LED_HEAPALLOCATE: led1 = 1; break; case LED_IRQSENABLED: led2 = 1; } lpc17_led(MBED_LED1,led1); lpc17_led(MBED_LED2,led2); } /* We will always control the HB LED */ switch (led) { case LED_INIRQ: case LED_SIGNAL: case LED_ASSERTION: case LED_PANIC: lpc17_gpiowrite(MBED_HEARTBEAT, false); g_nestcount++; default: break; } }
void up_ledoff(int led) { /* In all states, OFF can only mean turning off the HB LED */ if (g_nestcount <= 1) { lpc17_led(MBED_HEARTBEAT, true); g_nestcount = 0; } else { g_nestcount--; } }
void board_led_off(int led) { /* In all states, OFF can only mean turning off the HB LED */ if (g_nestcount <= 1) { lpc17_led(LINCOLN60_HEARTBEAT, true); g_nestcount = 0; } else { g_nestcount--; } }