确认缓冲大小


确认缓冲区大小的命令是txbuf

"get txbuf"

应答值是整数状态的字符串。

<?php
include "/lib/sd_spc.php";

$rwbuf = "";
$sid = 14;
spc_reset();
spc_sync_baud(115200);

spc_request_dev($sid, "set uart 115200N81");

$txbuf_len = (int)spc_request_dev($sid, "get txbuf");
echo $txbuf_len;    // output(e.g.): 12288
?>