Fix Kinetics UART watermark setting

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3894 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2011-08-19 04:12:33 +00:00
parent 17ce79ee25
commit d4fd560ea0
4 changed files with 9 additions and 9 deletions

View File

@ -75,7 +75,7 @@
/* External interrupts (vectors >= 16) */
#define KINETIS_IRQ_EXTINT (16)
#define KINETIS_IRQ_EXTINT (16)
/* K40 Family ***********************************************************************
*

View File

@ -88,7 +88,7 @@ uint32_t *up_doirq(int irq, uint32_t *regs)
* current_regs is also used to manage interrupt level context switches.
*/
savestate = (uint32_t*)current_regs;
savestate = (uint32_t*)current_regs;
current_regs = regs;
/* Mask and acknowledge the interrupt */

View File

@ -424,10 +424,10 @@ void kinetis_uartconfigure(uintptr_t uart_base, uint32_t baud,
putreg8(UART_PFIFO_RXFE | UART_PFIFO_TXFE, uart_base+KINETIS_UART_PFIFO_OFFSET);
#else
/* Set the watermarks to zero and disable the FIFOs */
/* Set the watermarks to one and disable the FIFOs */
putreg8(0, uart_base+KINETIS_UART_RWFIFO_OFFSET);
putreg8(0, uart_base+KINETIS_UART_TWFIFO_OFFSET);
putreg8(1, uart_base+KINETIS_UART_RWFIFO_OFFSET);
putreg8(1, uart_base+KINETIS_UART_TWFIFO_OFFSET);
putreg8(0, uart_base+KINETIS_UART_PFIFO_OFFSET);
#endif

View File

@ -682,7 +682,7 @@ static int up_attach(struct uart_dev_s *dev)
}
#endif
if (ret == 0)
if (ret == OK)
{
#ifdef CONFIG_DEBUG
up_enable_irq(priv->irqe);
@ -1300,9 +1300,9 @@ int up_putc(int ch)
{
#ifdef HAVE_SERIAL_CONSOLE
struct up_dev_s *priv = (struct up_dev_s*)CONSOLE_DEV.priv;
uint8_t imr;
uint8_t ie;
up_disableuartint(priv, &imr);
up_disableuartint(priv, &ie);
/* Check for LF */
@ -1314,7 +1314,7 @@ int up_putc(int ch)
}
up_lowputc(ch);
up_restoreuartint(priv, imr);
up_restoreuartint(priv, ie);
#endif
return ch;
}