diff options
Diffstat (limited to 'nuttx/configs/stm32ldiscovery')
-rw-r--r-- | nuttx/configs/stm32ldiscovery/README.txt | 4 | ||||
-rw-r--r-- | nuttx/configs/stm32ldiscovery/include/board.h | 18 | ||||
-rw-r--r-- | nuttx/configs/stm32ldiscovery/src/stm32_autoleds.c | 9 |
3 files changed, 17 insertions, 14 deletions
diff --git a/nuttx/configs/stm32ldiscovery/README.txt b/nuttx/configs/stm32ldiscovery/README.txt index 860e220b1..55d95dfb7 100644 --- a/nuttx/configs/stm32ldiscovery/README.txt +++ b/nuttx/configs/stm32ldiscovery/README.txt @@ -15,8 +15,8 @@ Both boards feature: - LCD (24 segments, 4 commons), - LEDs, - Pushbuttons, - - A linear touch sensor, and - - four touchkeys. + - A linear touch sensor, and + - Four touchkeys. Contents ======== diff --git a/nuttx/configs/stm32ldiscovery/include/board.h b/nuttx/configs/stm32ldiscovery/include/board.h index 83edb182c..23132c38b 100644 --- a/nuttx/configs/stm32ldiscovery/include/board.h +++ b/nuttx/configs/stm32ldiscovery/include/board.h @@ -195,7 +195,7 @@ * STM32L-Discovery. The following definitions describe how NuttX controls the LEDs: * * SYMBOL Meaning LED state - * LED3 LED4 + * LED1 LED2 * ------------------- ----------------------- -------- -------- * LED_STARTED NuttX has been started OFF OFF * LED_HEAPALLOCATE Heap has been allocated OFF OFF @@ -253,25 +253,25 @@ #if !defined(CONFIG_STM32_LCD) /* Select PA9 and PA10 if the LCD is not enabled */ -# define GPIO_USART1_RX GPIO_USART1_RX_1 -# define GPIO_USART1_TX GPIO_USART1_TX_1 +# define GPIO_USART1_RX GPIO_USART1_RX_1 /* PA10 */ +# define GPIO_USART1_TX GPIO_USART1_TX_1 /* PA9 */ /* This there are no other options for USART1 on this part */ -# define GPIO_USART2_RX GPIO_USART2_RX_1 -# define GPIO_USART2_TX GPIO_USART2_TX_1 +# define GPIO_USART2_RX GPIO_USART2_RX_1 /* PA3 */ +# define GPIO_USART2_TX GPIO_USART2_TX_1 /* PA2 */ /* Arbirtrarily select PB10 and PB11 */ -# define GPIO_USART3_RX GPIO_USART3_RX_1 -# define GPIO_USART3_TX GPIO_USART3_TX_1 +# define GPIO_USART3_RX GPIO_USART3_RX_1 /* PB11 */ +# define GPIO_USART3_TX GPIO_USART3_TX_1 /* PB10 */ #elif !defined(CONFIG_ARCH_LEDS) /* Select PB6 and PB7 if the LEDs are not enabled */ -# define GPIO_USART1_RX GPIO_USART1_RX_2 -# define GPIO_USART1_TX GPIO_USART1_TX_2 +# define GPIO_USART1_RX GPIO_USART1_RX_2 /* PB7 */ +# define GPIO_USART1_TX GPIO_USART1_TX_2 /* PB6 */ #endif diff --git a/nuttx/configs/stm32ldiscovery/src/stm32_autoleds.c b/nuttx/configs/stm32ldiscovery/src/stm32_autoleds.c index 5a113eabc..b03a61266 100644 --- a/nuttx/configs/stm32ldiscovery/src/stm32_autoleds.c +++ b/nuttx/configs/stm32ldiscovery/src/stm32_autoleds.c @@ -60,7 +60,7 @@ * controls the LEDs: * * SYMBOL Meaning LED state - * LED3 LED4 + * LED1 LED2 * ------------------- ----------------------- -------- -------- * LED_STARTED NuttX has been started OFF OFF * LED_HEAPALLOCATE Heap has been allocated OFF OFF @@ -146,8 +146,11 @@ void up_ledon(int led) void up_ledoff(int led) { - stm32_gpiowrite(GPIO_LED1, false); - stm32_gpiowrite(GPIO_LED2, false); + if (led != 2) + { + stm32_gpiowrite(GPIO_LED1, false); + stm32_gpiowrite(GPIO_LED2, false); + } } #endif /* CONFIG_ARCH_LEDS */ |