PHP: dio_tcsetattr - Manual in Deutsh
PHP: dio_tcsetattr - Manual in French
PHP: dio_tcsetattr - Manual in Polish

You Are At PHP: dio_tcsetattr - Manual Area


recent searches:
include functions , variable functions , post functions...




If you are new to PHP or just need to refresh your skills, this is the place to start. This series of tutorials will give you the basic knowledge you will need to create a simple PHP website.

PHP is a reflective programming language originally designed for producing dynamic web pages.[1] PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications. Textual User Interfaces can also be created using ncurses.

PHP Manual
PrevNext

dio_tcsetattr

(PHP 4 >= 4.3.0, PHP 5 <= 5.0.4)

dio_tcsetattr --  Sets terminal attributes and baud rate for a serial port

Description

bool dio_tcsetattr ( resource fd, array options )

dio_tcsetattr() sets the terminal attributes and baud rate of the open fd.

Note: This function is not implemented on Windows platforms.

Parameters

fd

The file descriptor returned by dio_open().

options

The currently available options are:

  • 'baud' - baud rate of the port - can be 38400,19200,9600,4800,2400,1800, 1200,600,300,200,150,134,110,75 or 50, default value is 9600.

  • 'bits' - data bits - can be 8,7,6 or 5. Default value is 8.

  • 'stop' - stop bits - can be 1 or 2. Default value is 1.

  • 'parity' - can be 0,1 or 2. Default value is 0.

Return Values

No value is returned.

Examples

Example 1. Setting the baud rate on a serial port

<?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;
  }
}

?>

Widowiskowa i skuteczna reklama zewnętrzna dla twojego biznesu
sale sale szkoleniowe szkolenia
skarbykibica
meble łazienkowe
Pomoc drogowa Rzeszów merc

Another Useful functions:


function.dio-truncate | function.dio-tcsetattr |


PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want to get some idea of how it works, try the introductory tutorial. After that, check out the online manual, and the example archive sites and some of the other resources available in the links section.