Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * include/linux/serial.h
0003  *
0004  * Copyright (C) 1992 by Theodore Ts'o.
0005  * 
0006  * Redistribution of this file is permitted under the terms of the GNU 
0007  * Public License (GPL)
0008  */
0009 #ifndef _LINUX_SERIAL_H
0010 #define _LINUX_SERIAL_H
0011 
0012 #include <uapi/linux/serial.h>
0013 #include <uapi/linux/serial_reg.h>
0014 
0015 /* Helper for dealing with UART_LCR_WLEN* defines */
0016 #define UART_LCR_WLEN(x)    ((x) - 5)
0017 
0018 /* FIFO and shifting register empty */
0019 #define UART_LSR_BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE)
0020 
0021 static inline bool uart_lsr_tx_empty(u16 lsr)
0022 {
0023     return (lsr & UART_LSR_BOTH_EMPTY) == UART_LSR_BOTH_EMPTY;
0024 }
0025 
0026 /*
0027  * Counters of the input lines (CTS, DSR, RI, CD) interrupts
0028  */
0029 
0030 struct async_icount {
0031     __u32   cts, dsr, rng, dcd, tx, rx;
0032     __u32   frame, parity, overrun, brk;
0033     __u32   buf_overrun;
0034 };
0035 
0036 #include <linux/compiler.h>
0037 
0038 #endif /* _LINUX_SERIAL_H */