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

Subversion Repositories or1k

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1633 jcastillo
#ifndef __ASM_MIPS_TERMIOS_H
2
#define __ASM_MIPS_TERMIOS_H
3
 
4
#include <linux/types.h>
5
#include <asm/termbits.h>
6
 
7
struct winsize {
8
        unsigned short ws_row;
9
        unsigned short ws_col;
10
        unsigned short ws_xpixel;
11
        unsigned short ws_ypixel;
12
};
13
 
14
/* ----------------------------------------------------------------------- */
15
 
16
#ifdef __KERNEL__
17
 
18
/*
19
 * Translate a "termio" structure into a "termios". Ugh.
20
 */
21
extern inline void trans_from_termio(struct termio * termio,
22
        struct termios * termios)
23
{
24
#define SET_LOW_BITS(x,y)       ((x) = (0xffff0000 & (x)) | (y))
25
        SET_LOW_BITS(termios->c_iflag, termio->c_iflag);
26
        SET_LOW_BITS(termios->c_oflag, termio->c_oflag);
27
        SET_LOW_BITS(termios->c_cflag, termio->c_cflag);
28
        SET_LOW_BITS(termios->c_lflag, termio->c_lflag);
29
#undef SET_LOW_BITS
30
        memcpy(termios->c_cc, termio->c_cc, NCC);
31
}
32
 
33
/*
34
 * Translate a "termios" structure into a "termio". Ugh.
35
 */
36
extern inline void trans_to_termio(struct termios * termios,
37
        struct termio * termio)
38
{
39
        termio->c_iflag = termios->c_iflag;
40
        termio->c_oflag = termios->c_oflag;
41
        termio->c_cflag = termios->c_cflag;
42
        termio->c_lflag = termios->c_lflag;
43
        termio->c_line  = termios->c_line;
44
        memcpy(termio->c_cc, termios->c_cc, NCC);
45
}
46
 
47
#endif  /* __KERNEL__ */
48
 
49
#endif /* __ASM_MIPS_TERMIOS_H */

powered by: WebSVN 2.1.0

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