KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
termios.h
Go to the documentation of this file.
1/* KallistiOS ##version##
2
3 sys/termios.h
4 Copyright (C) 2024 Andress Barajas
5
6*/
7
8/** \file sys/termios.h
9 \brief Header for terminal I/O control.
10 \ingroup vfs_posix
11
12 This file contains definitions for terminal I/O control operations, as specified by
13 the POSIX standard. The termios structure and associated constants and functions
14 are used to configure and control asynchronous communications ports.
15
16 \author Andress Barajas
17*/
18
19#ifndef __SYS_TERMIOS_H
20#define __SYS_TERMIOS_H
21
22#include <sys/cdefs.h>
23
24__BEGIN_DECLS
25
26#include <stdint.h>
27
28#define NCCS 32
29
30typedef uint32_t tcflag_t;
31typedef uint8_t cc_t;
32typedef uint32_t speed_t;
33
34struct termios {
35 tcflag_t c_iflag; /* input modes */
36 tcflag_t c_oflag; /* output modes */
37 tcflag_t c_cflag; /* control modes */
38 tcflag_t c_lflag; /* local modes */
39 cc_t c_cc[NCCS]; /* control chars */
40 speed_t c_ispeed; /* input speed */
41 speed_t c_ospeed; /* output speed */
42};
43
44int tcgetattr(int fd, struct termios *termios_p);
45
46__END_DECLS
47
48#endif /* __SYS_TERMIOS_H */
Definition termios.h:34
speed_t c_ispeed
Definition termios.h:40
speed_t c_ospeed
Definition termios.h:41
tcflag_t c_cflag
Definition termios.h:37
cc_t c_cc[NCCS]
Definition termios.h:39
tcflag_t c_iflag
Definition termios.h:35
tcflag_t c_lflag
Definition termios.h:38
tcflag_t c_oflag
Definition termios.h:36
int tcgetattr(int fd, struct termios *termios_p)
#define NCCS
Definition termios.h:28
uint32_t speed_t
Definition termios.h:32
uint32_t tcflag_t
Definition termios.h:30
uint8_t cc_t
Definition termios.h:31