cwespressif commented on code in PR #11853:
URL: https://github.com/apache/nuttx/pull/11853#discussion_r1514330060


##########
arch/xtensa/src/esp32s3/esp32s3_dma.c:
##########
@@ -230,34 +231,75 @@ void esp32s3_dma_release(int chan)
  *   pbuf    - RX/TX buffer pointer
  *   len     - RX/TX buffer length
  *   tx      - true: TX mode (transmitter); false: RX mode (receiver)
+ *   chan    - DMA channel of the receiver/transmitter
  *
  * Returned Value:
  *   Bound pbuf data bytes
  *
  ****************************************************************************/
 
 uint32_t esp32s3_dma_setup(struct esp32s3_dmadesc_s *dmadesc, uint32_t num,
-                           uint8_t *pbuf, uint32_t len, bool tx)
+                           uint8_t *pbuf, uint32_t len, bool tx, int chan)
 {
   int i;
   uint32_t regval;
   uint32_t bytes = len;
   uint8_t *pdata = pbuf;
   uint32_t data_len;
   uint32_t buf_len;
+  int alignment = 4;
+  int dma_size = ESP32S3_DMA_BUFFER_MAX_SIZE;
+  bool buffer_in_psram = esp32s3_ptr_extram(pdata);
+  int block_size_index = 0;
 
   DEBUGASSERT(dmadesc != NULL);
   DEBUGASSERT(num > 0);
   DEBUGASSERT(pbuf != NULL);
   DEBUGASSERT(len > 0);
+  DEBUGASSERT(chan >= 0 && chan  < ESP32S3_DMA_CHAN_MAX);
 
-  for (i = 0; i < num; i++)
+  uint32_t addr = GDMA_CH_REG_ADDR(DMA_IN_CONF0_CH0_REG, chan);
+  bool burst_en = REG_GET_FIELD(addr, DMA_IN_DATA_BURST_EN_CH0);

Review Comment:
   Done



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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to