Expand description
Components for SPI.
This provides four components.
SpiMuxComponent
provides a virtualization layer for a SPI controller.SpiSyscallComponent
provides a controller system call interface to SPI.SpiPSyscallComponent
provides a peripheral system call interface to SPI.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));