You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/05/27 12:20:34 UTC

[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #3787: drivers/spi: Add SPI Slave character device driver

gustavonihei commented on a change in pull request #3787:
URL: https://github.com/apache/incubator-nuttx/pull/3787#discussion_r640568956



##########
File path: drivers/spi/Kconfig
##########
@@ -26,21 +26,77 @@ menuconfig SPI
 if SPI
 
 config SPI_SLAVE
-	bool "SPI slave"
+	bool "SPI Slave"
 	default n
 	---help---
-		Enable support for SPI slave features
+		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.
+		This may be used as the SPI Slave controller first TX transfer.

Review comment:
       Thanks, I've applied your suggestion.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org