-
-
20 Apr 2022 11:50:54 UTC
- Distribution: Device-Chip
- Module version: 0.22
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (1)
- Testers (237 / 7 / 44)
- Kwalitee
Bus factor: 1- 83.98% Coverage
- License: perl_5
- Perl: v5.26.0
- Activity
24 month- Tools
- Download (35.36KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
++ed by:1 non-PAUSE user- Dependencies
- Future
- Future::AsyncAwait
- List::Util
- Object::Pad
- Struct::Dumb
- Test::Builder
- Test::ExpectAndCheck::Future
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Device::Chip::ProtocolBase::SPI
- a role for implementing SPI protocolsDESCRIPTION
This role (or 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.
WRAPPER METHODS
write
await $protocol->write( $words );
A wrapper for "readwrite" that ignores the result.
read
$words = await $protocol->read( $len );
A wrapper for "readwrite" that sends unspecified data which the chip will ignore, returning the result.
This implementation currently sends all-bits-low.
write_no_ss
A wrapper for "readwrite_no_ss" that ignores the result.
read_no_ss
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.
readwrite
$words_in = await $protocol->readwrite( $words_out );
A wrapper for performing a complete SPI transfer, using "assert_ss", "readwrite_no_ss", "release_ss".
write_then_read
$words_in = await $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".
AUTHOR
Paul Evans <leonerd@leonerd.org.uk>
Module Install Instructions
To install Device::Chip, copy and paste the appropriate command in to your terminal.
cpanm Device::Chip
perl -MCPAN -e shell install Device::Chip
For more information on module installation, please visit the detailed CPAN module installation guide.