/* SPDX-License-Identifier: GPL-1.0+ WITH Linux-syscall-note */ /* * include/linux/serial.h * * Copyright (C) 1992 by Theodore Ts'o. * * Redistribution of this file is permitted under the terms of the GNU * Public License (GPL)
*/
struct serial_struct { int type; int line; unsignedint port; int irq; int flags; int xmit_fifo_size; int custom_divisor; int baud_base; unsignedshort close_delay; char io_type; char reserved_char[1]; int hub6; unsignedshort closing_wait; /* time to wait before closing */ unsignedshort closing_wait2; /* no longer used... */ unsignedchar *iomem_base; unsignedshort iomem_reg_shift; unsignedint port_high; unsignedlong iomap_base; /* cookie passed into ioremap */
};
/* * For the close wait times, 0 means wait forever for serial port to * flush its output. 65535 means don't wait at all.
*/ #define ASYNC_CLOSING_WAIT_INF 0 #define ASYNC_CLOSING_WAIT_NONE 65535
/* * Multiport serial configuration structure --- external structure
*/ struct serial_multiport_struct { int irq; int port1; unsignedchar mask1, match1; int port2; unsignedchar mask2, match2; int port3; unsignedchar mask3, match3; int port4; unsignedchar mask4, match4; int port_monitor; int reserved[32];
};
/* * Serial input interrupt line counters -- external structure * Four lines can interrupt: CTS, DSR, RI, DCD
*/ struct serial_icounter_struct { int cts, dsr, rng, dcd; int rx, tx; int frame, overrun, parity, brk; int buf_overrun; int reserved[9];
};
/** * struct serial_rs485 - serial interface for controlling RS485 settings. * @flags: RS485 feature flags. * @delay_rts_before_send: Delay before send (milliseconds). * @delay_rts_after_send: Delay after send (milliseconds). * @addr_recv: Receive filter for RS485 addressing mode * (used only when %SER_RS485_ADDR_RECV is set). * @addr_dest: Destination address for RS485 addressing mode * (used only when %SER_RS485_ADDR_DEST is set). * @padding0: Padding (set to zero). * @padding1: Padding (set to zero). * @padding: Deprecated, use @padding0 and @padding1 instead. * Do not use with @addr_recv and @addr_dest (due to * overlap). * * Serial interface for controlling RS485 settings on chips with suitable * support. Set with TIOCSRS485 and get with TIOCGRS485 if supported by your * platform. The set function returns the new state, with any unsupported bits * reverted appropriately. * * The flag bits are: * * * %SER_RS485_ENABLED - RS485 enabled. * * %SER_RS485_RTS_ON_SEND - Logical level for RTS pin when sending. * * %SER_RS485_RTS_AFTER_SEND - Logical level for RTS pin after sent. * * %SER_RS485_RX_DURING_TX - Full-duplex RS485 line. * * %SER_RS485_TERMINATE_BUS - Enable bus termination (if supported). * * %SER_RS485_ADDRB - Enable RS485 addressing mode. * * %SER_RS485_ADDR_RECV - Receive address filter (enables @addr_recv). Requires %SER_RS485_ADDRB. * * %SER_RS485_ADDR_DEST - Destination address (enables @addr_dest). Requires %SER_RS485_ADDRB. * * %SER_RS485_MODE_RS422 - Enable RS422. Requires %SER_RS485_ENABLED.
*/ struct serial_rs485 {
__u32 flags; #define SER_RS485_ENABLED _BITUL(0) #define SER_RS485_RTS_ON_SEND _BITUL(1) #define SER_RS485_RTS_AFTER_SEND _BITUL(2) /* Placeholder for bit 3: SER_RS485_RTS_BEFORE_SEND, which isn't used anymore */ #define SER_RS485_RX_DURING_TX _BITUL(4) #define SER_RS485_TERMINATE_BUS _BITUL(5) #define SER_RS485_ADDRB _BITUL(6) #define SER_RS485_ADDR_RECV _BITUL(7) #define SER_RS485_ADDR_DEST _BITUL(8) #define SER_RS485_MODE_RS422 _BITUL(9)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.