sdk-core
v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Toggle main menu visibility
Loading...
Searching...
No Matches
termios.h
Go to the documentation of this file.
1
/*
2
# _____ ___ ____ ___ ____
3
# ____| | ____| | | |____|
4
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5
#-----------------------------------------------------------------------
6
# Copyright ps2dev - http://www.ps2dev.org
7
# Licenced under Academic Free License version 2.0
8
# Review ps2sdk README & LICENSE files for further details.
9
*/
10
16
17
#ifndef __SYS_TERMIOS_H__
18
#define __SYS_TERMIOS_H__
19
20
#ifdef _EE
21
// For pid_t
22
#include <
sys/types.h
>
23
#endif
24
25
typedef
unsigned
char
cc_t;
26
typedef
unsigned
int
speed_t;
27
typedef
unsigned
int
tcflag_t;
28
29
#define NCCS 32
30
31
struct
termios
{
32
tcflag_t c_iflag;
33
tcflag_t c_oflag;
34
tcflag_t c_cflag;
35
tcflag_t c_lflag;
36
cc_t c_line;
37
cc_t c_cc[NCCS];
38
speed_t __c_ispeed;
39
speed_t __c_ospeed;
40
};
41
42
struct
winsize
{
43
unsigned
short
ws_row, ws_col, ws_xpixel, ws_ypixel;
44
};
45
46
#define VINTR 0
47
#define VQUIT 1
48
#define VERASE 2
49
#define VKILL 3
50
#define VEOF 4
51
#define VTIME 5
52
#define VMIN 6
53
#define VSWTC 7
54
#define VSTART 8
55
#define VSTOP 9
56
#define VSUSP 10
57
#define VEOL 11
58
#define VREPRINT 12
59
#define VDISCARD 13
60
#define VWERASE 14
61
#define VLNEXT 15
62
#define VEOL2 16
63
64
#define IGNBRK 0000001
65
#define BRKINT 0000002
66
#define IGNPAR 0000004
67
#define PARMRK 0000010
68
#define INPCK 0000020
69
#define ISTRIP 0000040
70
#define INLCR 0000100
71
#define IGNCR 0000200
72
#define ICRNL 0000400
73
#define IUCLC 0001000
74
#define IXON 0002000
75
#define IXANY 0004000
76
#define IXOFF 0010000
77
#define IMAXBEL 0020000
78
#define IUTF8 0040000
79
80
#define OPOST 0000001
81
#define OLCUC 0000002
82
#define ONLCR 0000004
83
#define OCRNL 0000010
84
#define ONOCR 0000020
85
#define ONLRET 0000040
86
#define OFILL 0000100
87
#define OFDEL 0000200
88
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || defined(_XOPEN_SOURCE)
89
#define NLDLY 0000400
90
#define NL0 0000000
91
#define NL1 0000400
92
#define CRDLY 0003000
93
#define CR0 0000000
94
#define CR1 0001000
95
#define CR2 0002000
96
#define CR3 0003000
97
#define TABDLY 0014000
98
#define TAB0 0000000
99
#define TAB1 0004000
100
#define TAB2 0010000
101
#define TAB3 0014000
102
#define BSDLY 0020000
103
#define BS0 0000000
104
#define BS1 0020000
105
#define FFDLY 0100000
106
#define FF0 0000000
107
#define FF1 0100000
108
#endif
109
110
#define VTDLY 0040000
111
#define VT0 0000000
112
#define VT1 0040000
113
114
#define B0 0000000
115
#define B50 0000001
116
#define B75 0000002
117
#define B110 0000003
118
#define B134 0000004
119
#define B150 0000005
120
#define B200 0000006
121
#define B300 0000007
122
#define B600 0000010
123
#define B1200 0000011
124
#define B1800 0000012
125
#define B2400 0000013
126
#define B4800 0000014
127
#define B9600 0000015
128
#define B19200 0000016
129
#define B38400 0000017
130
131
#define B57600 0010001
132
#define B115200 0010002
133
#define B230400 0010003
134
#define B460800 0010004
135
#define B500000 0010005
136
#define B576000 0010006
137
#define B921600 0010007
138
#define B1000000 0010010
139
#define B1152000 0010011
140
#define B1500000 0010012
141
#define B2000000 0010013
142
#define B2500000 0010014
143
#define B3000000 0010015
144
#define B3500000 0010016
145
#define B4000000 0010017
146
147
#define CSIZE 0000060
148
#define CS5 0000000
149
#define CS6 0000020
150
#define CS7 0000040
151
#define CS8 0000060
152
#define CSTOPB 0000100
153
#define CREAD 0000200
154
#define PARENB 0000400
155
#define PARODD 0001000
156
#define HUPCL 0002000
157
#define CLOCAL 0004000
158
159
#define ISIG 0000001
160
#define ICANON 0000002
161
#define ECHO 0000010
162
#define ECHOE 0000020
163
#define ECHOK 0000040
164
#define ECHONL 0000100
165
#define NOFLSH 0000200
166
#define TOSTOP 0000400
167
#define IEXTEN 0100000
168
169
#define TCOOFF 0
170
#define TCOON 1
171
#define TCIOFF 2
172
#define TCION 3
173
174
#define TCIFLUSH 0
175
#define TCOFLUSH 1
176
#define TCIOFLUSH 2
177
178
#define TCSANOW 0
179
#define TCSADRAIN 1
180
#define TCSAFLUSH 2
181
182
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
183
#define EXTA 0000016
184
#define EXTB 0000017
185
#define CBAUD 0010017
186
#define CBAUDEX 0010000
187
#define CIBAUD 002003600000
188
#define CMSPAR 010000000000
189
#define CRTSCTS 020000000000
190
191
#define XCASE 0000004
192
#define ECHOCTL 0001000
193
#define ECHOPRT 0002000
194
#define ECHOKE 0004000
195
#define FLUSHO 0010000
196
#define PENDIN 0040000
197
#define EXTPROC 0200000
198
199
#define XTABS 0014000
200
#endif
201
202
__BEGIN_DECLS
203
204
extern
speed_t cfgetospeed (
const
struct
termios
*termios_p);
205
extern
speed_t cfgetispeed (
const
struct
termios
*termios_p);
206
extern
int
cfsetospeed (
struct
termios
*termios_p, speed_t speed);
207
extern
int
cfsetispeed (
struct
termios
*termios_p, speed_t speed);
208
209
extern
int
tcgetattr (
int
fildes,
struct
termios
*termios_p);
210
extern
int
tcsetattr (
int
fildes,
int
optional_actions,
const
struct
termios
*termios_p);
211
212
extern
int
tcgetwinsize (
int
fildes,
struct
winsize
*gws);
213
extern
int
tcsetwinsize (
int
fildes,
const
struct
winsize
*gws);
214
215
extern
int
tcsendbreak (
int
fildes,
int
len);
216
extern
int
tcdrain (
int
fildes);
217
extern
int
tcflush (
int
fildes,
int
action);
218
extern
int
tcflow (
int
fildes,
int
action);
219
220
#ifdef _EE
221
extern
pid_t tcgetsid (
int
fildes);
222
#endif
223
224
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
225
extern
void
cfmakeraw(
struct
termios
*termios_p);
226
extern
int
cfsetspeed(
struct
termios
*termios_p, speed_t speed);
227
#endif
228
229
__END_DECLS
230
231
#endif
termios
Definition
termios.h:31
winsize
Definition
termios.h:42
types.h
core
libcglue
include
sys
termios.h
Generated by
1.18.0