Wafer.Driver.Circuits.SPI (wafer v0.1.6)

A connection to a chip via Circuits's SPI driver.

Implements the Wafer.Conn behaviour as well as the Wafer.SPI protocol.

Link to this section Summary

Functions

Acquire a connection to a peripheral using the Circuits' SPI driver on the specified bus and address.

Link to this section Types

Link to this type

driver_option()

Specs

driver_option() ::
  {:mode, 0..3}
  | {:bits_per_word, 0..16}
  | {:speed_hz, pos_integer()}
  | {:delay_us, non_neg_integer()}

Specs

option() :: {:bus_name, binary()}

Specs

options() :: [option() | driver_option()]

Specs

t() :: %Wafer.Driver.Circuits.SPI{bus: binary(), ref: reference()}

Link to this section Functions

Specs

acquire(options()) :: {:ok, t()} | {:error, reason :: any()}

Acquire a connection to a peripheral using the Circuits' SPI driver on the specified bus and address.