void board_led_initialize(void) { /* Turn off both LEDs */ gpio_outputlow(LPC31_IOCONFIG_GPIO, GPIO_LED1); gpio_outputlow(LPC31_IOCONFIG_GPIO, GPIO_LED2); }
void up_ledinit(void) { /* Turn off both LEDs */ gpio_outputlow(LPC31_IOCONFIG_GPIO, GPIO_LED1); gpio_outputlow(LPC31_IOCONFIG_GPIO, GPIO_LED2); }
void lpc31_setled(int led, bool ledon) { uint32_t bit; #ifndef CONFIG_ARCH_LEDS if (led == BOARD_LED1) { bit = GPIO_LED1; } else #endif if (led == BOARD_LED2) { bit = GPIO_LED2; } else { return; } if (ledon) { gpio_outputhigh(LPC31_IOCONFIG_GPIO, bit); } else { gpio_outputlow(LPC31_IOCONFIG_GPIO, bit); } }
void board_led_on(int led) { switch (led) { case 0: gpio_outputlow(LPC31_IOCONFIG_GPIO, GPIO_LED1); gpio_outputlow(LPC31_IOCONFIG_GPIO, GPIO_LED2); break; case 1: gpio_outputlow(LPC31_IOCONFIG_GPIO, GPIO_LED1); gpio_outputhigh(LPC31_IOCONFIG_GPIO, GPIO_LED2); break; case 2: break; case 3: gpio_outputhigh(LPC31_IOCONFIG_GPIO, GPIO_LED1); break; } }
void up_ledoff(int led) { switch (led) { case 0: case 1: case 2: break; case 3: gpio_outputlow(LPC31_IOCONFIG_GPIO, GPIO_LED1); break; } }
void board_led_off(int led) { switch (led) { case 0: case 1: case 2: break; case 3: gpio_outputlow(FERNVALE_IOCONFIG_GPIO, GPIO_LED1); break; } }
void lpc31_usbhost_vbusdrive(int rhport, bool enable) { uinfo("RHPort%d: enable=%d\n", rhport+1, enable); /* The LPC3131 has only a single root hub port */ if (rhport == 0) { /* Then enable or disable VBUS power */ if (enable) { /* Enable the Power Switch by driving the enable pin low */ gpio_outputlow(LPC31_IOCONFIG_GPIO, GPIO_NOTG_PWR_E); } else { /* Disable the Power Switch by driving the enable pin high */ gpio_outputhigh(LPC31_IOCONFIG_GPIO, GPIO_NOTG_PWR_E); } } }