Transmitting data to SPI
int spi_write(int $spi_id, int/string $wbuf[, int $wlen = MAX_STRING_LEN])
data length (byte) on success, 0 on fail
<?php
include "/lib/sd_340.php";
$wbuf = "\x1E\x07";
spi_setup(0); // configuring SPI
$slen = spi_write(0, $wbuf, 2); // transmitting data to the SPI
if($slen == 2)
echo "$slen bytes has been sent\r\n";
?>