Add support for 16-bit words to SPI API#17
Merged
mvertescher merged 4 commits intostm32-rs:masterfrom Jul 10, 2019
braun-embedded:spi-16
Merged
Add support for 16-bit words to SPI API#17mvertescher merged 4 commits intostm32-rs:masterfrom braun-embedded:spi-16
mvertescher merged 4 commits intostm32-rs:masterfrom
braun-embedded:spi-16
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for 16-bit words to the SPI API, except for the DMA part.