xiaoxiang781216 commented on code in PR #16866:
URL: https://github.com/apache/nuttx/pull/16866#discussion_r2288010299


##########
boards/xtensa/esp32s3/esp32s3-devkit/src/esp32s3_bringup.c:
##########
@@ -188,15 +192,34 @@ int esp32s3_bringup(void)
 #endif
 
 #if defined(CONFIG_ESP32S3_SPI) && defined(CONFIG_SPI_DRIVER)
-  #ifdef CONFIG_ESP32S3_SPI2
+
+  #if defined(CONFIG_SPI_SLAVE_DRIVER) && defined(CONFIG_ESP32S3_SPI2)
+  ret = board_spislavedev_initialize(ESP32S3_SPI2);
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "Failed to initialize SPI%d Slave driver: %d\n",
+             ESP32S3_SPI2, ret);
+    }
+  #endif
+
+  #if defined(CONFIG_SPI_SLAVE_DRIVER) && defined(CONFIG_ESP32S3_SPI3)
+  ret = board_spislavedev_initialize(ESP32S3_SPI3);
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "Failed to initialize SPI%d Slave driver: %d\n",
+             ESP32S3_SPI2, ret);
+    }
+  #endif
+
+  #if  defined(CONFIG_ESP32S3_SPI2) && !defined(CONFIG_SPI_SLAVE_DRIVER)

Review Comment:
   `#if defined(CONFIG_ESP32S3_SPI2) && !defined(CONFIG_SPI_SLAVE_DRIVER)`



##########
boards/xtensa/esp32s3/common/src/esp32s3_board_spislavedev.c:
##########
@@ -32,7 +32,7 @@
 
 #include <nuttx/spi/slave.h>
 
-#include "esp32s3_spi.h"
+#include "esp32s3_board_spislavedev.h"

Review Comment:
   ditto



##########
boards/xtensa/esp32s3/common/src/Make.defs:
##########
@@ -36,9 +36,10 @@ endif
 
 ifeq ($(CONFIG_SPI_DRIVER),y)
   CSRCS += esp32s3_board_spidev.c
-  ifeq ($(CONFIG_SPI_SLAVE_DRIVER),y)
-    CSRCS += esp32s3_board_spislavedev.c
-  endif
+endif
+
+ifeq ($(CONFIG_SPI_SLAVE_DRIVER),y)
+  CSRCS += esp32s3_board_spislavedev.c

Review Comment:
   please organize your patch in the reasonable patch



##########
boards/xtensa/esp32s3/common/include/esp32s3_board_spislavedev.h:
##########
@@ -1,5 +1,5 @@
 /****************************************************************************
- * boards/xtensa/esp32s2/common/include/esp32s2_board_spislavedev.h
+ * boards/xtensa/esp32s3/common/include/esp32s3_board_spislavedev.h

Review Comment:
   merge this patch to:
   
https://github.com/apache/nuttx/pull/16866/commits/4bb93d3539033e5fa9bfccb06d49e6d9e4e9b2e4



##########
boards/xtensa/esp32s3/common/src/esp32s3_board_spislavedev.c:
##########
@@ -1,5 +1,5 @@
 /****************************************************************************
- * boards/xtensa/esp32s2/common/src/esp32s2_board_spislavedev.c
+ * boards/xtensa/esp32s3/common/src/esp32s3_board_spislavedev.c

Review Comment:
   merge to the first patch



##########
boards/xtensa/esp32s3/common/src/esp32s3_board_spislavedev.c:
##########
@@ -32,7 +32,7 @@
 
 #include <nuttx/spi/slave.h>
 
-#include "esp32s3_board_spislavedev.h"
+#include "esp32s3_spi.h"

Review Comment:
   why you change this line several time? let's squash into one patch



-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

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

Reply via email to