Changeset 160e8fb in rtems for c


Ignore:
Timestamp:
Nov 3, 2008, 8:56:02 PM (12 years ago)
Author:
Till Straumann <strauman@…>
Branches:
4.9
Children:
fadb4a7
Parents:
8667514
Message:

2008-11-03 Till Straumann <strauman@…>

PR 1332: call BSP_uart_termios_set()/BSP_uart_intr_ctrl()
only from 'firstOpen' and only if this is a serial console.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i386/pc386/console/console.c

    r8667514 r160e8fb  
    274274}
    275275
     276static int ser_console_first_open(int major, int minor, void *arg)
     277{
     278  /*
     279   * Pass data area info down to driver
     280   */
     281  BSP_uart_termios_set(BSPConsolePort,
     282                         ((rtems_libio_open_close_args_t *)arg)->iop->data1);
     283
     284  /* Enable interrupts  on channel */
     285  BSP_uart_intr_ctrl(BSPConsolePort, BSP_UART_INTR_CTRL_TERMIOS);
     286
     287  return 0;
     288}
     289
    276290/*-------------------------------------------------------------------------+
    277291| Console device driver OPEN entry point
     
    321335    }
    322336
     337  cb.firstOpen = ser_console_first_open;
     338
    323339  status = rtems_termios_open (major, minor, arg, &cb);
    324340
     
    328344      return status;
    329345    }
    330 
    331   /*
    332    * Pass data area info down to driver
    333    */
    334   BSP_uart_termios_set(BSPConsolePort,
    335                          ((rtems_libio_open_close_args_t *)arg)->iop->data1);
    336 
    337   /* Enable interrupts  on channel */
    338   BSP_uart_intr_ctrl(BSPConsolePort, BSP_UART_INTR_CTRL_TERMIOS);
    339346
    340347  return RTEMS_SUCCESSFUL;
Note: See TracChangeset for help on using the changeset viewer.