diff --git a/configs/cloudctrl/src/up_userleds.c b/configs/cloudctrl/src/up_userleds.c index 5c112123b8..bbb7cc62c4 100644 --- a/configs/cloudctrl/src/up_userleds.c +++ b/configs/cloudctrl/src/up_userleds.c @@ -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 */ diff --git a/configs/fire-stm32v2/src/up_userleds.c b/configs/fire-stm32v2/src/up_userleds.c index da43d03adc..3dd1843ee9 100644 --- a/configs/fire-stm32v2/src/up_userleds.c +++ b/configs/fire-stm32v2/src/up_userleds.c @@ -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 */ diff --git a/configs/lpc4330-xplorer/src/up_userleds.c b/configs/lpc4330-xplorer/src/up_userleds.c index e7b4b11894..2d8b5b5115 100644 --- a/configs/lpc4330-xplorer/src/up_userleds.c +++ b/configs/lpc4330-xplorer/src/up_userleds.c @@ -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 */ diff --git a/configs/shenzhou/src/up_userleds.c b/configs/shenzhou/src/up_userleds.c index 0ba0292283..4e1493a8da 100644 --- a/configs/shenzhou/src/up_userleds.c +++ b/configs/shenzhou/src/up_userleds.c @@ -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 */ diff --git a/configs/stm3220g-eval/src/up_userleds.c b/configs/stm3220g-eval/src/up_userleds.c index 6dc3db135e..84510c7037 100644 --- a/configs/stm3220g-eval/src/up_userleds.c +++ b/configs/stm3220g-eval/src/up_userleds.c @@ -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 */ diff --git a/configs/stm3240g-eval/src/up_userleds.c b/configs/stm3240g-eval/src/up_userleds.c index 59be38561c..01c4b36d6c 100644 --- a/configs/stm3240g-eval/src/up_userleds.c +++ b/configs/stm3240g-eval/src/up_userleds.c @@ -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 */ diff --git a/configs/stm32f4discovery/README.txt b/configs/stm32f4discovery/README.txt index e34168224e..e9c0e81c23 100644 --- a/configs/stm32f4discovery/README.txt +++ b/configs/stm32f4discovery/README.txt @@ -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: diff --git a/configs/stm32f4discovery/src/up_userleds.c b/configs/stm32f4discovery/src/up_userleds.c index 90adb48823..173c126968 100644 --- a/configs/stm32f4discovery/src/up_userleds.c +++ b/configs/stm32f4discovery/src/up_userleds.c @@ -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); } /****************************************************************************