Last change
on this file since 413 was 398, checked in by coas-nagasima, 5 years ago |
mbedTLS版Azure IoT Hub接続サンプルのソースコードを追加
|
-
Property svn:eol-style
set to
native
-
Property svn:mime-type
set to
text/x-csrc;charset=UTF-8
|
File size:
415 bytes
|
Rev | Line | |
---|
[398] | 1 | #define _BSD_SOURCE
|
---|
| 2 | #include <termios.h>
|
---|
| 3 | #include <sys/ioctl.h>
|
---|
| 4 | #include <errno.h>
|
---|
| 5 | #include "libc.h"
|
---|
| 6 |
|
---|
| 7 | int 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 |
|
---|
| 18 | int cfsetispeed(struct termios *tio, speed_t speed)
|
---|
| 19 | {
|
---|
| 20 | return speed ? cfsetospeed(tio, speed) : 0;
|
---|
| 21 | }
|
---|
| 22 |
|
---|
| 23 | weak_alias(cfsetospeed, cfsetspeed);
|
---|
Note:
See
TracBrowser
for help on using the repository browser.