forked from Imagelibrary/rtems
2009-08-10 Joel Sherrill <joel.sherrill@oarcorp.com>
* console.c: Fix tabs and allow the BSP to override the default baud rate.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2009-08-10 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
|
* console.c: Fix tabs and allow the BSP to override the default baud
|
||||||
|
rate.
|
||||||
|
|
||||||
2009-07-22 Joel Sherrill <joel.sherrill@oarcorp.com>
|
2009-07-22 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
* src/irq-generic.c: Priority inheritance on simple binary semaphores
|
* src/irq-generic.c: Priority inheritance on simple binary semaphores
|
||||||
|
|||||||
@@ -82,26 +82,34 @@ rtems_device_driver console_open(
|
|||||||
status = rtems_termios_open ( major, minor, arg, &Callbacks );
|
status = rtems_termios_open ( major, minor, arg, &Callbacks );
|
||||||
Console_Port_Data[minor].termios_data = args->iop->data1;
|
Console_Port_Data[minor].termios_data = args->iop->data1;
|
||||||
|
|
||||||
/* Get tty pointeur from the Console_Port_Data */
|
/* Get tty pointur from the Console_Port_Data */
|
||||||
current_tty = Console_Port_Data[minor].termios_data;
|
current_tty = Console_Port_Data[minor].termios_data;
|
||||||
|
|
||||||
if ( (current_tty->refcount == 1) ) {
|
if ( (current_tty->refcount == 1) ) {
|
||||||
/*
|
|
||||||
* If it's the first open, modified, if need, the port parameters
|
/*
|
||||||
*/
|
* If this BSP has a preferred default rate, then use that.
|
||||||
if (minor!=Console_Port_Minor) {
|
*/
|
||||||
/*
|
#if defined(BSP_DEFAULT_BAUD_RATE)
|
||||||
* If this is not the console we do not want ECHO and
|
rtems_termios_set_initial_baud( current_tty, BSP_DEFAULT_BAUD_RATE );
|
||||||
* so forth
|
#endif
|
||||||
*/
|
|
||||||
IoctlArgs.iop=args->iop;
|
/*
|
||||||
IoctlArgs.command=RTEMS_IO_GET_ATTRIBUTES;
|
* If it's the first open, modified, if need, the port parameters
|
||||||
IoctlArgs.buffer=&Termios;
|
*/
|
||||||
rtems_termios_ioctl(&IoctlArgs);
|
if (minor!=Console_Port_Minor) {
|
||||||
Termios.c_lflag=ICANON;
|
/*
|
||||||
IoctlArgs.command=RTEMS_IO_SET_ATTRIBUTES;
|
* If this is not the console we do not want ECHO and
|
||||||
rtems_termios_ioctl(&IoctlArgs);
|
* so forth
|
||||||
}
|
*/
|
||||||
|
IoctlArgs.iop=args->iop;
|
||||||
|
IoctlArgs.command=RTEMS_IO_GET_ATTRIBUTES;
|
||||||
|
IoctlArgs.buffer=&Termios;
|
||||||
|
rtems_termios_ioctl(&IoctlArgs);
|
||||||
|
Termios.c_lflag=ICANON;
|
||||||
|
IoctlArgs.command=RTEMS_IO_SET_ATTRIBUTES;
|
||||||
|
rtems_termios_ioctl(&IoctlArgs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( (args->iop->flags&LIBIO_FLAGS_READ) &&
|
if ( (args->iop->flags&LIBIO_FLAGS_READ) &&
|
||||||
|
|||||||
Reference in New Issue
Block a user