File tree Expand file tree Collapse file tree 2 files changed +16
-23
lines changed Expand file tree Collapse file tree 2 files changed +16
-23
lines changed Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
2
<!-- $Revision$ -->
3
- <!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: hirokawa Status: ready -->
3
+ <!-- EN-Revision: 307e7d78baacfcd228eef8f384e96659b67d9adb Maintainer: hirokawa Status: ready -->
4
4
<section xml : id =" dio.installation" xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" >
5
5
&reftitle.install;
6
6
<para >
10
10
&pecl.info;
11
11
<link xlink : href =" &url.pecl.package; dio" >&url.pecl.package; dio</link >.
12
12
</para >
13
- <para >
14
- &pecl.windows.download;
15
- </para >
16
13
</section >
17
14
18
15
<!-- Keep this comment at the end of the file
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
2
<!-- $Revision$ -->
3
- <!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: hirokawa Status: ready -->
3
+ <!-- EN-Revision: bce2cb849721c70737eb32ce958131e22677770c Maintainer: hirokawa Status: ready -->
4
4
<!-- CREDITS: takagi -->
5
5
<refentry xml : id =" function.dio-tcsetattr" xmlns =" http://docbook.org/ns/docbook" >
6
6
<refnamediv >
75
75
</refsect1 >
76
76
<refsect1 role =" examples" >
77
77
&reftitle.examples;
78
- <para >
79
- <example >
80
- <title >シリアルポートのボーレートを設定する</title >
81
- <programlisting role =" php" >
78
+ <example >
79
+ <title >シリアルポートのボーレートを設定する</title >
80
+ <programlisting role =" php" >
82
81
<![CDATA[
83
82
<?php
84
83
@@ -87,26 +86,23 @@ $fd = dio_open('/dev/ttyS0', O_RDWR | O_NOCTTY | O_NONBLOCK);
87
86
dio_fcntl($fd, F_SETFL, O_SYNC);
88
87
89
88
dio_tcsetattr($fd, array(
90
- 'baud' => 9600,
91
- 'bits' => 8,
92
- 'stop' => 1,
93
- 'parity' => 0
89
+ 'baud' => 9600,
90
+ 'bits' => 8,
91
+ 'stop' => 1,
92
+ 'parity' => 0
94
93
));
95
94
96
- while (1) {
97
-
98
- $data = dio_read($fd, 256);
99
-
100
- if ($data) {
101
- echo $data;
102
- }
95
+ while (true) {
96
+ $data = dio_read($fd, 256);
97
+ if ($data !== null && $date !== '') {
98
+ echo $data;
99
+ }
103
100
}
104
101
105
102
?>
106
103
]]>
107
- </programlisting >
108
- </example >
109
- </para >
104
+ </programlisting >
105
+ </example >
110
106
</refsect1 >
111
107
112
108
<refsect1 role =" notes" >
You can’t perform that action at this time.
0 commit comments