classstuds::Spi

sys::Obj
  studs::Spi

Spi allows you to communicate over serial SPI interfaces.

See Spi chapter for details.

close

Void close()

Close this port.

open

static Spi open(Str name, SpiConfig config)

Open a SPI port with given device name and config. Throws IOErr if port could not be opended.

transfer

Buf transfer(Buf data)

Perform a SPI transfer. The data should be a binary containing the bytes to send. Since SPI transfers simultaneously send and receive, the return value will be a Buf of the same length.