diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-08-10 19:33:16 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-08-10 19:33:16 -0600 |
commit | fee8b0cf208ee8973f062b8b258918d18a15a378 (patch) | |
tree | 9cc4d6377ab4b2cdaee7f58eb7405e67110c64f9 | |
parent | 070447aade04cb48a0ebfa8509c275c7f468df8a (diff) | |
download | nuttx-fee8b0cf208ee8973f062b8b258918d18a15a378.tar.gz nuttx-fee8b0cf208ee8973f062b8b258918d18a15a378.tar.bz2 nuttx-fee8b0cf208ee8973f062b8b258918d18a15a378.zip |
STM32: Fix STM32 serial init for non-reordered serial ports. From Lorenz Meier
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32_serial.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32_serial.c b/nuttx/arch/arm/src/stm32/stm32_serial.c index 037ad07db..3cbcd6a92 100644 --- a/nuttx/arch/arm/src/stm32/stm32_serial.c +++ b/nuttx/arch/arm/src/stm32/stm32_serial.c @@ -2441,10 +2441,17 @@ void up_serialinit(void) for (i = 0; i < STM32_NUSART; i++) { + /* Don't create a device for non-configured ports. */ + + if (uart_devs[i] == 0) + { + continue; + } + #ifndef CONFIG_SERIAL_DISABLE_REORDERING /* Don't create a device for the console - we did that above */ - if ((uart_devs[i] == 0) || (uart_devs[i]->dev.isconsole)) + if (uart_devs[i]->dev.isconsole) { continue; } |