Skip to content

Add DMA support for SPI master mode #265

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

Merged
merged 6 commits into from
Aug 5, 2020
Merged

Add DMA support for SPI master mode #265

merged 6 commits into from
Aug 5, 2020

Conversation

hannobraun
Copy link
Member

This pull request is based on #263 and #264. I recommend reviewing/merging those first.

@hannobraun
Copy link
Member Author

Rebased, still blocked on #264.

@hannobraun hannobraun marked this pull request as ready for review August 3, 2020 18:58
@hannobraun
Copy link
Member Author

Rebased, ready for review.

Copy link
Member

@david-sawatzke david-sawatzke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A usage example or something similar would also help (maybe a loopback detection, as a self contained system?).

Only the unreachable() stuff is a blocker for me

@hannobraun
Copy link
Member Author

A usage example or something similar would also help (maybe a loopback detection, as a self contained system?).

I do have a usage example over here: https://github.com/braun-embedded/lpc845-test-stand/blob/22de685de7664273169232f20b330954512fc007/test-target/src/main.rs#L621-L650

I agree that it would be better to have a self-contained example using loopback mode in this repository, but I'd like to leave that as a possible future improvement, if at all possible. I'm already very late in my current project, and my focus right now is to finish up the last few tasks so I can take a long vacation. For this reason, I'd like to avoid any additional non-trivial tasks (which this is, as it includes API design work).

This required adding some additional infrastructure that is distinct
from the DMA infrastructure used by other peripherals, as SPI can send
and receive at the same time, using the same buffer.
@hannobraun
Copy link
Member Author

Pushed a commit that adds unreachable! in the appropriate places. Rebased everything on latest master (no changes were necessary).

Merging, as everything is resolved now (and my test suite still runs fine).

@hannobraun hannobraun merged commit 37bcf65 into lpc-rs:master Aug 5, 2020
@hannobraun hannobraun deleted the spi-dma branch August 5, 2020 11:56
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