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 53f30420e8
commit daf0e9bd92
5 changed files with 26 additions and 26 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;
}

View File

@ -158,27 +158,27 @@
* Joystick up -- Connected to PG.15
*/
#define BUTTON_WAKEUP 0
#define BUTTON_TAMPER 1
#define BUTTON_KEY 2
#define BUTTON_WAKEUP 0
#define BUTTON_TAMPER 1
#define BUTTON_KEY 2
#define JOYSTICK_SEL 3
#define JOYSTICK_DOWN 4
#define JOYSTICK_LEFT 5
#define JOYSTICK_RIGHT 6
#define JOYSTICK_UP 7
#define JOYSTICK_SEL 3
#define JOYSTICK_DOWN 4
#define JOYSTICK_LEFT 5
#define JOYSTICK_RIGHT 6
#define JOYSTICK_UP 7
#define NUM_BUTTONS 8
#define NUM_BUTTONS 8
#define BUTTON_WAKEUP_BIT (1 << BUTTON_WAKEUP)
#define BUTTON_TAMPER_BIT (1 << BUTTON_TAMPER)
#define BUTTON_KEY_BIT (1 << BUTTON_KEY)
#define BUTTON_WAKEUP_BIT (1 << BUTTON_WAKEUP)
#define BUTTON_TAMPER_BIT (1 << BUTTON_TAMPER)
#define BUTTON_KEY_BIT (1 << BUTTON_KEY)
#define JOYSTICK_SEL_BIT (1 << JOYSTICK_SEL)
#define JOYSTICK_DOWN_BIT (1 << JOYSTICK_DOWN)
#define JOYSTICK_LEFT_BIT (1 << JOYSTICK_LEFT)
#define JOYSTICK_RIGH_BIT (1 << JOYSTICK_RIGHT)
#define JOYSTICK_UP_BIT (1 << JOYSTICK_UP)
#define JOYSTICK_SEL_BIT (1 << JOYSTICK_SEL)
#define JOYSTICK_DOWN_BIT (1 << JOYSTICK_DOWN)
#define JOYSTICK_LEFT_BIT (1 << JOYSTICK_LEFT)
#define JOYSTICK_RIGHT_BIT (1 << JOYSTICK_RIGHT)
#define JOYSTICK_UP_BIT (1 << JOYSTICK_UP)
/************************************************************************************
* Public Data