Open aurabindo opened 5 years ago
@aurabindo You mean as an extension of the embedded-hal
traits? Sounds like a good idea, feel free to propose it over at: https://github.com/rust-embedded/embedded-hal
@therealprof to add it to embedded-hal, we need to analyze how other microcontrollers do it as well for arriving at a common ground right?
@aurabindo Yes, in a way you're right but that's nothing you should have to worry about.
First I'd recommend opening a ticket describing what functionality you'd like to achieve. Then someone (e.g. you if you'd like to give it a try) could add a PR adding that functionality and people will have a closer look at it and point if it needs to be extended or changed so it can be universally applied.
Of course you're welcome to try implementing this without embedded-hal traits (or hope for someone else to do it).
@aurabindo I didn't mean to suggest this should be closed. I think it's a reasonable request and will certainly require some implementation in this crate.
@therealprof I just looked at the embedded hal crate, and it doesnt have anything related to DMA. However, this crate and many other do have an implementation. Does it mean it is beyond embedded-hal's scope?
@aurabindo It just means no one has come up with a clever idea to design those traits yet.
At the moment DMA can be done with peripherals. One cannot use the hal to configure the dma subsystem to have arbitrary dma transfers, or transfers triggered by Timer peripherals. How about adding some configuration api to Channels in addition to
listen
andunlisten
? Something likepub fn configure(&mut self, config: &DmaChannelConfig)