mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 04:52:59 +01:00
cpu/stm32/periph_spi: only perform DMA transfer above threshold
This commit is contained in:
parent
fbeb1f9a26
commit
753fae6936
@ -390,7 +390,7 @@ void spi_transfer_bytes(spi_t bus, spi_cs_t cs, bool cont,
|
||||
}
|
||||
|
||||
#ifdef MODULE_PERIPH_DMA
|
||||
if (_use_dma(&spi_config[bus])) {
|
||||
if (_use_dma(&spi_config[bus]) && len > CONFIG_SPI_DMA_THRESHOLD_BYTES) {
|
||||
_transfer_dma(bus, out, in, len);
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user