DMA SPI and SPI transactions (rewrite for 1.20 RC2)
How would I combine the DMA SPI library and SPI transactions?
I'm planning to write a teensyduino 1.20 release of the DMA SPI driver, which could make use of a few new features introduced in teensyduino 1.20. These are:
The DMA SPI driver for 1.20 could of course also make use of the SpiSettings class, to facilitate transition between DMA and non-DMA usage of the SPI in case users want to try one or the other.
Does the above sound reasonable? To those who have used the DMA SPI driver before (or want to use it), please make suggestions if you feel that the interface needs some adjustments here and there, i.e. naming of methods, argument type and order, default values, and so on.
Regards
Christoph
How would I combine the DMA SPI library and SPI transactions?
I'm planning to write a teensyduino 1.20 release of the DMA SPI driver, which could make use of a few new features introduced in teensyduino 1.20. These are:
- SPI transactions
- Dynamic DMA channel allocation
- Interrupt vector table in RAM
Code:
SPI.beginTransaction(SPISettings());
// configure SPI for DMA usage here
// register transfers with the DMA SPI driver
// the transfer objects handle SPI settings (speed, mode, ...) and chip select
// wait for transfer to finish, or pause the driver
// configure SPI for non-DMA usage
SPI.endTransaction();
The DMA SPI driver for 1.20 could of course also make use of the SpiSettings class, to facilitate transition between DMA and non-DMA usage of the SPI in case users want to try one or the other.
Does the above sound reasonable? To those who have used the DMA SPI driver before (or want to use it), please make suggestions if you feel that the interface needs some adjustments here and there, i.e. naming of methods, argument type and order, default values, and so on.
Regards
Christoph
Last edited: