Device::Chip::ProtocolBase::SPI - a base class for implementing SPI protocols
Device::Chip::ProtocolBase::SPI
This abstract base class provides some convenient wrapper methods for providing higher-level SPI protocol implementations, by using simpler lower-level ones. It can be used by implementation classes to help provide parts of the API.
$protocol->write( $words )->get
A wrapper for "readwrite" that ignores the result.
$words = $protocol->read( $len )->get
A wrapper for "readwrite" that sends unspecified data which the chip will ignore, returning the result.
This implementation currently sends all-bits-low.
A wrapper for "readwrite_no_ss" that ignores the result.
A wrapper for "readwrite_no_ss" that sends unspecified data which the chip will ignore, returning the result.
This implemention currenetly sends all-bits-low.
$words_in = $protocol->readwrite( $words_out )->get
A wrapper for performing a complete SPI transfer, using "assert_ss", "readwrite_no_ss", "release_ss".
$words_in = $protocol->write_then_read( $words_out, $len_in )
A wrapper for performing a complete SPI transfer in two phases, using "assert_ss", "write_no_ss", "read_no_ss" and "release_ss".
Paul Evans <leonerd@leonerd.org.uk>
To install Device::Chip, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Device::Chip
CPAN shell
perl -MCPAN -e shell install Device::Chip
For more information on module installation, please visit the detailed CPAN module installation guide.