1cfsetispeed(3C)          Standard C Library Functions          cfsetispeed(3C)
2
3
4

NAME

6       cfsetispeed, cfsetospeed - set input and output baud rate
7

SYNOPSIS

9       #include <termios.h>
10
11       int cfsetispeed(struct termios *termios_p, speed_t speed);
12
13
14       int cfsetospeed(struct termios *termios_p, speed_t speed);
15
16

DESCRIPTION

18       The  cfsetispeed()  function  sets  the  input  baud rate stored in the
19       structure pointed to by termios_p to speed.
20
21
22       The cfsetospeed() function sets the output  baud  rate  stored  in  the
23       structure pointed to by termios_p to speed.
24
25
26       There is no effect on the baud rates set in the hardware until a subse‐
27       quent successful call to tcsetattr(3C) on the same termios structure.
28

RETURN VALUES

30       Upon successful completion, cfsetispeed() and cfsetospeed()  return  0.
31       Otherwise −1 is returned, and errno may be set to indicate the error.
32

ERRORS

34       The cfsetispeed() and cfsetospeed() functions may fail if:
35
36       EINVAL    The speed value is not a valid baud rate.
37
38
39       EINVAL    The  value  of  speed  is outside the range of possible speed
40                 values as specified in <termios.h>.
41
42

ATTRIBUTES

44       See attributes(5) for descriptions of the following attributes:
45
46
47
48
49       ┌─────────────────────────────┬───────────────────────────────┐
50       │      ATTRIBUTE TYPE         │       ATTRIBUTE VALUE         │
51       ├─────────────────────────────┼───────────────────────────────┤
52       │Interface Stability          │Standard                       │
53       ├─────────────────────────────┼───────────────────────────────┤
54       │MT-Level                     │MT-Safe, and Async-Signal-Safe │
55       └─────────────────────────────┴───────────────────────────────┘
56

SEE ALSO

58       cfgetispeed(3C), tcsetattr(3C), attributes(5), standards(5), termio(7I)
59
60
61
62SunOS 5.11                        24 Jul 2002                  cfsetispeed(3C)
Impressum