Crate driver_pal
source ·Expand description
Embedded SPI helper package
This defines a higher level Transactional
SPI interface, as well as an SPI Transaction
enumeration
that more closely map to the common uses of SPI peripherals, as well as some other common driver helpers.
An driver_pal::wrapper::Wrapper
type is provided to wrap existing SPI implementations in this
driver_pal::Transactional
interface, as well as a set of helpers for C compatibility enabled with
the compat
feature, and a basic mocking adaptor enabled with the mock
feature.
Modules§
- Transactional SPI wrapper implementation This provides a
Wrapper
type that is generic over anembedded_hal::spi
andembedded_hal::digital::v2::OutputPin
to provide a transactional API for SPI transactions.
Enums§
- Error type combining SPI and Pin errors for utility
- PinState enum used for busy indication
Traits§
- Busy trait for peripherals that support a busy signal
- Chip Select trait for peripherals supporting manual chip select
- HAL trait abstracts commonly required functions for SPI peripherals
- ManagedChipSelect marker trait indicates CS is managed by the driver
- PrefixRead trait provides a higher level, write then read function
- PrefixWrite trait provides higher level, writye then write function
- Ready trait for peripherals that support a ready signal (or IRQ)
- Reset trait for peripherals that have a reset or shutdown pin
Type Aliases§
- Transaction enum defines possible SPI transactions Re-exported from embedded-hal