- int bit;
-
- ao_led_enable = enable;
- lpc_scb.sysahbclkctrl |= (1 << LPC_SCB_SYSAHBCLKCTRL_GPIO);
- lpc_gpio.dir[LED_PORT] |= enable;
+ ao_enable_port(LED_PORT);
+ if (LED_PORT == 0) {
+ if (LEDS_AVAILABLE & (1 << 11))
+ lpc_ioconf.pio0_11 = LPC_IOCONF_FUNC_PIO0_11 | (1 << LPC_IOCONF_ADMODE);
+ if (LEDS_AVAILABLE & (1 << 12))
+ lpc_ioconf.pio0_12 = LPC_IOCONF_FUNC_PIO0_12 | (1 << LPC_IOCONF_ADMODE);
+ if (LEDS_AVAILABLE & (1 << 14))
+ lpc_ioconf.pio0_14 = LPC_IOCONF_FUNC_PIO0_14 | (1 << LPC_IOCONF_ADMODE);
+ }
+ lpc_gpio.dir[LED_PORT] |= LEDS_AVAILABLE;
+ ao_led_off(LEDS_AVAILABLE);