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 SPI transfers via DMA #18

Merged
merged 5 commits into from Jul 14, 2019

Conversation

@hannobraun
Copy link
Member

commented Jul 12, 2019

This pull contains the following changes:

  • Fix the 16-bit SPI mode. My last pull request contained a mistake.
  • Make DMA generic over word size, add 16-bit support.
  • Add support for 16-bit DMA transfers to SPI module.

hannobraun added some commits Jul 12, 2019

Fix 16-bit support for SPI
There was a configuration error in the SPI module that caused 16-bit
mode to not work correctly. The 16-bit words were basically treated as
two bytes. This was indicated by the fact that I had to convert the word
in the example to big endian to get the right result.

When I first discovered that this conversion was necessary, I was
suprised, but eventually convinced myself that this was normal. Well, it
isn't, and the way it works now makes a lot more sense.
@mvertescher
Copy link
Member

left a comment

Solid change, thanks for the example!

@mvertescher mvertescher merged commit eb7ddb1 into stm32-rs:master Jul 14, 2019

1 check passed

Travis CI - Pull Request Build Passed
Details

@hannobraun hannobraun deleted the braun-embedded:dma-16 branch Jul 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.