Correct several errors in STM32 serial port configuration

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3744 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2011-07-04 22:38:45 +00:00
parent c4ce380602
commit 1c88fc4766
2 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -162,9 +162,9 @@
#define STM32_USARTDIV32 (STM32_APBCLOCK / (STM32_CONSOLE_BAUD >> 1))
/* The mantissa is then usartdiv32 * 32:
/* The mantissa is then usartdiv32 / 32:
*
* mantissa = 32 * usartdiv32
* mantissa = usartdiv32 / 32/
*
* Eg. usartdiv32=1250, mantissa = 39
*/
@@ -247,7 +247,7 @@ void stm32_lowsetup(void)
uint32_t cr;
#endif
/* Enable the selected USARTs and configure GPIO pins need byed the
/* Enable the selected USARTs and configure GPIO pins need by the
* the selected USARTs. NOTE: The serial driver later depends on
* this pin configuration -- whether or not a serial console is selected.
*
+4 -4
View File
@@ -425,8 +425,8 @@ static inline void up_disableusartint(struct up_dev_s *priv, uint16_t *ie)
static int up_setup(struct uart_dev_s *dev)
{
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
#ifdef CONFIG_SUPPRESS_UART_CONFIG
uint32_t uartdiv32;
#ifndef CONFIG_SUPPRESS_UART_CONFIG
uint32_t usartdiv32;
uint32_t mantissa;
uint32_t fraction;
uint32_t brr;
@@ -483,7 +483,7 @@ static int up_setup(struct uart_dev_s *dev)
/* Configure hardware flow control -- Not yet supported */
up_serialout(priv, STM32_USART_CR1_OFFSET, regval);
up_serialout(priv, STM32_USART_CR3_OFFSET, regval);
/* Configure the USART Baud Rate. The baud rate for the receiver and
* transmitter (Rx and Tx) are both set to the same value as programmed
@@ -521,7 +521,7 @@ static int up_setup(struct uart_dev_s *dev)
up_serialout(priv, STM32_USART_CR1_OFFSET, regval);
#endif
/* Set up the cache interrupt enables value */
/* Set up the cached interrupt enables value */
priv->ie = 0;
return OK;