changeset 3149:3d06557fc66c

* src/stm32_serial.h: Revert unnecessary change in previous commit, reinstating previous code. * src/stm32_serial.c (stm32_serial_config_port): Ditto.
author jlarmour
date Mon, 02 Apr 2012 15:04:55 +0000
parents d5c8fd9bf282
children 328e85803252
files packages/devs/serial/cortexm/stm32/current/ChangeLog packages/devs/serial/cortexm/stm32/current/src/stm32_serial.c packages/devs/serial/cortexm/stm32/current/src/stm32_serial.h
diffstat 3 files changed, 8 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/packages/devs/serial/cortexm/stm32/current/ChangeLog
+++ b/packages/devs/serial/cortexm/stm32/current/ChangeLog
@@ -1,3 +1,9 @@
+2012-04-02  Jonathan Larmour  <jifl@eCosCentric.com>
+
+	* src/stm32_serial.h: Revert unnecessary change in previous
+	commit, reinstating previous code.
+	* src/stm32_serial.c (stm32_serial_config_port): Ditto.
+
 2011-12-15  Jonathan Larmour  <jifl@eCosCentric.com>
 
 	* cdl/ser_cortexm_stm32.cdl: Default baud rates to the HAL
--- a/packages/devs/serial/cortexm/stm32/current/src/stm32_serial.c
+++ b/packages/devs/serial/cortexm/stm32/current/src/stm32_serial.c
@@ -8,7 +8,7 @@
 // ####ECOSGPLCOPYRIGHTBEGIN####                                            
 // -------------------------------------------                              
 // This file is part of eCos, the Embedded Configurable Operating System.   
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+// Copyright (C) 1998-2002, 2004-2006, 2008-2012 Free Software Foundation, Inc.
 //
 // eCos is free software; you can redistribute it and/or modify it under    
 // the terms of the GNU General Public License as published by the Free     
@@ -507,7 +507,7 @@ stm32_serial_config_port(serial_channel 
     cyg_uint32 parity = select_parity[new_config->parity];
     cyg_uint32 word_length = ((new_config->word_length == CYGNUM_SERIAL_WORD_LENGTH_8) &&
         (new_config->parity != CYGNUM_SERIAL_PARITY_NONE)) ?
-        CYGHWR_HAL_STM32_UART_CR1_M_9 : select_word_length[new_config->word_length-CYGNUM_SERIAL_WORD_LENGTH_5];
+        CYGHWR_HAL_STM32_UART_CR1_M_9 : CYGHWR_HAL_STM32_UART_CR1_M_8;
     cyg_uint32 stop_bits = select_stop_bits[new_config->stop];
     cyg_uint32 cr1 = 0;
     cyg_uint32 cr2 = 0;
--- a/packages/devs/serial/cortexm/stm32/current/src/stm32_serial.h
+++ b/packages/devs/serial/cortexm/stm32/current/src/stm32_serial.h
@@ -54,16 +54,6 @@
 #include <cyg/hal/hal_io.h>  // Register definitions
 
 // ====================================================================
-// Translate system word length selector into local values.
-
-static cyg_uint32 select_word_length[] = {
-    0,
-    0,
-    0,
-    CYGHWR_HAL_STM32_UART_CR1_M_8
-};
-
-// ====================================================================
 // Translate system stop bit selector into control register bits.
 
 static cyg_uint32 select_stop_bits[] = {