18228e353SMarc-André Lureau /* 28228e353SMarc-André Lureau * QEMU System Emulator 38228e353SMarc-André Lureau * 48228e353SMarc-André Lureau * Copyright (c) 2003-2008 Fabrice Bellard 58228e353SMarc-André Lureau * 68228e353SMarc-André Lureau * Permission is hereby granted, free of charge, to any person obtaining a copy 78228e353SMarc-André Lureau * of this software and associated documentation files (the "Software"), to deal 88228e353SMarc-André Lureau * in the Software without restriction, including without limitation the rights 98228e353SMarc-André Lureau * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 108228e353SMarc-André Lureau * copies of the Software, and to permit persons to whom the Software is 118228e353SMarc-André Lureau * furnished to do so, subject to the following conditions: 128228e353SMarc-André Lureau * 138228e353SMarc-André Lureau * The above copyright notice and this permission notice shall be included in 148228e353SMarc-André Lureau * all copies or substantial portions of the Software. 158228e353SMarc-André Lureau * 168228e353SMarc-André Lureau * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 178228e353SMarc-André Lureau * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 188228e353SMarc-André Lureau * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 198228e353SMarc-André Lureau * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 208228e353SMarc-André Lureau * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 218228e353SMarc-André Lureau * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 228228e353SMarc-André Lureau * THE SOFTWARE. 238228e353SMarc-André Lureau */ 248228e353SMarc-André Lureau #ifndef CHAR_SERIAL_H 258228e353SMarc-André Lureau #define CHAR_SERIAL_H 268228e353SMarc-André Lureau 27*7566c6efSMarc-André Lureau #include "chardev/char.h" 28*7566c6efSMarc-André Lureau 29*7566c6efSMarc-André Lureau #define CHR_IOCTL_SERIAL_SET_PARAMS 1 30*7566c6efSMarc-André Lureau typedef struct { 31*7566c6efSMarc-André Lureau int speed; 32*7566c6efSMarc-André Lureau int parity; 33*7566c6efSMarc-André Lureau int data_bits; 34*7566c6efSMarc-André Lureau int stop_bits; 35*7566c6efSMarc-André Lureau } QEMUSerialSetParams; 36*7566c6efSMarc-André Lureau 37*7566c6efSMarc-André Lureau #define CHR_IOCTL_SERIAL_SET_BREAK 2 38*7566c6efSMarc-André Lureau 39*7566c6efSMarc-André Lureau #define CHR_IOCTL_SERIAL_SET_TIOCM 13 40*7566c6efSMarc-André Lureau #define CHR_IOCTL_SERIAL_GET_TIOCM 14 41*7566c6efSMarc-André Lureau 42*7566c6efSMarc-André Lureau #define CHR_TIOCM_CTS 0x020 43*7566c6efSMarc-André Lureau #define CHR_TIOCM_CAR 0x040 44*7566c6efSMarc-André Lureau #define CHR_TIOCM_DSR 0x100 45*7566c6efSMarc-André Lureau #define CHR_TIOCM_RI 0x080 46*7566c6efSMarc-André Lureau #define CHR_TIOCM_DTR 0x002 47*7566c6efSMarc-André Lureau #define CHR_TIOCM_RTS 0x004 48*7566c6efSMarc-André Lureau 498228e353SMarc-André Lureau #endif 50