![]() |
|
|||
File indexing completed on 2025-05-11 08:24:15
0001 /* @file 0002 * 0003 * @brief Baud Rate Functions 0004 * @ingroup Termios 0005 */ 0006 0007 /* 0008 * Copyright (c) 1989, 1993 0009 * The Regents of the University of California. All rights reserved. 0010 * 0011 * Redistribution and use in source and binary forms, with or without 0012 * modification, are permitted provided that the following conditions 0013 * are met: 0014 * 1. Redistributions of source code must retain the above copyright 0015 * notice, this list of conditions and the following disclaimer. 0016 * 2. Redistributions in binary form must reproduce the above copyright 0017 * notice, this list of conditions and the following disclaimer in the 0018 * documentation and/or other materials provided with the distribution. 0019 * 3. Neither the name of the University nor the names of its contributors 0020 * may be used to endorse or promote products derived from this software 0021 * without specific prior written permission. 0022 * 0023 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 0024 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 0025 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 0026 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 0027 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 0028 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 0029 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 0030 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 0031 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 0032 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 0033 * SUCH DAMAGE. 0034 */ 0035 0036 #ifdef HAVE_CONFIG_H 0037 #include "config.h" 0038 #endif 0039 0040 #include <rtems.h> 0041 #if defined(RTEMS_NEWLIB) 0042 0043 #include <sys/types.h> 0044 #include <sys/stat.h> 0045 #include <errno.h> 0046 #include <string.h> 0047 #define TTYDEFCHARS 0048 #include <termios.h> 0049 0050 /* 0051 * Obtain a termios structure which is similar to the one provided by 0052 * the kernel. 0053 */ 0054 void 0055 cfmakesane( 0056 struct termios *tp 0057 ) 0058 { 0059 tp->c_cflag = TTYDEF_CFLAG; 0060 tp->c_iflag = TTYDEF_IFLAG; 0061 tp->c_lflag = TTYDEF_LFLAG; 0062 tp->c_oflag = TTYDEF_OFLAG; 0063 tp->c_ispeed = TTYDEF_SPEED; 0064 tp->c_ospeed = TTYDEF_SPEED; 0065 memcpy(&tp->c_cc, ttydefchars, sizeof ttydefchars); 0066 } 0067 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |