Changeset 93531e9b in rtems


Ignore:
Timestamp:
Jun 6, 2017, 6:03:45 AM (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
787f51f
Parents:
64ecfc1
git-author:
Sebastian Huber <sebastian.huber@…> (06/06/17 06:03:45)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/07/17 10:57:39)
Message:

Move RTEMS-specific Termios API content

Remove obsolete support for OFILL, OFDEL, NLDLY, CRDLY, BSDLY, VTDLY,
and FFDLY which is not present on FreeBSD and not implemented in Linux.

Update #2833.

Files:
9 edited

Legend:

Unmodified
Added
Removed
  • c/src/libchip/serial/mc68681.h

    r64ecfc1 r93531e9b  
    1111#ifndef _MC68681_H_
    1212#define _MC68681_H_
     13
     14#include <rtems/termiostypes.h>
    1315
    1416#ifdef __cplusplus
  • cpukit/libcsupport/include/rtems/termiostypes.h

    r64ecfc1 r93531e9b  
    2121#include <rtems/assoc.h>
    2222#include <rtems/chain.h>
     23#include <sys/ioccom.h>
    2324#include <stdint.h>
    2425#include <termios.h>
     
    574575);
    575576
     577#define RTEMS_IO_SNDWAKEUP _IOW('t', 11, struct ttywakeup ) /* send tty wakeup */
     578#define RTEMS_IO_RCVWAKEUP _IOW('t', 12, struct ttywakeup ) /* recv tty wakeup */
     579
     580#define OLCUC           0x00000100      /* map lower case to upper case on output */
     581#define IUCLC           0x00004000      /* map upper case to lower case on input */
     582
     583#define RTEMS_TERMIOS_NUMBER_BAUD_RATES 25
     584
    576585#ifdef __cplusplus
    577586}
  • cpukit/libcsupport/include/sys/_termios.h

    r64ecfc1 r93531e9b  
    9696#define IMAXBEL         0x00002000      /* ring bell on input queue full */
    9797#endif  /*_POSIX_SOURCE */
    98 #ifdef __rtems__
    99 #define IUCLC           0x00004000      /* map upper case to lower case on input */
    100 #endif /* __rtems__ */
    10198/*
    10299 * Output flags - software output processing
     
    119116#define     TAB2            0x00000008
    120117#define     TAB3            0x0000000C      /* expand tabs to spaces */
    121 #define     XTABS           0x0000000C
    122118#define ONOEOT          0x00000010      /* discard EOT's (^D) on output) */
    123119#define OCRNL           0x00000020      /* map CR to NL on output */
    124120#define ONOCR           0x00000040      /* no CR output at column 0 */
    125121#define ONLRET          0x00000080      /* NL performs CR function */
    126 #define OLCUC           0x00000100      /* map lower case to upper case on output */
    127 #define OFILL           0x00000200      /* send fill characters for a delay, rather than using a timed delay */
    128 #define OFDEL           0x00000400      /* fill character is ASCII DEL (0177). if unset, fill character is ASCII NUL ('\0') */
    129 #define NLDLY           0x00000800      /* newline delay mask */
    130 #define     NL0     0x00000000
    131 #define     NL1     0x00000800
    132 #define CRDLY           0x00003000      /* carriage return delay mask */
    133 #define     CR0     0x00000000
    134 #define     CR1     0x00001000
    135 #define     CR2     0x00002000
    136 #define     CR3     0x00003000
    137 #define BSDLY           0x00004000      /* Backspace delay mask */
    138 #define     BS0     0x00000000
    139 #define     BS1     0x00004000
    140 #define VTDLY           0x00008000      /* Vertical tab delay mask */
    141 #define     VT0     0x00000000
    142 #define     VT1     0x00008000
    143 #define FFDLY           0x00010000      /* Form feed delay mask */
    144 #define     FF0     0x00000000
    145 #define     FF1     0x00010000
    146122#endif /* __rtems__ */
    147123#endif  /*_POSIX_SOURCE */
     
    244220#endif  /* !_POSIX_SOURCE */
    245221
    246 #ifdef __rtems__
    247 #define RTEMS_TERMIOS_NUMBER_BAUD_RATES 25
    248 #endif /* __rtems__ */
    249 
    250222typedef unsigned int  tcflag_t;
    251223typedef unsigned char   cc_t;
  • cpukit/libcsupport/include/sys/ttycom.h

    r64ecfc1 r93531e9b  
    6161                                                /* 8-10 compat */
    6262                                                /* 11-12 unused */
    63 #ifdef __rtems__
    64 #define RTEMS_IO_SNDWAKEUP _IOW('t', 11, struct ttywakeup ) /* send tty wakeup */
    65 #define RTEMS_IO_RCVWAKEUP _IOW('t', 12, struct ttywakeup ) /* recv tty wakeup */
    66 #endif /* __rtems__ */
    6763#define TIOCEXCL   _IO('t', 13)   /* set exclusive use of tty */
    6864#define TIOCNXCL         _IO('t', 14)           /* reset exclusive use of tty */
  • cpukit/libcsupport/src/termios.c

    r64ecfc1 r93531e9b  
    578578     */
    579579    tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
    580     tty->termios.c_oflag = OPOST | ONLCR | XTABS;
     580    tty->termios.c_oflag = OPOST | ONLCR | OXTABS;
    581581    tty->termios.c_cflag = CS8 | CREAD | CLOCAL;
    582582    tty->termios.c_lflag =
     
    11891189    case '\t':
    11901190      columnAdj = 8 - (oldColumn & 7);
    1191       if ((tty->termios.c_oflag & TABDLY) == XTABS) {
     1191      if ((tty->termios.c_oflag & TABDLY) == OXTABS) {
    11921192        int i;
    11931193
  • testsuites/libtests/termios/init.c

    r64ecfc1 r93531e9b  
    2828
    2929#include <rtems/shell.h>
     30#include <rtems/termiostypes.h>
    3031
    3132#include <stdio.h>
     
    132133    printf( "ONLRET " );
    133134
    134   if( tp->c_oflag & OFILL )
    135     printf( "OFILL " );
    136 
    137   if( tp->c_oflag & OFDEL )
    138     printf( "OFDEL " );
    139 
    140   switch( tp->c_oflag & NLDLY ) {
    141     case NL0:
    142       printf( "NL0 " );
    143       break;
    144 
    145     case NL1:
    146       printf( "NL1 " );
    147       break;
    148   }
    149 
    150   switch( tp->c_oflag & CRDLY ) {
    151     case CR0:
    152       printf( "CR0 " );
    153       break;
    154 
    155     case CR1:
    156       printf( "CR1 " );
    157       break;
    158 
    159     case CR2:
    160       printf( "CR2 " );
    161       break;
    162 
    163     case CR3:
    164       printf( "CR3 " );
    165       break;
    166   }
    167 
    168   switch( tp->c_oflag & TABDLY ) {
    169     case TAB0:
    170       printf( "TAB0 " );
    171       break;
    172 
    173     case TAB1:
    174       printf( "TAB1 " );
    175       break;
    176 
    177     case TAB2:
    178       printf( "TAB2 " );
    179       break;
    180 
    181     case TAB3:
    182       printf( "TAB3 " );
    183       break;
    184   }
    185 
    186   switch( tp->c_oflag & BSDLY ) {
    187     case BS0:
    188       printf( "BS0 " );
    189       break;
    190 
    191     case BS1:
    192       printf( "BS1 " );
    193       break;
    194   }
    195 
    196   switch( tp->c_oflag & VTDLY ) {
    197     case VT0:
    198       printf( "VT0 " );
    199       break;
    200 
    201     case VT1:
    202       printf( "VT1 " );
    203       break;
    204   }
    205 
    206   switch( tp->c_oflag & FFDLY ) {
    207     case FF0:
    208       printf( "FF0" );
    209       break;
    210 
    211     case FF1:
    212       printf( "FF1" );
    213       break;
    214   }
    215135  printf( "\n" );
    216136}
  • testsuites/libtests/termios03/init.c

    r64ecfc1 r93531e9b  
    2222#include <termios.h>
    2323#include <rtems/dumpbuf.h>
     24#include <rtems/termiostypes.h>
    2425
    2526const char rtems_test_name[] = "TERMIOS 3";
  • testsuites/libtests/termios05/init.c

    r64ecfc1 r93531e9b  
    2222#include <termios.h>
    2323#include <rtems/dumpbuf.h>
     24#include <rtems/termiostypes.h>
    2425
    2526const char rtems_test_name[] = "TERMIOS 5";
  • testsuites/libtests/termios09/init.c

    r64ecfc1 r93531e9b  
    849849static void test_xtabs(test_context *ctx)
    850850{
    851   tcflag_t oflags = OPOST | XTABS;
     851  tcflag_t oflags = OPOST | OXTABS;
    852852  size_t i;
    853853
     
    953953static void test_write(test_context *ctx)
    954954{
    955   tcflag_t oflags = OPOST | ONLCR | XTABS;
     955  tcflag_t oflags = OPOST | ONLCR | OXTABS;
    956956  rtems_status_code sc;
    957957  size_t i = INTERRUPT;
     
    10321032  rtems_test_assert(memcmp(dev->output_buf, buf, OUTPUT_BUFFER_SIZE) == 0);
    10331033
    1034   /* Ensure that XTABS output expansion is taken into account */
     1034  /* Ensure that OXTABS output expansion is taken into account */
    10351035
    10361036  dev->tty->column = 0;
Note: See TracChangeset for help on using the changeset viewer.