Loadable Function: spi = spi ([port_path])
Loadable Function: spi = spi ([port_path], [propname, propvalue])

Open a spi interface.

Inputs

port_path - the interface device port/path of type String. If omitted defaults to ’/dev/spi-0’.
propname,propvalue - property name/value pairs.

Known input properties:

name

Name of the object

bitrate

Numeric bitrate value

clockpolarity

Clock polarity: idlehigh or idlelow.

clockphase

Clock phase value: firstedge or secondedge

Outputs

spi - An instance of octave_spi class.

Properties

The spi object has the following properties:

name

Name of the object

status

Open or closed status of object (readonly).

bitrate

Numeric bitrate value

clockpolarity

Clock polarity: idlehigh or idlelow.

clockphase

Clock phase value: firstedge or secondedge

port

The interface driver port (readonly)

Package: instrument-control