Serial driver needed even when no console; Fix user LED settings in all STM32 configurations

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5575 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2013-01-28 15:03:17 +00:00
parent 2e89b8a7f8
commit 6962e63f85
8 changed files with 28 additions and 28 deletions

View File

@ -123,10 +123,10 @@ void stm32_setled(int led, bool ledon)
void stm32_setleds(uint8_t ledset)
{
stm32_gpiowrite(BOARD_LED1, (ledset & BOARD_LED1_BIT) == 0);
stm32_gpiowrite(BOARD_LED2, (ledset & BOARD_LED2_BIT) == 0);
stm32_gpiowrite(BOARD_LED3, (ledset & BOARD_LED3_BIT) == 0);
stm32_gpiowrite(BOARD_LED4, (ledset & BOARD_LED4_BIT) == 0);
stm32_gpiowrite(GPIO_LED1, (ledset & BOARD_LED1_BIT) == 0);
stm32_gpiowrite(GPIO_LED2, (ledset & BOARD_LED2_BIT) == 0);
stm32_gpiowrite(GPIO_LED3, (ledset & BOARD_LED3_BIT) == 0);
stm32_gpiowrite(GPIO_LED4, (ledset & BOARD_LED4_BIT) == 0);
}
#endif /* !CONFIG_ARCH_LEDS */

View File

@ -131,9 +131,9 @@ void stm32_setled(int led, bool ledon)
void stm32_setleds(uint8_t ledset)
{
stm32_gpiowrite(BOARD_LED1, (ledset & BOARD_LED1_BIT) == 0);
stm32_gpiowrite(BOARD_LED2, (ledset & BOARD_LED2_BIT) == 0);
stm32_gpiowrite(BOARD_LED3, (ledset & BOARD_LED3_BIT) == 0);
stm32_gpiowrite(GPIO_LED1, (ledset & BOARD_LED1_BIT) == 0);
stm32_gpiowrite(GPIO_LED2, (ledset & BOARD_LED2_BIT) == 0);
stm32_gpiowrite(GPIO_LED3, (ledset & BOARD_LED3_BIT) == 0);
}
#endif /* !CONFIG_ARCH_LEDS */

View File

@ -140,8 +140,8 @@ void lpc43_ledinit(void)
void lpc43_setled(int led, bool ledon)
{
uint16_t gpiocfg = (led == BOARD_LED1 ? BOARD_LED1 : BOARD_LED2);
lpc43_gpio_write(GPIO_LED1, !ledon);
uint16_t gpiocfg = (led == BOARD_LED1 ? GPIO_LED1 : GPIO_LED2);
lpc43_gpio_write(gpiocfg, !ledon);
}
/****************************************************************************
@ -150,8 +150,8 @@ void lpc43_setled(int led, bool ledon)
void lpc43_setleds(uint8_t ledset)
{
lpc43_gpio_write(BOARD_LED1, (ledset & BOARD_LED1_BIT) == 0);
lpc43_gpio_write(BOARD_LED2, (ledset & BOARD_LED2_BIT) == 0);
lpc43_gpio_write(GPIO_LED1, (ledset & BOARD_LED1_BIT) == 0);
lpc43_gpio_write(GPIO_LED2, (ledset & BOARD_LED2_BIT) == 0);
}
#endif /* !CONFIG_ARCH_LEDS */

View File

@ -122,10 +122,10 @@ void stm32_setled(int led, bool ledon)
void stm32_setleds(uint8_t ledset)
{
stm32_gpiowrite(BOARD_LED1, (ledset & BOARD_LED1_BIT) == 0);
stm32_gpiowrite(BOARD_LED2, (ledset & BOARD_LED2_BIT) == 0);
stm32_gpiowrite(BOARD_LED3, (ledset & BOARD_LED3_BIT) == 0);
stm32_gpiowrite(BOARD_LED4, (ledset & BOARD_LED4_BIT) == 0);
stm32_gpiowrite(GPIO_LED1, (ledset & BOARD_LED1_BIT) == 0);
stm32_gpiowrite(GPIO_LED2, (ledset & BOARD_LED2_BIT) == 0);
stm32_gpiowrite(GPIO_LED3, (ledset & BOARD_LED3_BIT) == 0);
stm32_gpiowrite(GPIO_LED4, (ledset & BOARD_LED4_BIT) == 0);
}
#endif /* !CONFIG_ARCH_LEDS */

View File

@ -122,10 +122,10 @@ void stm32_setled(int led, bool ledon)
void stm32_setleds(uint8_t ledset)
{
stm32_gpiowrite(BOARD_LED1, (ledset & BOARD_LED1_BIT) == 0);
stm32_gpiowrite(BOARD_LED2, (ledset & BOARD_LED2_BIT) == 0);
stm32_gpiowrite(BOARD_LED3, (ledset & BOARD_LED3_BIT) == 0);
stm32_gpiowrite(BOARD_LED4, (ledset & BOARD_LED4_BIT) == 0);
stm32_gpiowrite(GPIO_LED1, (ledset & BOARD_LED1_BIT) == 0);
stm32_gpiowrite(GPIO_LED2, (ledset & BOARD_LED2_BIT) == 0);
stm32_gpiowrite(GPIO_LED3, (ledset & BOARD_LED3_BIT) == 0);
stm32_gpiowrite(GPIO_LED4, (ledset & BOARD_LED4_BIT) == 0);
}
#endif /* !CONFIG_ARCH_LEDS */

View File

@ -122,10 +122,10 @@ void stm32_setled(int led, bool ledon)
void stm32_setleds(uint8_t ledset)
{
stm32_gpiowrite(BOARD_LED1, (ledset & BOARD_LED1_BIT) == 0);
stm32_gpiowrite(BOARD_LED2, (ledset & BOARD_LED2_BIT) == 0);
stm32_gpiowrite(BOARD_LED3, (ledset & BOARD_LED3_BIT) == 0);
stm32_gpiowrite(BOARD_LED4, (ledset & BOARD_LED4_BIT) == 0);
stm32_gpiowrite(GPIO_LED1, (ledset & BOARD_LED1_BIT) == 0);
stm32_gpiowrite(GPIO_LED2, (ledset & BOARD_LED2_BIT) == 0);
stm32_gpiowrite(GPIO_LED3, (ledset & BOARD_LED3_BIT) == 0);
stm32_gpiowrite(GPIO_LED4, (ledset & BOARD_LED4_BIT) == 0);
}
#endif /* !CONFIG_ARCH_LEDS */

View File

@ -269,7 +269,7 @@ LEDs
====
The STM32F4Discovery board has four LEDs; green, organge, red and blue on the
board.. These LEDs are not used by the board port unless CONFIG_ARCH_LEDS is
board. These LEDs are not used by the board port unless CONFIG_ARCH_LEDS is
defined. In that case, the usage by the board port is defined in
include/board.h and src/up_leds.c. The LEDs are used to encode OS-related
events as follows:

View File

@ -222,10 +222,10 @@ void stm32_setled(int led, bool ledon)
void stm32_setleds(uint8_t ledset)
{
stm32_gpiowrite(BOARD_LED1, (ledset & BOARD_LED1_BIT) == 0);
stm32_gpiowrite(BOARD_LED2, (ledset & BOARD_LED2_BIT) == 0);
stm32_gpiowrite(BOARD_LED3, (ledset & BOARD_LED3_BIT) == 0);
stm32_gpiowrite(BOARD_LED4, (ledset & BOARD_LED4_BIT) == 0);
stm32_gpiowrite(GPIO_LED1, (ledset & BOARD_LED1_BIT) == 0);
stm32_gpiowrite(GPIO_LED2, (ledset & BOARD_LED2_BIT) == 0);
stm32_gpiowrite(GPIO_LED3, (ledset & BOARD_LED3_BIT) == 0);
stm32_gpiowrite(GPIO_LED4, (ledset & BOARD_LED4_BIT) == 0);
}
/****************************************************************************