From 9574b0f29b1f23f5670f85c91f618723755ff72d Mon Sep 17 00:00:00 2001 From: "Daniel P. Carvalho" Date: Fri, 3 Aug 2018 09:31:40 -0600 Subject: [PATCH] configs/nucleo-l432kc: Fix stm32_userleds and some comments. After change LD2 to LD3 in board.h stm32_userleds.c was broken. --- configs/nucleo-l432kc/include/board.h | 2 +- configs/nucleo-l432kc/src/stm32_autoleds.c | 2 +- configs/nucleo-l432kc/src/stm32_userleds.c | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/configs/nucleo-l432kc/include/board.h b/configs/nucleo-l432kc/include/board.h index 959cfd0c95..350ad6dc89 100644 --- a/configs/nucleo-l432kc/include/board.h +++ b/configs/nucleo-l432kc/include/board.h @@ -145,7 +145,7 @@ /* LEDs * - * The Nucleo l432kc board provides a single user LED, LD2. LD3 + * The Nucleo l432kc board provides a single user LED, LD3. LD3 * is the green LED connected to Arduino signal D13 corresponding to * MCU I/O PB3 (pin 26). * diff --git a/configs/nucleo-l432kc/src/stm32_autoleds.c b/configs/nucleo-l432kc/src/stm32_autoleds.c index d2dea2c035..bbe81d688f 100644 --- a/configs/nucleo-l432kc/src/stm32_autoleds.c +++ b/configs/nucleo-l432kc/src/stm32_autoleds.c @@ -64,7 +64,7 @@ void board_autoled_initialize(void) { - /* Configure LD2 GPIO for output */ + /* Configure LD3 GPIO for output */ stm32l4_configgpio(GPIO_LD3); } diff --git a/configs/nucleo-l432kc/src/stm32_userleds.c b/configs/nucleo-l432kc/src/stm32_userleds.c index 8dec7afee3..5cab80171f 100644 --- a/configs/nucleo-l432kc/src/stm32_userleds.c +++ b/configs/nucleo-l432kc/src/stm32_userleds.c @@ -170,9 +170,9 @@ static int led_pm_prepare(struct pm_callback_s *cb, int domain, void board_userled_initialize(void) { - /* Configure LD2 GPIO for output */ + /* Configure LD3 GPIO for output */ - stm32l4_configgpio(GPIO_LD2); + stm32l4_configgpio(GPIO_LD3); } /**************************************************************************** @@ -181,9 +181,9 @@ void board_userled_initialize(void) void board_userled(int led, bool ledon) { - if (led == BOARD_LD2) + if (led == BOARD_LD3) { - stm32l4_gpiowrite(GPIO_LD2, ledon); + stm32l4_gpiowrite(GPIO_LD3, ledon); } } @@ -193,7 +193,7 @@ void board_userled(int led, bool ledon) void board_userled_all(uint8_t ledset) { - stm32l4_gpiowrite(GPIO_LD2, (ledset & BOARD_LD2_BIT) != 0); + stm32l4_gpiowrite(GPIO_LD3, (ledset & BOARD_LD3_BIT) != 0); } /****************************************************************************