donghengqaz commented on a change in pull request #1610:
URL: https://github.com/apache/incubator-nuttx/pull/1610#discussion_r474372984



##########
File path: arch/xtensa/src/esp32/esp32_spi.c
##########
@@ -46,18 +46,33 @@
 #include "esp32_spi.h"
 #include "esp32_gpio.h"
 #include "esp32_cpuint.h"
+#include "esp32_dma.h"
 
 #include "xtensa.h"
 #include "hardware/esp32_gpio_sigmap.h"
 #include "hardware/esp32_dport.h"
 #include "hardware/esp32_spi.h"
 #include "hardware/esp32_soc.h"
+#include "hardware/esp32_pinmap.h"
 #include "rom/esp32_gpio.h"
 
 /****************************************************************************
  * Private Types
  ****************************************************************************/
 
+/* SPI DMA hardware channel number */
+
+#define SPI_DMA_CHAN      (2)
+
+/* SPI DMA RX/TX description number */
+
+#define SPI_DMADESC_NUM   (CONFIG_SPI_DMADESC_NUM)

Review comment:
       The driver adds EOF and "next=NULL" into to the last DMA description to 
tell hardware that this is the last node, so that we don't need to add en extra 
one.

##########
File path: arch/xtensa/src/esp32/esp32_spi.c
##########
@@ -46,18 +46,33 @@
 #include "esp32_spi.h"
 #include "esp32_gpio.h"
 #include "esp32_cpuint.h"
+#include "esp32_dma.h"
 
 #include "xtensa.h"
 #include "hardware/esp32_gpio_sigmap.h"
 #include "hardware/esp32_dport.h"
 #include "hardware/esp32_spi.h"
 #include "hardware/esp32_soc.h"
+#include "hardware/esp32_pinmap.h"
 #include "rom/esp32_gpio.h"
 
 /****************************************************************************
  * Private Types
  ****************************************************************************/
 
+/* SPI DMA hardware channel number */
+
+#define SPI_DMA_CHAN      (2)
+
+/* SPI DMA RX/TX description number */
+
+#define SPI_DMADESC_NUM   (CONFIG_SPI_DMADESC_NUM)

Review comment:
       The driver adds EOF and "next=NULL" into to the last DMA description to 
tell hardware that this is the last node, so that we don't need to add an extra 
one.




----------------------------------------------------------------
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:
[email protected]


Reply via email to