Changeset 396555aa in rtems


Ignore:
Timestamp:
Oct 20, 2000, 4:01:13 PM (19 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
6bb5260
Parents:
772f224
Message:

2000-10-20 Rosimildo da Silva <rdasilva@…>

  • console/serial_mouse.c: Added support for changing serial parameters.
Location:
c/src/lib/libbsp/i386/pc386
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i386/pc386/ChangeLog

    r772f224 r396555aa  
     12000-10-20      Rosimildo da Silva <rdasilva@connecttel.com>
     2
     3        * console/serial_mouse.c: Added support for changing serial parameters.
     4
    152000-10-20      Joel Sherrill <joel@OARcorp.com>
    26
  • c/src/lib/libbsp/i386/pc386/console/serial_mouse.c

    r772f224 r396555aa  
    1919 *
    2020 * $Log$
    21  * Revision 1.1  2000/08/30 08:15:30  joel
    22  * 2000-08-26  Rosimildo da Silva  <rdasilva@connecttel.com>
    23  *
    24  *      * Major rework of the "/dev/console" driver.
    25  *      * Added termios support for stdin ( keyboard ).
    26  *      * Added ioctls() to support modes similar to Linux( XLATE,
    27  *      RAW, MEDIUMRAW ).
    28  *      * Added Keyboard mapping and handling of the keyboard's leds.
    29  *      * Added Micro FrameBuffer driver ( "/dev/fb0" ) for bare VGA
    30  *      controller ( 16 colors ).
    31  *      * Added PS/2 and Serial mouse support for PC386 BSP.
    32  *      * console/defkeymap.c: New file.
    33  *      * console/fb_vga.c: New file.
    34  *      * console/fb_vga.h: New file.
    35  *      * console/i386kbd.h: New file.
    36  *      * console/kd.h: New file.
    37  *      * console/keyboard.c: New file.
    38  *      * console/keyboard.h: New file.
    39  *      * console/mouse_parser.c: New file.
    40  *      * console/mouse_parser.h: New file.
    41  *      * console/pc_keyb.c: New file.
    42  *      * console/ps2_drv.h: New file.
    43  *      * console/ps2_mouse.c: New file.
    44  *      * console/ps2_mouse.h: New file.
    45  *      * console/serial_mouse.c: New file.
    46  *      * console/serial_mouse.h: New file.
    47  *      * console/vgainit.c: New file.
    48  *      * console/vt.c: New file.
    49  *      * console/Makefile.am: Reflect new files.
    50  *      * console/console.c, console/inch.c, console/outch.c: Console
    51  *      functionality modifications.
    52  *      * startup/Makefile.am: Pick up tty_drv.c and gdb_glue.c
    53  *
    5421 ****************************************************************************/
    5522
     
    304271}
    305272
     273
     274
    306275static int
    307276conSetAttr(int port, int minor, const struct termios *t)
    308277{
    309   int baud;
     278  unsigned long baud, databits, parity, stopbits;
    310279
    311280  switch (t->c_cflag & CBAUD)
     
    363332      break;
    364333    default:
    365       baud = 0;
    366334      rtems_fatal_error_occurred (RTEMS_INTERNAL_ERROR);
    367335      return 0;
    368336    }
     337
     338  if (t->c_cflag & PARENB) {
     339    /* Parity is enabled */
     340    if (t->c_cflag & PARODD) {
     341      /* Parity is odd */
     342      parity = PEN;
     343    }
     344    else {
     345      /* Parity is even */
     346      parity = PEN | EPS;
     347    }
     348  }
     349  else {
     350    /* No parity */
     351    parity = 0;
     352  }
     353 
     354  switch (t->c_cflag & CSIZE) {
     355    case CS5: databits = CHR_5_BITS; break;
     356    case CS6: databits = CHR_6_BITS; break;
     357    case CS7: databits = CHR_7_BITS; break;
     358    case CS8: databits = CHR_8_BITS; break;
     359   }
     360
     361  if (t->c_cflag & CSTOPB) {
     362    /* 2 stop bits */
     363    stopbits = STB;
     364  }
     365  else {
     366    /* 1 stop bit */
     367    stopbits = 0;
     368  }
    369369  printk("Mouse baud, port=%X, baud=%d\n", port, baud );
    370   BSP_uart_set_baud( port, baud );
     370  BSP_uart_set_attributes(port, baud, databits, parity, stopbits)
     371
    371372  return 0;
    372 }
     373
    373374
    374375/*
Note: See TracChangeset for help on using the changeset viewer.