W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
從一個已打開的OHSCESerial資源所指定的串口讀取數(shù)據(jù)
(OHSCE >=V0.1.9)-從一個已打開的OHSCESerial資源所指定的串口讀取數(shù)據(jù)。
Ohsce_eng_serial_read(&$ohsce,&$data,$len=null,$thex=false,$timeout=3)
$ohsce
-待讀取且已打開的OHSCESerial資源
$data
-待讀數(shù)據(jù)
$len
-待讀長度(int)
$thex
-十六進制返回(bool)
$timeout
-超時時間
Example:
<?php Ohsce_eng_serial_read($hscecom,$data,null,true); // 讀取串口數(shù)據(jù) 返回數(shù)據(jù)長度為未知 以16進制返回 echo $data; //輸出數(shù)據(jù)Notice:
超時時間僅在阻塞模型下有效
官網(wǎng)鏈接:http://www.ohsce.com/index.php/book/ohscelib/19.html
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: