davids5 commented on code in PR #7932:
URL: https://github.com/apache/nuttx/pull/7932#discussion_r1052503937


##########
arch/arm/src/s32k3xx/s32k3xx_serial.c:
##########
@@ -1091,99 +1435,295 @@ static const struct uart_ops_s g_uart_ops =
   .rxint          = s32k3xx_rxint,
   .rxavailable    = s32k3xx_rxavailable,
 #ifdef CONFIG_SERIAL_IFLOWCONTROL
-  .rxflowcontrol  = NULL,
+  .rxflowcontrol  = s32k3xx_rxflowcontrol,
 #endif
   .send           = s32k3xx_send,
   .txint          = s32k3xx_txint,
   .txready        = s32k3xx_txready,
   .txempty        = s32k3xx_txempty,
 };
+#endif
+
+#if defined(SERIAL_HAVE_RXDMA) && defined(SERIAL_HAVE_TXDMA)
+static const struct uart_ops_s g_lpuart_rxtxdma_ops =
+{
+  .setup          = s32k3xx_dma_setup,
+  .shutdown       = s32k3xx_dma_shutdown,
+  .attach         = s32k3xx_attach,
+  .detach         = s32k3xx_detach,
+  .ioctl          = s32k3xx_ioctl,
+  .receive        = s32k3xx_dma_receive,
+  .rxint          = s32k3xx_dma_rxint,
+  .rxavailable    = s32k3xx_dma_rxavailable,
+#ifdef CONFIG_SERIAL_IFLOWCONTROL
+  .rxflowcontrol  = s32k3xx_rxflowcontrol,
+#endif
+  .send           = s32k3xx_send,
+  .txint          = s32k3xx_dma_txint,
+  .txready        = s32k3xx_txready,
+  .txempty        = s32k3xx_txempty,
+  .dmatxavail     = s32k3xx_dma_txavailable,
+  .dmasend        = s32k3xx_dma_send,
+};
+#endif
+
+#if !defined(SERIAL_HAVE_ONLY_DMA) && defined(SERIAL_HAVE_RXDMA)
+static const struct uart_ops_s g_lpuart_rxdma_ops =
+{
+  .setup          = s32k3xx_dma_setup,
+  .shutdown       = s32k3xx_dma_shutdown,
+  .attach         = s32k3xx_attach,
+  .detach         = s32k3xx_detach,
+  .ioctl          = s32k3xx_ioctl,
+  .receive        = s32k3xx_dma_receive,
+  .rxint          = s32k3xx_dma_rxint,
+  .rxavailable    = s32k3xx_dma_rxavailable,
+#ifdef CONFIG_SERIAL_IFLOWCONTROL
+  .rxflowcontrol  = s32k3xx_rxflowcontrol,
+#endif
+  .send           = s32k3xx_send,
+  .txint          = s32k3xx_txint,
+  .txready        = s32k3xx_txready,
+  .txempty        = s32k3xx_txempty,
+};
+#endif
+
+#if !defined(SERIAL_HAVE_ONLY_DMA) && defined(SERIAL_HAVE_TXDMA)
+static const struct uart_ops_s g_lpuart_txdma_ops =
+{
+    .setup          = s32k3xx_dma_setup,
+    .shutdown       = s32k3xx_dma_shutdown,
+    .attach         = s32k3xx_attach,
+    .detach         = s32k3xx_detach,
+    .ioctl          = s32k3xx_ioctl,
+    .receive        = s32k3xx_receive,
+    .rxint          = s32k3xx_rxint,
+    .rxavailable    = s32k3xx_rxavailable,
+  #ifdef CONFIG_SERIAL_IFLOWCONTROL
+    .rxflowcontrol  = s32k3xx_rxflowcontrol,
+  #endif
+    .send           = s32k3xx_send,
+    .txint          = s32k3xx_dma_txint,
+    .txready        = s32k3xx_txready,
+    .txempty        = s32k3xx_txempty,
+    .dmatxavail     = s32k3xx_dma_txavailable,
+    .dmasend        = s32k3xx_dma_send,
+};
+#endif

Review Comment:
   hmmm...Maybe not... You can have one port with only TX and another with only 
RX DMA and then one with none and one with both. So the tables can not be 
reduced.



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