source: azure_iot_hub/trunk/musl-1.1.18/src/termios/cfsetospeed.c@ 388

Last change on this file since 388 was 388, checked in by coas-nagasima, 5 years ago

Azure IoT Hub Device C SDK を使ったサンプルの追加

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-csrc
File size: 415 bytes
Line 
1#define _BSD_SOURCE
2#include <termios.h>
3#include <sys/ioctl.h>
4#include <errno.h>
5#include "libc.h"
6
7int cfsetospeed(struct termios *tio, speed_t speed)
8{
9 if (speed & ~CBAUD) {
10 errno = EINVAL;
11 return -1;
12 }
13 tio->c_cflag &= ~CBAUD;
14 tio->c_cflag |= speed;
15 return 0;
16}
17
18int cfsetispeed(struct termios *tio, speed_t speed)
19{
20 return speed ? cfsetospeed(tio, speed) : 0;
21}
22
23weak_alias(cfsetospeed, cfsetspeed);
Note: See TracBrowser for help on using the repository browser.