mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
2000-10-20 Rosimildo da Silva <rdasilva@connecttel.com>
* console/serial_mouse.c: Added support for changing serial parameters.
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2000-10-20 Rosimildo da Silva <rdasilva@connecttel.com>
|
||||
|
||||
* console/serial_mouse.c: Added support for changing serial parameters.
|
||||
|
||||
2000-10-20 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* include/wd80x3.h: Added file header and logic to prevent multiple
|
||||
|
||||
@@ -18,39 +18,6 @@
|
||||
* MODIFICATION/HISTORY:
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/08/30 08:15:30 joel
|
||||
* 2000-08-26 Rosimildo da Silva <rdasilva@connecttel.com>
|
||||
*
|
||||
* * Major rework of the "/dev/console" driver.
|
||||
* * Added termios support for stdin ( keyboard ).
|
||||
* * Added ioctls() to support modes similar to Linux( XLATE,
|
||||
* RAW, MEDIUMRAW ).
|
||||
* * Added Keyboard mapping and handling of the keyboard's leds.
|
||||
* * Added Micro FrameBuffer driver ( "/dev/fb0" ) for bare VGA
|
||||
* controller ( 16 colors ).
|
||||
* * Added PS/2 and Serial mouse support for PC386 BSP.
|
||||
* * console/defkeymap.c: New file.
|
||||
* * console/fb_vga.c: New file.
|
||||
* * console/fb_vga.h: New file.
|
||||
* * console/i386kbd.h: New file.
|
||||
* * console/kd.h: New file.
|
||||
* * console/keyboard.c: New file.
|
||||
* * console/keyboard.h: New file.
|
||||
* * console/mouse_parser.c: New file.
|
||||
* * console/mouse_parser.h: New file.
|
||||
* * console/pc_keyb.c: New file.
|
||||
* * console/ps2_drv.h: New file.
|
||||
* * console/ps2_mouse.c: New file.
|
||||
* * console/ps2_mouse.h: New file.
|
||||
* * console/serial_mouse.c: New file.
|
||||
* * console/serial_mouse.h: New file.
|
||||
* * console/vgainit.c: New file.
|
||||
* * console/vt.c: New file.
|
||||
* * console/Makefile.am: Reflect new files.
|
||||
* * console/console.c, console/inch.c, console/outch.c: Console
|
||||
* functionality modifications.
|
||||
* * startup/Makefile.am: Pick up tty_drv.c and gdb_glue.c
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -303,10 +270,12 @@ serial_mouse_control(rtems_device_major_number major,
|
||||
return serial_mouse_control_internal( BSP_UART_PORT, arg );
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int
|
||||
conSetAttr(int port, int minor, const struct termios *t)
|
||||
{
|
||||
int baud;
|
||||
unsigned long baud, databits, parity, stopbits;
|
||||
|
||||
switch (t->c_cflag & CBAUD)
|
||||
{
|
||||
@@ -362,14 +331,46 @@ conSetAttr(int port, int minor, const struct termios *t)
|
||||
baud = 115200;
|
||||
break;
|
||||
default:
|
||||
baud = 0;
|
||||
rtems_fatal_error_occurred (RTEMS_INTERNAL_ERROR);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (t->c_cflag & PARENB) {
|
||||
/* Parity is enabled */
|
||||
if (t->c_cflag & PARODD) {
|
||||
/* Parity is odd */
|
||||
parity = PEN;
|
||||
}
|
||||
else {
|
||||
/* Parity is even */
|
||||
parity = PEN | EPS;
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* No parity */
|
||||
parity = 0;
|
||||
}
|
||||
|
||||
switch (t->c_cflag & CSIZE) {
|
||||
case CS5: databits = CHR_5_BITS; break;
|
||||
case CS6: databits = CHR_6_BITS; break;
|
||||
case CS7: databits = CHR_7_BITS; break;
|
||||
case CS8: databits = CHR_8_BITS; break;
|
||||
}
|
||||
|
||||
if (t->c_cflag & CSTOPB) {
|
||||
/* 2 stop bits */
|
||||
stopbits = STB;
|
||||
}
|
||||
else {
|
||||
/* 1 stop bit */
|
||||
stopbits = 0;
|
||||
}
|
||||
printk("Mouse baud, port=%X, baud=%d\n", port, baud );
|
||||
BSP_uart_set_baud( port, baud );
|
||||
BSP_uart_set_attributes(port, baud, databits, parity, stopbits)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Handle ioctl request for ttyS2.
|
||||
|
||||
Reference in New Issue
Block a user