xref: /openbmc/linux/arch/s390/include/uapi/asm/raw3270.h (revision e847c767)
1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 #ifndef __ASM_S390_UAPI_RAW3270_H
3 #define __ASM_S390_UAPI_RAW3270_H
4 
5 /* Local Channel Commands */
6 #define TC_WRITE	0x01		/* Write */
7 #define TC_RDBUF	0x02		/* Read Buffer */
8 #define TC_EWRITE	0x05		/* Erase write */
9 #define TC_READMOD	0x06		/* Read modified */
10 #define TC_EWRITEA	0x0d		/* Erase write alternate */
11 #define TC_WRITESF	0x11		/* Write structured field */
12 
13 /* Buffer Control Orders */
14 #define TO_GE		0x08		/* Graphics Escape */
15 #define TO_SF		0x1d		/* Start field */
16 #define TO_SBA		0x11		/* Set buffer address */
17 #define TO_IC		0x13		/* Insert cursor */
18 #define TO_PT		0x05		/* Program tab */
19 #define TO_RA		0x3c		/* Repeat to address */
20 #define TO_SFE		0x29		/* Start field extended */
21 #define TO_EUA		0x12		/* Erase unprotected to address */
22 #define TO_MF		0x2c		/* Modify field */
23 #define TO_SA		0x28		/* Set attribute */
24 
25 /* Field Attribute Bytes */
26 #define TF_INPUT	0x40		/* Visible input */
27 #define TF_INPUTN	0x4c		/* Invisible input */
28 #define TF_INMDT	0xc1		/* Visible, Set-MDT */
29 #define TF_LOG		0x60
30 
31 /* Character Attribute Bytes */
32 #define TAT_RESET	0x00
33 #define TAT_FIELD	0xc0
34 #define TAT_EXTHI	0x41
35 #define TAT_FGCOLOR	0x42
36 #define TAT_CHARS	0x43
37 #define TAT_BGCOLOR	0x45
38 #define TAT_TRANS	0x46
39 
40 /* Extended-Highlighting Bytes */
41 #define TAX_RESET	0x00
42 #define TAX_BLINK	0xf1
43 #define TAX_REVER	0xf2
44 #define TAX_UNDER	0xf4
45 
46 /* Reset value */
47 #define TAR_RESET	0x00
48 
49 /* Color values */
50 #define TAC_RESET	0x00
51 #define TAC_BLUE	0xf1
52 #define TAC_RED		0xf2
53 #define TAC_PINK	0xf3
54 #define TAC_GREEN	0xf4
55 #define TAC_TURQ	0xf5
56 #define TAC_YELLOW	0xf6
57 #define TAC_WHITE	0xf7
58 #define TAC_DEFAULT	0x00
59 
60 /* Write Control Characters */
61 #define TW_NONE		0x40		/* No particular action */
62 #define TW_KR		0xc2		/* Keyboard restore */
63 #define TW_PLUSALARM	0x04		/* Add this bit for alarm */
64 
65 #define RAW3270_FIRSTMINOR	1	/* First minor number */
66 #define RAW3270_MAXDEVS		255	/* Max number of 3270 devices */
67 
68 #define AID_CLEAR		0x6d
69 #define AID_ENTER		0x7d
70 #define AID_PF3			0xf3
71 #define AID_PF7			0xf7
72 #define AID_PF8			0xf8
73 #define AID_READ_PARTITION	0x88
74 
75 #endif /* __ASM_S390_UAPI_RAW3270_H */
76