cvs: phpdoc-es /reference/dio/functions dio-tcsetattr.xml
| From: | Javier Eguiluz | Date: | Fri, 14 Nov 2003 18:19:58 +0000 |
| Subject: | cvs: phpdoc-es /reference/dio/functions dio-tcsetattr.xml | ||
| Groups: | php.doc.es | ||
| Request: | Send a blank email to doc-es+get-413@lists.php.net to get a copy of this message | ||
javi Fri Nov 14 13:19:58 2003 EDT
Added files:
/phpdoc-es/reference/dio/functions dio-tcsetattr.xml
Log:
Index: phpdoc-es/reference/dio/functions/dio-tcsetattr.xml
+++ phpdoc-es/reference/dio/functions/dio-tcsetattr.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- EN-Revision: 1.4 Maintainer: javi Status: ready -->
<!-- splitted from ./en/functions/dio.xml, last change in rev 1.1 -->
<refentry id="function.dio-tcsetattr">
<refnamediv>
<refname>dio_tcsetattr</refname>
<refpurpose>
Configura las opciones de un terminal y la velocidad de un puerto serie
</refpurpose>
</refnamediv>
<refsect1>
<title>Descripción</title>
<methodsynopsis>
<type></type><methodname>dio_tcsetattr</methodname>
<methodparam><type>resource</type><parameter>fd</parameter></methodparam>
<methodparam><type>array</type><parameter>options</parameter></methodparam>
</methodsynopsis>
<para>
La función <function>dio_tcsetattr</function> configura las
opciones de un terminal y la velocidad en baudios del recurso
<parameter>resource</parameter> abierto previamente. Las opciones actualmente
disponibles son las siguientes:
<itemizedlist>
<listitem>
<para>
'baud' - velocidad en baudios del puerto serie - puede tomar los valores 38400,
19200, 9600, 4800, 2400, 1800, 1200, 600, 300, 200, 150, 134, 110, 75 o 50. Por defecto se establece
una velocidad de 9600 baudios.
</para>
</listitem>
<listitem>
<para>
'bits' - número de bits de los datos - puede ser 8, 7, 6 o 5. Por
defecto se establece un valor de 8 bits.
</para>
</listitem>
<listitem>
<para>
'stop' - bits de stop - pueden ser 1 o 2. Por defecto se establece un
valor de 1 bit de stop.
</para>
</listitem>
<listitem>
<para>
'parity' - bits de paridad - pueden ser 0, 1 o 2. Por defecto se
establece un valor de 0 bits de paridad.
</para>
</listitem>
</itemizedlist>
<example>
<title>
Configurar la velocidad de un puerto serie
</title>
<programlisting role="php">
<![CDATA[
<?php
$fd = dio_open('/dev/ttyS0', O_RDWR | O_NOCTTY | O_NONBLOCK);
dio_fcntl($fd,F_SETFL, O_SYNC );
dio_tcsetattr($fd, array(
'baud' => 9600,
'bits' => 8,
'stop' =>1,
'parity' => 0
));
while (1) {
$data = dio_read($fd,256);
if ($data) {
echo $data;
}
}
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->