components

Module spi

Source
Expand description

Components for SPI.

This provides four components.

  1. SpiMuxComponent provides a virtualization layer for a SPI controller.
  2. SpiSyscallComponent provides a controller system call interface to SPI.
  3. SpiPSyscallComponent provides a peripheral system call interface to SPI.
  4. SpiComponent provides a virtualized client to the SPI bus.

SpiSyscallComponent is used for processes, while SpiComponent is used for kernel capsules that need access to the SPI bus.

§Usage

let mux_spi = components::spi::SpiMuxComponent::new(&sam4l::spi::SPI).finalize(
    components::spi_mux_component_static!(sam4l::spi::SpiHw));
let spi_syscalls = SpiSyscallComponent::new(mux_spi, 3).finalize(
    components::spi_syscalls_component_static!(sam4l::spi::SpiHw));
let rf233_spi = SpiComponent::new(mux_spi, 3).finalize(
    components::spi_component_static!(sam4l::spi::SpiHw));

Structs§