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.

This commit is contained in:
Gregory Nutt
2014-08-22 16:16:23 -06:00
parent f58ba70547
commit 52b3735310
2 changed files with 9 additions and 13 deletions
+1 -5
View File
@@ -986,11 +986,7 @@ static struct up_dev_s g_uart8priv =
}; };
#endif #endif
/* This table lets us iterate over the configured USARTs. /* 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.
*/
static struct up_dev_s *uart_devs[STM32_NUSART] = static struct up_dev_s *uart_devs[STM32_NUSART] =
{ {
+8 -8
View File
@@ -61,26 +61,26 @@
/************************************************************************************ /************************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
************************************************************************************/ ************************************************************************************/
/* Make sure that we have not enabled more U[S]ARTs than are support by /* Make sure that we have not enabled more U[S]ARTs than are supported by the
* the device. * device.
*/ */
#if STM32_NUSART < 8 && !defined(CONFIG_STM32_HAVE_USART8) #if STM32_NUSART < 8 || !defined(CONFIG_STM32_HAVE_USART8)
# undef CONFIG_STM32_UART8 # undef CONFIG_STM32_UART8
#endif #endif
#if STM32_NUSART < 7 && !defined(CONFIG_STM32_HAVE_USART7) #if STM32_NUSART < 7 || !defined(CONFIG_STM32_HAVE_USART7)
# undef CONFIG_STM32_UART7 # undef CONFIG_STM32_UART7
#endif #endif
#if STM32_NUSART < 6 && !defined(CONFIG_STM32_HAVE_USART6) #if STM32_NUSART < 6 || !defined(CONFIG_STM32_HAVE_USART6)
# undef CONFIG_STM32_USART6 # undef CONFIG_STM32_USART6
#endif #endif
#if STM32_NUSART < 5 && !defined(CONFIG_STM32_HAVE_USART5) #if STM32_NUSART < 5 || !defined(CONFIG_STM32_HAVE_USART5)
# undef CONFIG_STM32_UART5 # undef CONFIG_STM32_UART5
#endif #endif
#if STM32_NUSART < 4 && !defined(CONFIG_STM32_HAVE_USART4) #if STM32_NUSART < 4 || !defined(CONFIG_STM32_HAVE_USART4)
# undef CONFIG_STM32_UART4 # undef CONFIG_STM32_UART4
#endif #endif
#if STM32_NUSART < 3 && !defined(CONFIG_STM32_HAVE_USART3) #if STM32_NUSART < 3 || !defined(CONFIG_STM32_HAVE_USART3)
# undef CONFIG_STM32_USART3 # undef CONFIG_STM32_USART3
#endif #endif
#if STM32_NUSART < 2 #if STM32_NUSART < 2