source: rtems/cpukit/libcsupport/src/termios_setinitialbaud.c @ a26ced8

4.104.115
Last change on this file since a26ced8 was a26ced8, checked in by Ralf Corsepius <ralf.corsepius@…>, on 03/27/10 at 05:36:47

Add HAVE_CONFIG_H support to let files receive configure defines.

  • Property mode set to 100644
File size: 683 bytes
Line 
1/*
2 *  COPYRIGHT (c) 1989-2008.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.rtems.com/license/LICENSE.
8 *
9 *  $Id$
10 */
11
12#ifdef HAVE_CONFIG_H
13#include "config.h"
14#endif
15
16#include <sys/termios.h>
17#include <rtems/termiostypes.h>
18
19int  rtems_termios_set_initial_baud(
20  struct rtems_termios_tty *ttyp,
21  int32_t                   baud
22)
23{
24  int cflags_baud;
25
26  cflags_baud = rtems_termios_number_to_baud(baud);
27  if ( cflags_baud == -1 )
28    return -1;
29
30  ttyp->termios.c_cflag = (ttyp->termios.c_cflag & ~CBAUD) | cflags_baud;
31
32  return 0;
33}
Note: See TracBrowser for help on using the repository browser.