diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-08-22 16:16:23 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-08-22 16:16:23 -0600 |
commit | 27ba735d1cf23ee914c0c33670c4be6f13ae8d94 (patch) | |
tree | 2d233d813253485b5dcbb553a1c7d514955ce640 | |
parent | b48799e786f21caa5a9fb24f2b4838d11e3a16be (diff) | |
download | nuttx-27ba735d1cf23ee914c0c33670c4be6f13ae8d94.tar.gz nuttx-27ba735d1cf23ee914c0c33670c4be6f13ae8d94.tar.bz2 nuttx-27ba735d1cf23ee914c0c33670c4be6f13ae8d94.zip |
Recent STM32 UART change: Wasn't that logic backward? Shouldn't that have been disable the USART if (1) we don't have than many USARTs OR (2) we don't have that particular USART -- not AND.
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32_serial.c | 6 | ||||
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32_uart.h | 16 |
2 files changed, 9 insertions, 13 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32_serial.c b/nuttx/arch/arm/src/stm32/stm32_serial.c index 097b2ec6e..b58b4f78e 100644 --- a/nuttx/arch/arm/src/stm32/stm32_serial.c +++ b/nuttx/arch/arm/src/stm32/stm32_serial.c @@ -986,11 +986,7 @@ static struct up_dev_s g_uart8priv = }; #endif -/* This table lets us iterate over the configured USARTs. - * - * REVISIT: The following logic is not valid for the STM32F401 which - * supports 3 USARTS: USART1, USART2, and USART6. - */ +/* This table lets us iterate over the configured USARTs */ static struct up_dev_s *uart_devs[STM32_NUSART] = { diff --git a/nuttx/arch/arm/src/stm32/stm32_uart.h b/nuttx/arch/arm/src/stm32/stm32_uart.h index ecfc00296..adbf9582f 100644 --- a/nuttx/arch/arm/src/stm32/stm32_uart.h +++ b/nuttx/arch/arm/src/stm32/stm32_uart.h @@ -61,26 +61,26 @@ /************************************************************************************ * Pre-processor Definitions ************************************************************************************/ -/* Make sure that we have not enabled more U[S]ARTs than are support by - * the device. +/* Make sure that we have not enabled more U[S]ARTs than are supported by the + * device. */ -#if STM32_NUSART < 8 && !defined(CONFIG_STM32_HAVE_USART8) +#if STM32_NUSART < 8 || !defined(CONFIG_STM32_HAVE_USART8) # undef CONFIG_STM32_UART8 #endif -#if STM32_NUSART < 7 && !defined(CONFIG_STM32_HAVE_USART7) +#if STM32_NUSART < 7 || !defined(CONFIG_STM32_HAVE_USART7) # undef CONFIG_STM32_UART7 #endif -#if STM32_NUSART < 6 && !defined(CONFIG_STM32_HAVE_USART6) +#if STM32_NUSART < 6 || !defined(CONFIG_STM32_HAVE_USART6) # undef CONFIG_STM32_USART6 #endif -#if STM32_NUSART < 5 && !defined(CONFIG_STM32_HAVE_USART5) +#if STM32_NUSART < 5 || !defined(CONFIG_STM32_HAVE_USART5) # undef CONFIG_STM32_UART5 #endif -#if STM32_NUSART < 4 && !defined(CONFIG_STM32_HAVE_USART4) +#if STM32_NUSART < 4 || !defined(CONFIG_STM32_HAVE_USART4) # undef CONFIG_STM32_UART4 #endif -#if STM32_NUSART < 3 && !defined(CONFIG_STM32_HAVE_USART3) +#if STM32_NUSART < 3 || !defined(CONFIG_STM32_HAVE_USART3) # undef CONFIG_STM32_USART3 #endif #if STM32_NUSART < 2 |