source: rtems/c/src/lib/libc/tcattr.c @ bd8c8b2a

4.104.114.84.95
Last change on this file since bd8c8b2a was 119bced, checked in by Joel Sherrill <joel.sherrill@…>, on 05/22/98 at 14:51:11

Added tcdrain(), cfgetospeed(0, cfsetospeed(), cfgetispeed(), and
cfsetispeed().

  • Property mode set to 100644
File size: 660 bytes
Line 
1/*
2 *  This file contains the RTEMS implementation of the POSIX API
3 *  routines tcgetattr and tcsetattr.
4 *
5 *  $Id$
6 *
7 */
8
9#include <rtems.h>
10#if defined(RTEMS_NEWLIB)
11
12#include <sys/types.h>
13#include <sys/stat.h>
14#include <errno.h>
15#include <termios.h>
16
17#include "internal.h"
18#include "libio.h"
19
20/*
21 * tcgetattr/tcsetattr -- get/set attributes of a device.
22 *
23 *  submitted by K.Shibuya
24 */
25
26int
27tcgetattr(int fd, struct termios *tp)
28{
29    return __rtems_ioctl(fd,RTEMS_IO_GET_ATTRIBUTES,tp);
30}
31
32int
33tcsetattr(int fd, int opt, struct termios *tp)
34{
35    if(opt != TCSANOW)
36      return -1;
37    return __rtems_ioctl(fd,RTEMS_IO_SET_ATTRIBUTES,tp);
38}
39
40#endif
Note: See TracBrowser for help on using the repository browser.