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 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: hirokawa Status: ready -->
3+ <!-- EN-Revision: 307e7d78baacfcd228eef8f384e96659b67d9adb Maintainer: hirokawa Status: ready -->
44<section xml : id =" dio.installation" xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" >
55 &reftitle.install;
66 <para >
1010 &pecl.info;
1111 <link xlink : href =" &url.pecl.package; dio" >&url.pecl.package; dio</link >.
1212 </para >
13- <para >
14- &pecl.windows.download;
15- </para >
1613</section >
1714
1815<!-- Keep this comment at the end of the file
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: hirokawa Status: ready -->
3+ <!-- EN-Revision: bce2cb849721c70737eb32ce958131e22677770c Maintainer: hirokawa Status: ready -->
44<!-- CREDITS: takagi -->
55<refentry xml : id =" function.dio-tcsetattr" xmlns =" http://docbook.org/ns/docbook" >
66 <refnamediv >
7575 </refsect1 >
7676 <refsect1 role =" examples" >
7777 &reftitle.examples;
78- <para >
79- <example >
80- <title >シリアルポートのボーレートを設定する</title >
81- <programlisting role =" php" >
78+ <example >
79+ <title >シリアルポートのボーレートを設定する</title >
80+ <programlisting role =" php" >
8281<![CDATA[
8382<?php
8483
@@ -87,26 +86,23 @@ $fd = dio_open('/dev/ttyS0', O_RDWR | O_NOCTTY | O_NONBLOCK);
8786dio_fcntl($fd, F_SETFL, O_SYNC);
8887
8988dio_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
9493));
9594
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+ }
103100}
104101
105102?>
106103]]>
107- </programlisting >
108- </example >
109- </para >
104+ </programlisting >
105+ </example >
110106 </refsect1 >
111107
112108 <refsect1 role =" notes" >
You can’t perform that action at this time.
0 commit comments