Changeset e9bb4fb in rtems


Ignore:
Timestamp:
Aug 10, 2009, 2:54:52 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
c0e8da4
Parents:
fa342bc7
Message:

2009-08-10 Joel Sherrill <joel.sherrill@…>

  • console.c: Fix tabs and allow the BSP to override the default baud rate.
Location:
c/src/lib/libbsp/shared
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/shared/ChangeLog

    rfa342bc7 re9bb4fb  
     12009-08-10      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * console.c: Fix tabs and allow the BSP to override the default baud
     4        rate.
     5
    162009-07-22      Joel Sherrill <joel.sherrill@oarcorp.com>
    27
  • c/src/lib/libbsp/shared/console.c

    rfa342bc7 re9bb4fb  
    8383  Console_Port_Data[minor].termios_data = args->iop->data1;
    8484
    85   /* Get tty pointeur from the Console_Port_Data */
     85  /* Get tty pointur from the Console_Port_Data */
    8686  current_tty = Console_Port_Data[minor].termios_data;
    8787
    8888  if ( (current_tty->refcount == 1) ) {
    89   /*
    90    * If it's the first open, modified, if need, the port parameters
    91    */
    92         if (minor!=Console_Port_Minor) {
    93                 /*
    94                  * If this is not the console we do not want ECHO and
    95                  * so forth
    96                  */
    97                 IoctlArgs.iop=args->iop;
    98                 IoctlArgs.command=RTEMS_IO_GET_ATTRIBUTES;
    99                 IoctlArgs.buffer=&Termios;
    100                 rtems_termios_ioctl(&IoctlArgs);
    101                 Termios.c_lflag=ICANON;
    102                 IoctlArgs.command=RTEMS_IO_SET_ATTRIBUTES;
    103                 rtems_termios_ioctl(&IoctlArgs);
    104         }
     89
     90    /*
     91     *  If this BSP has a preferred default rate, then use that.
     92     */
     93    #if defined(BSP_DEFAULT_BAUD_RATE)
     94      rtems_termios_set_initial_baud( current_tty, BSP_DEFAULT_BAUD_RATE );
     95    #endif
     96
     97    /*
     98     * If it's the first open, modified, if need, the port parameters
     99     */
     100    if (minor!=Console_Port_Minor) {
     101      /*
     102       * If this is not the console we do not want ECHO and
     103       * so forth
     104       */
     105      IoctlArgs.iop=args->iop;
     106      IoctlArgs.command=RTEMS_IO_GET_ATTRIBUTES;
     107      IoctlArgs.buffer=&Termios;
     108      rtems_termios_ioctl(&IoctlArgs);
     109      Termios.c_lflag=ICANON;
     110      IoctlArgs.command=RTEMS_IO_SET_ATTRIBUTES;
     111      rtems_termios_ioctl(&IoctlArgs);
     112    }
    105113  }
    106114
Note: See TracChangeset for help on using the changeset viewer.