diff options
author | Thomas Doerfler <Thomas.Doerfler@embedded-brains.de> | 2009-12-14 14:57:55 +0000 |
---|---|---|
committer | Thomas Doerfler <Thomas.Doerfler@embedded-brains.de> | 2009-12-14 14:57:55 +0000 |
commit | 5ea4e632dac1b002f9b155c4a2e0266ac4da8eee (patch) | |
tree | d1449d0880509511f1d041c4eefeab7c920b5de2 /c/src/lib/libbsp/m68k/genmcf548x/console/console.c | |
parent | emoved ppc_exc_bspsupp.h include file (diff) | |
download | rtems-5ea4e632dac1b002f9b155c4a2e0266ac4da8eee.tar.bz2 |
get vital data from dBUG monitor for COBRA5475 board
Diffstat (limited to 'c/src/lib/libbsp/m68k/genmcf548x/console/console.c')
-rw-r--r-- | c/src/lib/libbsp/m68k/genmcf548x/console/console.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/c/src/lib/libbsp/m68k/genmcf548x/console/console.c b/c/src/lib/libbsp/m68k/genmcf548x/console/console.c index 43b1a96a9f..1cb1a57f9f 100644 --- a/c/src/lib/libbsp/m68k/genmcf548x/console/console.c +++ b/c/src/lib/libbsp/m68k/genmcf548x/console/console.c @@ -291,7 +291,11 @@ static int IntUartSetAttributes(int minor, const struct termios *t) { /* set default index values */ +#ifdef HAS_DBUG + int baud = DBUG_SETTINGS.console_baudrate; +#else int baud = (int)BSP_CONSOLE_BAUD; +#endif int databits = (int)MCF548X_PSC_MR_BC_8; int parity = (int)MCF548X_PSC_MR_PM_NONE; int stopbits = (int)MCF548X_PSC_MR_SB_STOP_BITS_1; @@ -387,7 +391,7 @@ IntUartInterruptHandler(rtems_vector_number v) { /* put data in rx buffer */ - info->rx_buffer[info->rx_in] = *((uint8_t *)&MCF548X_PSC_RB(chan)); + info->rx_buffer[info->rx_in] = *((volatile uint8_t *)&MCF548X_PSC_RB(chan)); /* check for errors */ if ( MCF548X_PSC_SR(chan) & MCF548X_PSC_SR_ERROR ) @@ -529,7 +533,7 @@ IntUartInterruptWrite (int minor, const char *buf, int len) rtems_interrupt_disable(level); /* write out character */ - MCF548X_PSC_TB(minor) = *buf; + *(volatile uint8_t *)(&MCF548X_PSC_TB(minor)) = *buf; /* enable tx interrupt */ IntUartInfo[minor].imr |= MCF548X_PSC_IMR_TXRDY; |