Skip to content

Conversation

@hannobraun
Copy link
Contributor

This largely follow this guide from The Embedonomicon:
https://docs.rust-embedded.org/embedonomicon/dma.html

I originally thought I'd need a separate trait for receiving, i.e.
peripheral-to-memory transfers, but it looks like that's not going to be
necessary.
We're going to need it to build a safe DMA API that is generic over the
specific buffer type used.
This will theoretically allow us to use other types than `&'static
[u8]`, like `Box<u8>` (I haven't checked, and given that a `Box` is hard
to come by, it doesn't seem immdetialy relevant).

What is immediately relevant, however, is that it allows us to use
`'static mut [u8]`, which is going to be required when I add support for
peripheral-to-memory transfers.
Copy link
Member

@mvertescher mvertescher left a comment

Choose a reason for hiding this comment

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

LGTM

@mvertescher
Copy link
Member

Great to see RX DMA implemented, thanks @hannobraun!

@mvertescher mvertescher merged commit fe29fcd into stm32-rs:master Jun 19, 2019
@hannobraun hannobraun deleted the usart-dma-read branch June 19, 2019 05:48
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