source: rtems/c/src/lib/libc/tcattr.c @ 7150f00f

4.104.114.84.95
Last change on this file since 7150f00f was 9deb5b8b, checked in by Joel Sherrill <joel.sherrill@…>, on 08/01/97 at 18:12:11

Katsutoshi Shibuya (shibuya@…)of BU-Denken Co., Ltd.
(Sapporo, Japan) submitted the extended console driver for the
MVME162LX BSP and the POSIX tcsetattr() and tcgetattr() routines.
This device driver supports four serial ports, cooked IO, and
provides a portable base for Zilog 8530 based console drivers.

  • 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.