enableSPI
Enable SPI interface
Add-On Required: This feature requires the MATLAB Support Package for Raspberry Pi Hardware add-on.
Syntax
Description
enableSPI(
enables the SPI bus. You can
then use the Raspberry Pi® hardware board pins SPI0_MOSI (GPIO 10), SPI0_MISO (GPIO 9), and SPI0_SCLK
(GPIO 11) as SPI pins and interface the Raspberry Pi hardware boards with any SPI devices to exchange data. The SPI bus is enabled
by default. To disable SPI, use mypi
)disableSPI
.
Note
MATLAB® Support Package for Raspberry Pi Hardware does not support enableSPI
function for the
Bullseye operating system. Under Hardware Setup use the Configure Peripheral Modules
window to enable SPI interface on the Raspberry Pi.
Examples
Input Arguments
Version History
Introduced in R2014a