<...> 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?
However apart from the auto instantiation, we'd be better off just updating the SPI class to support multiple channels
SPI.beginTransaction(SPISettings(clockspeed, MSBFIRST, SPI_MODE0))Begin using the SPI bus. Normally this is called before asserting the chip select signal. The SPI is configured to use the clock, data order (MSBFIRST or LSBFIRST) and data mode (SPI_MODE0, SPI_MODE1, SPI_MODE2, or SPI_MODE3). The clock speed should be the maximum speed the SPI slave device can accept.digitalWrite(SSpin, level)Most SPI devices define a transfer of multiple bytes. You need to write the SS pin before the transfer begins (most chips use LOW during the transfer) and write it again after the last byte, to end the transfer. See below for more SS pin details.SPI.endTransaction()Stop using the SPI bus. Normally this is called after de-asserting the chip select, to allow other libraries to use the SPI bus.