Query: dio_tcsetattr
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
DIO_TCSETATTR(3) 1 DIO_TCSETATTR(3) dio_tcsetattr - Sets terminal attributes and baud rate for a serial portSYNOPSISbool dio_tcsetattr (resource $fd, array $options)DESCRIPTIONdio_tcsetattr(3) sets the terminal attributes and baud rate of the open $fd.PARAMETERSo $fd - The file descriptor returned by dio_open(3). o $options - The currently available options are: o '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. o 'bits' - data bits - can be 8,7,6 or 5. Default value is 8. o 'stop' - stop bits - can be 1 or 2. Default value is 1. o 'parity' - can be 0,1 or 2. Default value is 0.RETURN VALUESNo value is returned.EXAMPLESExample #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; } } ?>NOTESNote This function is not implemented on Windows platforms. PHP Documentation Group DIO_TCSETATTR(3)
Related Man Pages |
---|
if_sbni(4) - debian |
ncpd(8) - debian |
term(1) - minix |
ppp(1) - plan9 |
dc(7) - osf1 |
Similar Topics in the Unix Linux Community |
---|
Command equivalent to DOS mode for SCO 5.0.6 |
Communicating with Serial Port |
stty: tcgetattr failed |
Serial Port Setting Automatically changes |
Connect from USB to serial port of switch |