Configuring or using SPI
int/string spi_ioctl(int $spi_id, string $cmd)
refer to the document named PHPoC Device Programming Guide for P40 for the details about commands available on $cmd
return value for each command
<?php
include "/lib/sd_340.php";
spi_ioctl(0, "set mode 3); // Setting the SPI mode to 3
spi_ioctl(0, "set div 128); // Setting the division to 128
?>