Crate driver_pal

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§

hal
mock
wrapper
Transactional SPI wrapper implementation This provides a Wrapper type that is generic over an embedded_hal::spi and embedded_hal::digital::v2::OutputPin to provide a transactional API for SPI transactions.

Enums§

Error
Error type combining SPI and Pin errors for utility
PinState
PinState enum used for busy indication

Traits§

Busy
Busy trait for peripherals that support a busy signal
ChipSelect
Chip Select trait for peripherals supporting manual chip select
Hal
HAL trait abstracts commonly required functions for SPI peripherals
ManagedChipSelect
ManagedChipSelect marker trait indicates CS is managed by the driver
PrefixRead
PrefixRead trait provides a higher level, write then read function
PrefixWrite
PrefixWrite trait provides higher level, writye then write function
Ready
Ready trait for peripherals that support a ready signal (or IRQ)
Reset
Reset trait for peripherals that have a reset or shutdown pin

Type Aliases§

Transaction
Transaction enum defines possible SPI transactions Re-exported from embedded-hal