summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k/mcf5225x/console/console.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libbsp/m68k/mcf5225x/console/console.c')
-rw-r--r--c/src/lib/libbsp/m68k/mcf5225x/console/console.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/c/src/lib/libbsp/m68k/mcf5225x/console/console.c b/c/src/lib/libbsp/m68k/mcf5225x/console/console.c
index 63bb644682..9e36e3945a 100644
--- a/c/src/lib/libbsp/m68k/mcf5225x/console/console.c
+++ b/c/src/lib/libbsp/m68k/mcf5225x/console/console.c
@@ -150,7 +150,7 @@ IntUartSet(int minor, int baud, int databits, int parity, int stopbits,
Description : This provides the hardware-dependent portion of tcsetattr().
value and sets it. At the moment this just sets the baud rate.
- Note: The highest baudrate is 115200 as this stays within
+ Note: The highest baudrate is 115200 as this stays within
an error of +/- 5% at 25MHz processor clock
***************************************************************************/
static int IntUartSetAttributes(int minor, const struct termios *t)
@@ -166,7 +166,7 @@ static int IntUartSetAttributes(int minor, const struct termios *t)
/* check to see if input is valid */
if (t != (const struct termios *) 0) {
/* determine baud rate index */
- baud = rtems_termios_baud_to_number(t->c_cflag & CBAUD);
+ baud = rtems_termios_baud_to_number(t->c_ospeed);
/* determine data bits */
switch (t->c_cflag & CSIZE) {
@@ -243,7 +243,7 @@ static rtems_isr IntUartInterruptHandler(rtems_vector_number v)
else
MCF_GPIO_PORTTC |= MCF_GPIO_PORTTC_PORTTC0;
#endif
-
+
/* read data and put into the receive buffer */
while (MCF_UART_USR(chan) & MCF_UART_USR_RXRDY) {
@@ -359,9 +359,9 @@ static void IntUartInitialize(void)
/***************************************************************************
Function : IntUartInterruptWrite
- Description : This writes a single character to the appropriate uart
+ Description : This writes a single character to the appropriate uart
channel. This is either called during an interrupt or in the user's task
- to initiate a transmit sequence. Calling this routine enables Tx
+ to initiate a transmit sequence. Calling this routine enables Tx
interrupts.
***************************************************************************/
static ssize_t IntUartInterruptWrite(int minor, const char *buf, size_t len)
@@ -476,7 +476,7 @@ static int IntUartTaskRead(int minor)
/***************************************************************************
Function : IntUartPollRead
- Description : This reads a character from the internal uart. It returns
+ Description : This reads a character from the internal uart. It returns
to the caller without blocking if not character is waiting.
***************************************************************************/
static
@@ -491,8 +491,8 @@ int IntUartPollRead(int minor)
/***************************************************************************
Function : IntUartPollWrite
- Description : This writes out each character in the buffer to the
- appropriate internal uart channel waiting till each one is sucessfully
+ Description : This writes out each character in the buffer to the
+ appropriate internal uart channel waiting till each one is sucessfully
transmitted.
***************************************************************************/
static ssize_t IntUartPollWrite(int minor, const char *buf, size_t len)
@@ -562,7 +562,7 @@ rtems_device_driver console_initialize(rtems_device_major_number major,
/***************************************************************************
Function : console_open
- Description : This actually opens the device depending on the minor
+ Description : This actually opens the device depending on the minor
number set during initialisation. The device specific access routines are
passed to termios when the devices is opened depending on whether it is
polled or not.
@@ -631,8 +631,10 @@ rtems_device_driver console_open(rtems_device_major_number major,
struct termios term;
if (tcgetattr(STDIN_FILENO, &term) >= 0) {
- term.c_cflag &= ~(CBAUD | CSIZE);
- term.c_cflag |= CS8 | B115200;
+ term.c_cflag &= ~(CSIZE);
+ term.c_cflag |= CS8;
+ term.c_ispeed = B115200;
+ term.c_ospeed = B115200;
tcsetattr(STDIN_FILENO, TCSANOW, &term);
}
}