diff options
Diffstat (limited to 'nuttx')
-rw-r--r-- | nuttx/arch/arm/src/lm3s/Make.defs | 2 | ||||
-rw-r--r-- | nuttx/arch/arm/src/lm3s/lm3s_lowputc.c | 6 | ||||
-rw-r--r-- | nuttx/arch/arm/src/str71x/str71x_lowputc.c | 3 | ||||
-rw-r--r-- | nuttx/arch/arm/src/str71x/str71x_serial.c | 6 |
4 files changed, 10 insertions, 7 deletions
diff --git a/nuttx/arch/arm/src/lm3s/Make.defs b/nuttx/arch/arm/src/lm3s/Make.defs index 28615cd8c..525e052db 100644 --- a/nuttx/arch/arm/src/lm3s/Make.defs +++ b/nuttx/arch/arm/src/lm3s/Make.defs @@ -46,7 +46,7 @@ CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copystate.c \ up_undefinedinsn.c up_usestack.c CHIP_ASRCS = -CHIP_CSRCS = lm3s_start.c lm3s_syscontrol.c lm3s_irq.c lm3s_lowputc.c +CHIP_CSRCS = lm3s_start.c lm3s_syscontrol.c lm3s_irq.c lm3s_lowputc.c lm3s_serial.c ifdef CONFIG_NET CHIP_CSRCS += lm3s_ethernet.c diff --git a/nuttx/arch/arm/src/lm3s/lm3s_lowputc.c b/nuttx/arch/arm/src/lm3s/lm3s_lowputc.c index 974488600..684f98846 100644 --- a/nuttx/arch/arm/src/lm3s/lm3s_lowputc.c +++ b/nuttx/arch/arm/src/lm3s/lm3s_lowputc.c @@ -115,7 +115,7 @@ #define UART_LCRH_VALUE (UART_LCRH_NBITS|UART_LCRH_PARITY|UART_LCRH_NSTOP|UART_LCRH_FEN) -/* Calculate BAUD rate from PCLK1: +/* Calculate BAUD rate from the SYS clock: * * "The baud-rate divisor is a 22-bit number consisting of a 16-bit integer and a 6-bit * fractional part. The number formed by these two values is used by the baud-rate generator @@ -220,7 +220,7 @@ void up_lowputc(char ch) void up_lowsetup(void) { uint32 rcgc1; -#ifdef HAVE_CONSOLE +#if defined(HAVE_CONSOLE) && !defined(CONFIG_SUPPRESS_UART_CONFIG) uint32 ctl; /* Enable the selected console device */ @@ -244,7 +244,7 @@ void up_lowsetup(void) /* 5. Enable the UART by setting the UARTEN bit in the UART CTL register */ - ctl |= UART_CTL_UARTEN; + ctl |= (UART_CTL_UARTEN|UART_CTL_TXE|UART_CTL_RXE); putreg32(ctl, LM3S_CONSOLE_BASE+LM3S_UART_CTL_OFFSET); #endif diff --git a/nuttx/arch/arm/src/str71x/str71x_lowputc.c b/nuttx/arch/arm/src/str71x/str71x_lowputc.c index d2dbc5747..aa8218204 100644 --- a/nuttx/arch/arm/src/str71x/str71x_lowputc.c +++ b/nuttx/arch/arm/src/str71x/str71x_lowputc.c @@ -271,7 +271,8 @@ void up_lowputc(char ch) void up_lowsetup(void) { -#ifdef HAVE_CONSOLE +#if defined(HAVE_CONSOLE) && !defined(CONFIG_SUPPRESS_UART_CONFIG) + uint16 reg16; /* Enable the selected console device */ diff --git a/nuttx/arch/arm/src/str71x/str71x_serial.c b/nuttx/arch/arm/src/str71x/str71x_serial.c index 9ee2d7434..88203d37b 100644 --- a/nuttx/arch/arm/src/str71x/str71x_serial.c +++ b/nuttx/arch/arm/src/str71x/str71x_serial.c @@ -458,7 +458,7 @@ static inline void up_waittxnotfull(struct up_dev_s *priv) static int up_setup(struct uart_dev_s *dev) { -#ifndef CONFIG_SUPPRESS_STR71X_UART_CONFIG +#ifndef CONFIG_SUPPRESS_UART_CONFIG struct up_dev_s *priv = (struct up_dev_s*)dev->priv; uint32 divisor; uint32 baud; @@ -668,6 +668,7 @@ static int up_interrupt(int irq, void *context) /* Rx buffer not empty ... process incoming bytes */ uart_recvchars(dev); + handled = TRUE; } /* Handle outgoing, transmit bytes */ @@ -677,6 +678,7 @@ static int up_interrupt(int irq, void *context) /* Tx FIFO not full ... process outgoing bytes */ uart_xmitchars(dev); + handled = TRUE; } } return OK; @@ -756,7 +758,7 @@ static void up_rxint(struct uart_dev_s *dev, boolean enable) struct up_dev_s *priv = (struct up_dev_s*)dev->priv; if (enable) { - /* Receive an interrupt when the Rx FIFO is half full (or and IDLE + /* Receive an interrupt when the Rx FIFO is half full (or an IDLE * timeout occurs. */ |