spi_ioctl()


Configuring or using SPI

Description

int/string spi_ioctl(int $spi_id, string $cmd)

Parameters

refer to the document named PHPoC Device Programming Guide for P40 for the details about commands available on $cmd

Return Value

return value for each command

Example

<?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
?>

See also