forked from Imagelibrary/rtems
2008-05-23 Joel Sherrill <joel.sherrill@OARcorp.com>
* console/console.c, console/serial_mouse.c: Eliminate copies of switches to convert termios Bxxx constants to xxx as an integer. Use the shared termios_baud_to_number() routine to do the same conversion.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2008-05-23 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* console/console.c, console/serial_mouse.c: Eliminate copies of
|
||||
switches to convert termios Bxxx constants to xxx as an integer. Use
|
||||
the shared termios_baud_to_number() routine to do the same
|
||||
conversion.
|
||||
|
||||
2008-05-15 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* startup/bspstart.c: Add capability for bootcard.c BSP Initialization
|
||||
|
||||
@@ -427,63 +427,9 @@ conSetAttr(int minor, const struct termios *t)
|
||||
{
|
||||
unsigned long baud, databits, parity, stopbits;
|
||||
|
||||
switch (t->c_cflag & CBAUD)
|
||||
{
|
||||
case B50:
|
||||
baud = 50;
|
||||
break;
|
||||
case B75:
|
||||
baud = 75;
|
||||
break;
|
||||
case B110:
|
||||
baud = 110;
|
||||
break;
|
||||
case B134:
|
||||
baud = 134;
|
||||
break;
|
||||
case B150:
|
||||
baud = 150;
|
||||
break;
|
||||
case B200:
|
||||
baud = 200;
|
||||
break;
|
||||
case B300:
|
||||
baud = 300;
|
||||
break;
|
||||
case B600:
|
||||
baud = 600;
|
||||
break;
|
||||
case B1200:
|
||||
baud = 1200;
|
||||
break;
|
||||
case B1800:
|
||||
baud = 1800;
|
||||
break;
|
||||
case B2400:
|
||||
baud = 2400;
|
||||
break;
|
||||
case B4800:
|
||||
baud = 4800;
|
||||
break;
|
||||
case B9600:
|
||||
baud = 9600;
|
||||
break;
|
||||
case B19200:
|
||||
baud = 19200;
|
||||
break;
|
||||
case B38400:
|
||||
baud = 38400;
|
||||
break;
|
||||
case B57600:
|
||||
baud = 57600;
|
||||
break;
|
||||
case B115200:
|
||||
baud = 115200;
|
||||
break;
|
||||
default:
|
||||
baud = termios_baud_to_number(t->c_cflag & CBAUD);
|
||||
if ( baud > 115200 )
|
||||
rtems_fatal_error_occurred (RTEMS_INTERNAL_ERROR);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (t->c_cflag & PARENB) {
|
||||
/* Parity is enabled */
|
||||
|
||||
@@ -263,63 +263,9 @@ conSetAttr(int port, int minor, const struct termios *t)
|
||||
{
|
||||
unsigned long baud, databits, parity, stopbits;
|
||||
|
||||
switch (t->c_cflag & CBAUD)
|
||||
{
|
||||
case B50:
|
||||
baud = 50;
|
||||
break;
|
||||
case B75:
|
||||
baud = 75;
|
||||
break;
|
||||
case B110:
|
||||
baud = 110;
|
||||
break;
|
||||
case B134:
|
||||
baud = 134;
|
||||
break;
|
||||
case B150:
|
||||
baud = 150;
|
||||
break;
|
||||
case B200:
|
||||
baud = 200;
|
||||
break;
|
||||
case B300:
|
||||
baud = 300;
|
||||
break;
|
||||
case B600:
|
||||
baud = 600;
|
||||
break;
|
||||
case B1200:
|
||||
baud = 1200;
|
||||
break;
|
||||
case B1800:
|
||||
baud = 1800;
|
||||
break;
|
||||
case B2400:
|
||||
baud = 2400;
|
||||
break;
|
||||
case B4800:
|
||||
baud = 4800;
|
||||
break;
|
||||
case B9600:
|
||||
baud = 9600;
|
||||
break;
|
||||
case B19200:
|
||||
baud = 19200;
|
||||
break;
|
||||
case B38400:
|
||||
baud = 38400;
|
||||
break;
|
||||
case B57600:
|
||||
baud = 57600;
|
||||
break;
|
||||
case B115200:
|
||||
baud = 115200;
|
||||
break;
|
||||
default:
|
||||
baud = termios_baud_to_number(t->c_cflag & CBAUD);
|
||||
if ( baud > 115200 )
|
||||
rtems_fatal_error_occurred (RTEMS_INTERNAL_ERROR);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (t->c_cflag & PARENB) {
|
||||
/* Parity is enabled */
|
||||
|
||||
Reference in New Issue
Block a user