1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 22:43:50 +01:00

stm32/spi: Remove superfluous DMA stop call

The DMA stream will automatically disable itself as soon as the transfer
is finished. No need to do this an additional time after the transfer is
finished
This commit is contained in:
Koen Zandberg 2020-05-15 15:02:02 +02:00
parent fddf0897e8
commit b7d0cbcd57
No known key found for this signature in database
GPG Key ID: 0895A893E6D2985B

View File

@ -152,6 +152,7 @@ int spi_init_with_gpio_mode(spi_t bus, spi_gpio_mode_t mode)
int spi_acquire(spi_t bus, spi_cs_t cs, spi_mode_t mode, spi_clk_t clk)
{
/* lock bus */
mutex_lock(&locks[bus]);
#ifdef STM32_PM_STOP
@ -243,9 +244,8 @@ static void _transfer_dma(spi_t bus, const void *out, void *in, size_t len)
dma_wait(spi_config[bus].rx_dma);
dma_wait(spi_config[bus].tx_dma);
dma_stop(spi_config[bus].tx_dma);
dma_stop(spi_config[bus].rx_dma);
/* No need to stop the DMA here, it is automatically disabled when the
* transfer is finished */
_wait_for_end(bus);
}