4.104.115
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 | |
---|
15 | int 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.