source: rtems/cpukit/libcsupport/src/termios_setinitialbaud.c @ 18daff9

4.104.115
Last change on this file since 18daff9 was 18daff9, checked in by Ralf Corsepius <ralf.corsepius@…>, on 11/29/09 at 13:35:32

Whitespace removal.

  • Property mode set to 100644
File size: 634 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#include <sys/termios.h>
13#include <rtems/termiostypes.h>
14
15int  rtems_termios_set_initial_baud(
16  struct rtems_termios_tty *ttyp,
17  int32_t                   baud
18)
19{
20  int cflags_baud;
21
22  cflags_baud = rtems_termios_number_to_baud(baud);
23  if ( cflags_baud == -1 )
24    return -1;
25
26  ttyp->termios.c_cflag = (ttyp->termios.c_cflag & ~CBAUD) | cflags_baud;
27
28  return 0;
29}
Note: See TracBrowser for help on using the repository browser.