OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [asm-sparc/] [termios.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1633 jcastillo
/* $Id: termios.h,v 1.1 2005-12-20 11:32:12 jcastillo Exp $ */
2
#ifndef _SPARC_TERMIOS_H
3
#define _SPARC_TERMIOS_H
4
 
5
#include <asm/ioctls.h>
6
#include <asm/termbits.h>
7
 
8
struct sgttyb {
9
        char    sg_ispeed;
10
        char    sg_ospeed;
11
        char    sg_erase;
12
        char    sg_kill;
13
        short   sg_flags;
14
};
15
 
16
struct tchars {
17
        char    t_intrc;
18
        char    t_quitc;
19
        char    t_startc;
20
        char    t_stopc;
21
        char    t_eofc;
22
        char    t_brkc;
23
};
24
 
25
struct ltchars {
26
        char    t_suspc;
27
        char    t_dsuspc;
28
        char    t_rprntc;
29
        char    t_flushc;
30
        char    t_werasc;
31
        char    t_lnextc;
32
};
33
 
34
struct sunos_ttysize {
35
        int st_lines;   /* Lines on the terminal */
36
        int st_columns; /* Columns on the terminal */
37
};
38
 
39
/* Used for packet mode */
40
#define TIOCPKT_DATA             0
41
#define TIOCPKT_FLUSHREAD        1
42
#define TIOCPKT_FLUSHWRITE       2
43
#define TIOCPKT_STOP             4
44
#define TIOCPKT_START            8
45
#define TIOCPKT_NOSTOP          16
46
#define TIOCPKT_DOSTOP          32
47
 
48
struct winsize {
49
        unsigned short ws_row;
50
        unsigned short ws_col;
51
        unsigned short ws_xpixel;
52
        unsigned short ws_ypixel;
53
};
54
 
55
/* line disciplines */
56
#define N_TTY           0
57
#define N_SLIP          1
58
#define N_MOUSE         2
59
#define N_PPP           3
60
#define N_AX25          5
61
 
62
#ifdef __KERNEL__
63
/*      intr=^C         quit=^\         erase=del       kill=^U
64
        eof/vmin=\1     eol/vtime=\0    eol2=\0         sxtc=\0
65
        start=^Q        stop=^S         susp=^Z         dsusp=^Y
66
        reprint=^R      discard=^U      werase=^W       lnext=^V
67
*/
68
#define INIT_C_CC "\003\034\177\025\001\000\000\000\021\023\032\031\022\025\027\026"
69
 
70
/*
71
 * Translate a "termio" structure into a "termios". Ugh.
72
 */
73
extern inline void trans_from_termio(struct termio * termio,
74
        struct termios * termios)
75
{
76
#define SET_LOW_BITS(x,y)       ((x) = (0xffff0000 & (x)) | (y))
77
        SET_LOW_BITS(termios->c_iflag, termio->c_iflag);
78
        SET_LOW_BITS(termios->c_oflag, termio->c_oflag);
79
        SET_LOW_BITS(termios->c_cflag, termio->c_cflag);
80
        SET_LOW_BITS(termios->c_lflag, termio->c_lflag);
81
#undef SET_LOW_BITS
82
        memcpy(termios->c_cc, termio->c_cc, NCC);
83
}
84
 
85
/*
86
 * Translate a "termios" structure into a "termio". Ugh.
87
 */
88
extern inline void trans_to_termio(struct termios * termios,
89
        struct termio * termio)
90
{
91
        termio->c_iflag = termios->c_iflag;
92
        termio->c_oflag = termios->c_oflag;
93
        termio->c_cflag = termios->c_cflag;
94
        termio->c_lflag = termios->c_lflag;
95
        termio->c_line  = termios->c_line;
96
        memcpy(termio->c_cc, termios->c_cc, NCC);
97
}
98
 
99
#endif  /* __KERNEL__ */
100
 
101
#endif /* _SPARC_TERMIOS_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.