Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for 16-bit words to SPI API #17

merged 4 commits into from Jul 10, 2019


Copy link

@hannobraun hannobraun commented Jul 10, 2019

This PR adds support for 16-bit words to the SPI API, except for the DMA part.

hannobraun added 4 commits Jul 10, 2019
The difference to `state::Enabled` is that `spi::Enabled` tracks the
word size the SPI instance was configured for. This is required to add
support for other word sizes. Specifically, I'm working on adding
support for 16-bit writes.

This commit doesn't add support for other word sized yet. It just
replaces `state::Enabled` with `spi::Enabled<u8>` where applicable.
There are two caveats here:
1. Notice that the title says "mostly". The exception is DMA, as the DMA
   API only works with `u8`s right now.
2. This doesn't actually add support for other word sized than `u8`. It
   only puts the infrastructure in place for doing so.
Copy link

@mvertescher mvertescher left a comment

Nice, looks good!


@mvertescher mvertescher merged commit 4ee222a into stm32-rs:master Jul 10, 2019
1 check passed
@hannobraun hannobraun deleted the spi-16 branch Jul 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants