[][src]Module buspirate::spi

Module spi contains the API for SPI mode.

This mode cannot be entered directly. Instead, create a BusPirate object (from the root module of this crate) and call to_bitbang on it to enter "binary bit-bang" mode, and then call to_spi to enter SPI mode:

let bp = BusPirate::new();
let bb = bp.to_bitbang()?;
let bspi = bb.to_spi()?;

The result of to_spi is an instance of SPI.

Structs

Config

Config describes SPI-specific Bus Pirate settings.

SPI

SPI represents a Bus Pirate device in SPI mode.

Enums

ClockEdge

ClockEdge describes a single transition edge of an SPI transmission clock cycle.

ClockPhase

ClockPhase describes a single phase of an SPI transmission clock cycle.

PinOutput

PinOutput describes an output mode to be used for Bus Pirate SPI data transfers.

SampleTime

SampleTime describes a point within an SPI transmission where data bits are to be sampled.

Speed

Speed describes a clock speed to be used for Bus Pirate SPI data transfers.

Constants

DEFAULT_CONFIG

DEFAULT_CONFIG is the initial state of SPI configuration when a Bus Pirate is first started, according to the Bus Pirate documentation.

Traits

Comms

Comms is a trait implemented by SPI representing the main communications actions it supports, while excluding the configuration actions.