Ignore:
Timestamp:
Mar 21, 2017, 7:39:48 PM (3 years ago)
Author:
Kevin Kirspel <kevin-kirspel@…>
Branches:
master
Children:
94a4865
Parents:
c4b058ca
git-author:
Kevin Kirspel <kevin-kirspel@…> (03/21/17 19:39:48)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/22/17 10:55:04)
Message:

termios: Synchronize with latest FreeBSD headers

Adding modified FreeBSD headers to synchronize RTEMS termios with
FreeBSD. Modify termios to support dedicated input and output baud for
termios structure. Updated BSPs to use dedicated input and output baud
in termios structure. Updated tools to use dedicated input and output
baud in termios structure. Updated termios testsuites to use dedicated
input and output baud in termios structure.

Close #2897.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/sh/sh7032/sci/sci.c

    rc4b058ca r1c6926c1  
    4747  unsigned short                opened ;
    4848  tcflag_t                      cflags ;
     49  speed_t       spd ;
    4950} sci_device[SCI_MINOR_DEVICES] =
    5051{
    51   { "/dev/sci0", SH_SCI_BASE_0, 0, 0, B9600 | CS8 },
    52   { "/dev/sci1", SH_SCI_BASE_1, 1, 0, B9600 | CS8 }
     52  { "/dev/sci0", SH_SCI_BASE_0, 0, 0, CS8, B9600 },
     53  { "/dev/sci1", SH_SCI_BASE_1, 1, 0, CS8, B9600 }
    5354} ;
    5455
    5556/*  imported from scitab.rel */
    5657extern int _sci_get_brparms(
    57   tcflag_t      cflag,
     58  speed_t       spd,
    5859  unsigned char *smr,
    5960  unsigned char *brr );
     
    6263static int _sci_set_cflags(
    6364  struct scidev_t      *sci_dev,
    64   tcflag_t      c_cflag )
     65  tcflag_t      c_cflag,
     66  speed_t       spd )
    6567{
    6668  uint8_t       smr ;
    6769  uint8_t       brr ;
    6870
    69   if ( c_cflag & CBAUD )
    70   {
    71     if ( _sci_get_brparms( c_cflag, &smr, &brr ) != 0 )
     71  if ( spd )
     72  {
     73    if ( _sci_get_brparms( spd, &smr, &brr ) != 0 )
    7274      return -1 ;
    7375  }
     
    240242    temp8 &= ~(SCI_TE | SCI_RE) ;
    241243    write8(temp8, sci_device[minor].addr + SCI_SCR);    /* Clear SCR */
    242     _sci_set_cflags( &sci_device[minor], sci_device[minor].cflags );
     244    _sci_set_cflags( &sci_device[minor], sci_device[minor].cflags, sci_device[minor].spd );
    243245
    244246/* FIXME: Should be one bit delay */
     
    251253    temp8 &= ~(SCI_TE | SCI_RE) ;
    252254    write8(temp8, sci_device[minor].addr + SCI_SCR);    /* Clear SCR */
    253     _sci_set_cflags( &sci_device[minor], sci_device[minor].cflags );
     255    _sci_set_cflags( &sci_device[minor], sci_device[minor].cflags, sci_device[minor].spd );
    254256
    255257/* FIXME: Should be one bit delay */
Note: See TracChangeset for help on using the changeset viewer.