uio_in()


读取指定UIO针输入值

Description

int uio_in(int $uio_id, int $pin)

Parameters

Return Value

输入端口状态为HIGH时为1,LOW时为0

Example

<?php
$in_value = 0;
include "/lib/sd_340.php";
uio_setup(0, 0, "in_pu");       // Setting the pin 0 of the UIO 0 to input with pull-up
echo $in_value = uio_in(0, 0);  // Reading and printing the pin 0 of the UIO 0
?>

See also