Skip to content

Add support for SPI slave mode - #259

Merged
hannobraun merged 12 commits into
lpc-rs:masterfrom
braun-embedded:spi-slave
Jul 24, 2020
Merged

hannobraun merged 12 commits into
lpc-rs:masterfrom
braun-embedded:spi-slave

Conversation

@hannobraun

Copy link
Copy Markdown
Member

No description provided.

Slave mode needs explicit support for the slave select pins to work, and
since there are multiple per peripheral, we need a trait to identify
them.
I'm about to add support for slave mode, which will require a second
enable method.
Once support for slave mode is added, there will no longer be a clear
default.
Those are going to be reused by slave mode initialization.
They are not used, and the restrictions they provide are redundant. The
function types are already restricted to those used in the `Instance`
trait and a `Function` cannot be assigned without all the right traits
being there anyway.
This helps when using an IDE that shows you the name of the arguments
when writing a function call.
Some of these are required to operate slave mode, but they're available
in master mode and might be useful there too.
@hannobraun hannobraun changed the title Spi slave Add support for SPI slave mode Jul 21, 2020
Comment thread src/spi/peripheral.rs Outdated
@hannobraun
hannobraun merged commit fe0adec into lpc-rs:master Jul 24, 2020
@hannobraun
hannobraun deleted the spi-slave branch July 24, 2020 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants