stm32f7xx-hal icon indicating copy to clipboard operation
stm32f7xx-hal copied to clipboard

DMA: Support multiple streams per peripheral instance

Open hannobraun opened this issue 6 years ago • 0 comments

When I originally submitted the DMA API, I couldn't quite figure out how to support multiple DMA streams per peripheral instance. I must have gotten less stupid since then, because I believe the solution is quite simple:

Convert Target::Stream from an associated type to a regular type parameter. The Target trait can be implemented multiple times for the same type, as we'd be implementing Target<Stream1> and Target<Stream2>, for example, which are different types.

This means my comment on the impl_target! invocation is misleading, as the Rx/Tx types don't need parameters.

I will fix this the next time I work on that code, but don't have any plans right now for when/if that might happen. If anyone else wants to pick this up, please go ahead!

hannobraun avatar Jul 12 '19 07:07 hannobraun