STM32, Maple and Maple mini port to IDE 1.5.x

victor_pv:
<...> It is the job of the sketch to control CS and any other line, besides MISO MOSI and SCLK.

We are thinking on integrating a DMA transfer command in the SPI library, which could take take of firing the SPI DMA for you, when passed some arguments. I would think that as long as we leave the CS lines for the sketch, and setup an easy way of checking when the DMA transfer is over, it should be even easier to use DMA for 2 devices, something like this:
<...>

What do you guys think on something like that?

Or, SPI could be rewritten to not auto-instantiate, but require the programmer to create the class instance with the DMA channel as part of the argument. This new class, not replacing the existing one which would remain for compatibility, could be used just like SoftwareSerial to manage multiple DMA channels. Each instance could then have its own buffer/queuing methodology and callback.

Ray