mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
669104d841
Setting up a DMA transfer can take longer than sending out a buffer byte by byte if the buffer is small. DMA only shows advantages for large buffers, using it for every transfer will cause a net slowdown. Since we did not come up with a good way to determine the treshold based on the SPI frequency, just use a fixed buffer for now so that DMA can be used without slowing things down overall.
48 lines
1.5 KiB
Plaintext
48 lines
1.5 KiB
Plaintext
# Copyright (c) 2020 HAW Hamburg
|
|
#
|
|
# This file is subject to the terms and conditions of the GNU Lesser
|
|
# General Public License v2.1. See the file LICENSE in the top level
|
|
# directory for more details.
|
|
#
|
|
|
|
menuconfig MODULE_PERIPH_SPI
|
|
bool "SPI peripheral driver"
|
|
depends on HAS_PERIPH_SPI
|
|
select MODULE_PERIPH_COMMON
|
|
|
|
if MODULE_PERIPH_SPI
|
|
|
|
config MODULE_PERIPH_INIT_SPI
|
|
bool "Auto initialize SPI peripheral"
|
|
default y if MODULE_PERIPH_INIT
|
|
|
|
config MODULE_PERIPH_SPI_RECONFIGURE
|
|
bool "Pin reconfiguration support"
|
|
depends on HAS_PERIPH_SPI_RECONFIGURE
|
|
|
|
config MODULE_PERIPH_SPI_GPIO_MODE
|
|
bool "Support initializing SPI pins with adapted GPIO modes"
|
|
depends on HAS_PERIPH_SPI_GPIO_MODE
|
|
help
|
|
Say y to call `spi_init_with_gpio_mode`, which allows to initialize the SPI pins in
|
|
with an specific GPIO mode.
|
|
|
|
# TODO: these modules are actually just artifacts from the way periph_init_%
|
|
# modules are handled in Makefile. We need to define them to keep the list the
|
|
# same for now. We should be able to remove them later on.
|
|
|
|
config MODULE_PERIPH_INIT_SPI_RECONFIGURE
|
|
bool "Auto initialize SPI pin reconfiguration support"
|
|
default y if MODULE_PERIPH_INIT
|
|
depends on MODULE_PERIPH_SPI_RECONFIGURE
|
|
|
|
config MODULE_PERIPH_INIT_SPI_GPIO_MODE
|
|
bool
|
|
default y if MODULE_PERIPH_INIT
|
|
depends on MODULE_PERIPH_SPI_GPIO_MODE
|
|
|
|
# Include CPU specific configurations
|
|
osource "$(RIOTCPU)/$(CPU)/periph/Kconfig.spi"
|
|
|
|
endif # MODULE_PERIPH_SPI
|