1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #define ACK 6
20 #define NAK 21
21
22
23
24 #define B110 0
25 #define B150 1
26 #define B300 2
27 #define B600 3
28 #define B1200 4
29 #define B2400 5
30 #define B4800 6
31 #define B9600 7
32
33
34
35 #define NO_PARITY 0
36 #define ODD_PARITY 1
37 #define EVEN_PARITY 3
38 #define MARK_PARITY 5
39 #define SPACE_PARITY 7
40 #define NO_PAR 0
41 #define ODD_PAR 1
42 #define EVEN_PAR 3
43 #define MARK_PAR 5
44 #define SPAC_PAR 7
45
46
47
48 #define STOP1 0
49 #define STOP2 1
50
51
52
53 #define DATA7 2
54 #define DATA8 3
55
56
57
58 #define DEFAULT_COMM ((B9600<<5)|(EVEN_PARITY<<3)|(STOP1<<2)|(DATA7))
59 #define DEF_COMM ((B9600<<5)|(EVEN_PAR<<3)|(STOP1<<2)|(DATA7))
60
61
62
63
64 #define T 1
65 #define TRUE 1
66 #define F 0
67 #define FALSE 0
68 #define ADD_CONTROL 32
69
70
71
72 #define BUFSIZE 4096
73 #define TBUFSIZE 4096
74 #define PBUFSIZE 520
75 #define DATA_SIZE 121
76
77
78
79 #define BS 8
80 #define TAB 9
81 #define LF 10
82 #define CR 13
83 #define ESC 27
84 #define CTL_RSB 29
85
86
87
88 #define OPTION_B 0x001
89 #define OPTION_C 0x002
90 #define OPTION_D 0x004
91 #define OPTION_I 0x018
92 #define OPTION_P 0x010
93 #define OPTION_S 0x020
94 #define OPTION_GX 0x040
95 #define OPTION_GR 0x080
96 #define OPTION_GP 0x100
97 #define OPTION_H 0x200
98
99