linux/include/uapi/linux/serial.h

/* 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)
 */

#ifndef _UAPI_LINUX_SERIAL_H
#define _UAPI_LINUX_SERIAL_H

#include <linux/const.h>
#include <linux/types.h>

#include <linux/tty_flags.h>


struct serial_struct {};

/*
 * 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
#define ASYNC_CLOSING_WAIT_NONE

/*
 * These are the supported serial types.
 */
#define PORT_UNKNOWN
#define PORT_8250
#define PORT_16450
#define PORT_16550
#define PORT_16550A
#define PORT_CIRRUS
#define PORT_16650
#define PORT_16650V2
#define PORT_16750
#define PORT_STARTECH
#define PORT_16C950
#define PORT_16654
#define PORT_16850
#define PORT_RSA
#define PORT_MAX

#define SERIAL_IO_PORT
#define SERIAL_IO_HUB6
#define SERIAL_IO_MEM
#define SERIAL_IO_MEM32
#define SERIAL_IO_AU
#define SERIAL_IO_TSI
#define SERIAL_IO_MEM32BE
#define SERIAL_IO_MEM16

#define UART_CLEAR_FIFO
#define UART_USE_FIFO
#define UART_STARTECH
#define UART_NATSEMI


/*
 * Multiport serial configuration structure --- external structure
 */
struct serial_multiport_struct {};

/*
 * Serial input interrupt line counters -- external structure
 * Four lines can interrupt: CTS, DSR, RI, DCD
 */
struct serial_icounter_struct {};

/**
 * 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 {};

/*
 * Serial interface for controlling ISO7816 settings on chips with suitable
 * support. Set with TIOCSISO7816 and get with TIOCGISO7816 if supported by
 * your platform.
 */
struct serial_iso7816 {};

#endif /* _UAPI_LINUX_SERIAL_H */