-
Notifications
You must be signed in to change notification settings - Fork 989
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
I am working on a design for SPI with DMA on atsamd51.
I think we'll always want to use DMA. That is an easier to use API and likely faster overall.
#1176 (comment)
Tx() to always use dma if possible, but at least atsamd51 slows things down in some cases.
If the data is small or the communication speed is slow, using DMA will slow down spi.Tx().
To reduce the slowdown, I am considering implementing the following.
If anyone has any opinions, please let me know.
// The following will be executed with blocking as before
// The internal implementation will be the same as before, without DMA.
spi.Tx(w, r)
// The following will be executed using DMA.
// It will always run asynchronously and can wait for completion by calling spi.
spi.TxDMA(w, r)
spi.Wait()
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request