1 |
#ifndef INIT_H_ |
2 |
#define INIT_H_ |
3 |
|
4 |
/* use the fastest baud-rate */ |
5 |
#if defined(B4000000) |
6 |
# define BAUDRATE B4000000 |
7 |
#elif defined(B921600) |
8 |
# define BAUDRATE B921600 |
9 |
#elif defined(B115200) |
10 |
# define BAUDRATE B115200 |
11 |
#elif defined(B38400) |
12 |
# define BAUDRATE B38400 |
13 |
#elif defined(B19200) |
14 |
# define BAUDRATE B19200 |
15 |
#else |
16 |
# define BAUDRATE B9600 |
17 |
#endif |
18 |
|
19 |
/* Disable special character functions */ |
20 |
#ifdef _POSIX_VDISABLE |
21 |
# define VDISABLE _POSIX_VDISABLE |
22 |
#else |
23 |
# define VDISABLE 255 |
24 |
#endif |
25 |
|
26 |
/*----------------------------------------------------------------------* |
27 |
* system default characters if defined and reasonable |
28 |
*/ |
29 |
#ifndef CINTR |
30 |
# define CINTR '\003' /* ^C */ |
31 |
#endif |
32 |
#ifndef CQUIT |
33 |
# define CQUIT '\034' /* ^\ */ |
34 |
#endif |
35 |
#ifndef CERASE |
36 |
# ifdef linux |
37 |
# define CERASE '\177' /* ^? */ |
38 |
# else |
39 |
# define CERASE '\010' /* ^H */ |
40 |
# endif |
41 |
#endif |
42 |
#ifndef CKILL |
43 |
# define CKILL '\025' /* ^U */ |
44 |
#endif |
45 |
#ifndef CEOF |
46 |
# define CEOF '\004' /* ^D */ |
47 |
#endif |
48 |
#ifndef CSTART |
49 |
# define CSTART '\021' /* ^Q */ |
50 |
#endif |
51 |
#ifndef CSTOP |
52 |
# define CSTOP '\023' /* ^S */ |
53 |
#endif |
54 |
#ifndef CSUSP |
55 |
# define CSUSP '\032' /* ^Z */ |
56 |
#endif |
57 |
#ifndef CDSUSP |
58 |
# define CDSUSP '\031' /* ^Y */ |
59 |
#endif |
60 |
#ifndef CRPRNT |
61 |
# define CRPRNT '\022' /* ^R */ |
62 |
#endif |
63 |
#ifndef CFLUSH |
64 |
# define CFLUSH '\017' /* ^O */ |
65 |
#endif |
66 |
#ifndef CWERASE |
67 |
# define CWERASE '\027' /* ^W */ |
68 |
#endif |
69 |
#ifndef CLNEXT |
70 |
# define CLNEXT '\026' /* ^V */ |
71 |
#endif |
72 |
|
73 |
#ifndef VDISCRD |
74 |
# ifdef VDISCARD |
75 |
# define VDISCRD VDISCARD |
76 |
# endif |
77 |
#endif |
78 |
|
79 |
#ifndef VWERSE |
80 |
# ifdef VWERASE |
81 |
# define VWERSE VWERASE |
82 |
# endif |
83 |
#endif |
84 |
|
85 |
#ifndef O_NOCTTY |
86 |
# define O_NOCTTY 0 |
87 |
#endif |
88 |
#ifndef ONLCR |
89 |
# define ONLCR 0 |
90 |
#endif |
91 |
|
92 |
#define CONSOLE "/dev/console" /* console device */ |
93 |
|
94 |
#endif /* _INIT_H_ */ |