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 DMA-based reading from USART #261

merged 18 commits into from Jul 27, 2020

Add support for DMA-based reading from USART #261

merged 18 commits into from Jul 27, 2020


Copy link

@hannobraun hannobraun commented Jul 23, 2020

Based on #260. I recommend reviewing/merging that one first.

Close #124.

@hannobraun hannobraun mentioned this pull request Jul 24, 2020
This makes the transfer code more generic and prepares it for the
addition of peripheral-to-memory transfers.
Only buffers can provide a transfer count, but the trait should also be
implementable by peripherals.
This is required to support buffers as transfer destinations.
We expose it in type signatures, which means our users may need to
depend on it. I believe it is best practive to re-export it in this
case, as that relieves the user from having to manage their own
dependency on it (while keeping the version in sync at all times).
This is required to support buffers as destinations.
It hasn't served a purpose since I made `Channel::start_transfer`
@hannobraun hannobraun marked this pull request as ready for review July 24, 2020 08:09
Copy link
Member Author

Rebased, ready for review.

@david-sawatzke: To address your comment on #260, I've pushed a commit that panics, if the buffer is too long. Is that what you had in mind? I don't think a Result makes sense, as this is going to be a programmer error that is not recoverable.

src/dma/ Show resolved Hide resolved
Copy link

@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.

The documentation looks good now!

@hannobraun hannobraun merged commit 44e36be into lpc-rs:master Jul 27, 2020
@hannobraun hannobraun deleted the usart-dma branch July 27, 2020 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

DMA: Support peripheral-to-memory transfers
2 participants