Skip to content

Add DMA support for SPI master mode - #265

Merged
hannobraun merged 6 commits into
lpc-rs:masterfrom
braun-embedded:spi-dma
Aug 5, 2020
Merged

Add DMA support for SPI master mode#265
hannobraun merged 6 commits into
lpc-rs:masterfrom
braun-embedded:spi-dma

Conversation

@hannobraun

Copy link
Copy Markdown
Member

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

@hannobraun

Copy link
Copy Markdown
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
Copy Markdown
Member Author

Rebased, ready for review.

@david-sawatzke david-sawatzke left a comment

Copy link
Copy Markdown
Member

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

Comment thread src/spi/dma.rs Outdated
Comment thread src/spi/dma.rs Outdated
Comment thread src/spi/dma.rs
Comment thread src/spi/dma.rs
@hannobraun

Copy link
Copy Markdown
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
Copy Markdown
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