# # For a description of the syntax of this configuration file, # see the file kconfig-language.txt in the NuttX tools repository. # config ARCH_HAVE_SPI_CRCGENERATION bool default n config ARCH_HAVE_SPI_CS_CONTROL bool default n config ARCH_HAVE_SPI_BITORDER bool default n menuconfig SPI bool "SPI Driver Support" default n ---help--- This selection enables selection of common SPI options. This option should be enabled by all platforms that support SPI interfaces. See include/nuttx/spi/spi.h for further SPI driver information. if SPI config SPI_SLAVE bool "SPI Slave" default n ---help--- Enable support for SPI Slave features if SPI_SLAVE config SPI_SLAVE_DRIVER bool "SPI Slave character driver" default n ---help--- Built-in support for a character driver at /dev/spislv[N] that may be used to perform SPI bus transfers from applications. The intent of this driver is to support SPI Slave testing. if SPI_SLAVE_DRIVER config SPI_SLAVE_DRIVER_MODE int "SPI Slave character driver default mode" default 0 ---help--- Default SPI Slave character driver mode, where: 0 = CPOL=0, CPHA=0 1 = CPOL=0, CPHA=1 2 = CPOL=1, CPHA=0 3 = CPOL=1, CPHA=1 config SPI_SLAVE_DRIVER_WIDTH int "SPI Slave character driver default bit width" default 8 ---help--- Number of bits per SPI Slave transfer (default 8). config SPI_SLAVE_DRIVER_BUFFER_SIZE int "SPI Slave character driver TX and RX buffer sizes" default 128 ---help--- Size of the internal TX and RX buffers of the SPI Slave character driver. config SPI_SLAVE_DRIVER_COLORIZE_TX_BUFFER bool "SPI Slave character driver colorize TX buffer" default n ---help--- Initialize entries of the TX buffer with a given pattern. If the SPI Slave controller performs a call to "getdata" API during the "bind" operation, the colorized buffer may be sent as part of the first TX transfer of the SPI Slave controller. This feature might be useful for a quick communication test between Master and Slave. config SPI_SLAVE_DRIVER_COLORIZE_PATTERN hex "SPI Slave character driver colorize pattern" default 0xa5 depends on SPI_SLAVE_DRIVER_COLORIZE_TX_BUFFER ---help--- Pattern to be used as the coloration of the TX buffer. config SPI_SLAVE_DRIVER_COLORIZE_NUM_BYTES int "SPI Slave character driver colorize number of bytes" default 4 depends on SPI_SLAVE_DRIVER_COLORIZE_TX_BUFFER ---help--- Number of bytes of the TX buffer to be colorized. endif # SPI_SLAVE_DRIVER config SPI_SLAVE_DMA bool "SPI Slave DMA" default n depends on ARCH_DMA && EXPERIMENTAL ---help--- Enable support for DMA data transfers (not yet implemented). endif # SPI_SLAVE config SPI_EXCHANGE bool "SPI exchange" default y ---help--- Driver supports a single exchange method (vs a recvblock() and sndblock() methods). config SPI_CMDDATA bool "SPI CMD/DATA" default n ---help--- Devices on the SPI bus require out-of-band support to distinguish command transfers from data transfers. Such devices will often support either 9-bit SPI (yech) or 8-bit SPI and a GPIO output that selects between command and data. config SPI_CALLBACK bool "Media change callbacks" default y if MMCSD_SPI default n if !MMCSD_SPI ---help--- Support the callback method in the SPI interface. This will allow the SPI-based MMC/SD driver to get a notification of changes in the card status when an SD card is inserted or removed. config SPI_HWFEATURES bool default n ---help--- Selected only if a specific H/W feature is selected. This is basically the OR of any specific hardware feature and enables the SPI hwfeatures() interface method. config SPI_CRCGENERATION bool default n select SPI_HWFEATURES depends on ARCH_HAVE_SPI_CRCGENERATION ---help--- Selected by MCU Kconfig logic if implementation supports automatic generation of SPI CRCs. Enables the HWFEAT_CRCGENERATION option as well as the hwfeartures() interface method. config SPI_CS_CONTROL bool "SPI CS Behavior Control" default n select SPI_HWFEATURES depends on ARCH_HAVE_SPI_CS_CONTROL ---help--- Enables possibilities to define the behavior of CS. Also enables the hwfeatures() interface method. config SPI_BITORDER bool "SPI Bit Order Control" default n select SPI_HWFEATURES depends on ARCH_HAVE_SPI_BITORDER ---help--- Enables capability to select MSB- or LSB-first hardware feature for data transfers. config SPI_DELAY_CONTROL bool "SPI Delay Control" default n ---help--- Enables possibilities to define the SPI Delays such as SPI-ChipSelect-Delays and inter frame delays. SPI-ChipSelect-Delays: are the delay between ChipSelect assertion and first Data-Bit, the delay between the last Data-Bit and the de-assertion and the minimum delay between two ChipSelects. The inter-frame delays also know as Inter-Data Idleness, controls the delay between frames. (one transaction of nbits as configured with SPI_SETBITS). This option enables the setdelay() interface method. config SPI_TRIGGER bool "SPI DMA trigger" default n select SPI_HWFEATURES depends on SPI_EXCHANGE ---help--- Some architectures benefit from delaying the start of DMA from the DMA setup. If this option is selected, then an SPI_TRIGGER() method is supported: The DMA is setup with in in SPI_EXCHANGE() but does not actually begin until SPI_TRIGGER() is called. config SPI_DRIVER bool "SPI character driver" default n depends on SPI_EXCHANGE ---help--- Build in support for a character driver at /dev/spi[N] that may be used to perform SPI bus transfers from applications. The intent of this driver is to support SPI testing. It is not suitable for use in any real driver application. config SPI_BITBANG bool "SPI bit-bang device" default n ---help--- Enable support for a generic SPI bit-bang device. See include/nuttx/spi/spi_bitbang.h for further information. if SPI_BITBANG config SPI_BITBANG_VARWIDTH bool "SPI bit-bang variable width transfers" default n ---help--- Enable support for a variable data width transfers. Default: 8-bit only. endif # SPI_BITBANG endif # SPI