]> git.sur5r.net Git - tio/blob - src/tty.h
New upstream version 1.34
[tio] / src / tty.h
1 /*
2  * tio - a simple TTY terminal I/O tool
3  *
4  * Copyright (c) 2014-2022  Martin Lund
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  * 02110-1301, USA.
20  */
21
22 #pragma once
23
24 #define KEY_QUESTION 0x3f
25 #define KEY_B 0x62
26 #define KEY_C 0x63
27 #define KEY_E 0x65
28 #define KEY_H 0x68
29 #define KEY_L 0x6C
30 #define KEY_Q 0x71
31 #define KEY_S 0x73
32 #define KEY_T 0x74
33 #define KEY_SHIFT_T 0x54
34 #define KEY_CTRL_T 0x14
35 #define KEY_V 0x76
36 #define KEY_D 0x64
37 #define KEY_R 0x72
38 #define KEY_SHIFT_L 0x4C
39
40 #define NORMAL 0
41 #define HEX 1
42
43 void stdout_configure(void);
44 void stdout_restore(void);
45 void stdin_configure(void);
46 void stdin_restore(void);
47 void tty_configure(void);
48 int tty_connect(void);
49 void tty_wait_for_device(void);
50 void list_serial_devices(void);