Skip to content

Add DMA support to SPI API#16

Merged
mvertescher merged 5 commits into
stm32-rs:masterfrom
braun-embedded:spi-dma
Jul 9, 2019
Merged

Add DMA support to SPI API#16
mvertescher merged 5 commits into
stm32-rs:masterfrom
braun-embedded:spi-dma

Conversation

@hannobraun

Copy link
Copy Markdown
Contributor

No description provided.

To support typical SPI use cases, it must be possible to have two
ongoing DMA transfers that both read from/write to the same buffer. This
is not possible with the current DMA abstractions.

This commit solves that problem, by relaxing the requirements on the
creation of a new `Transfer`. As a consequence, the safe constructors of
`Transfer` have been removed, and only the unsafe variant is available
now. This is unfortunate, but I believe it is necessary.

Please note that the burden of calling the unsafe constructor is put on
the peripheral APIs. This doesn't change anything for the end user, who
will still use the same (safe) APIs to start DMA transfers.

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

lgtm!

@mvertescher mvertescher merged commit 99863b5 into stm32-rs:master Jul 9, 2019
@hannobraun hannobraun deleted the spi-dma branch July 10, 2019 05:29
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