You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/10/03 00:55:22 UTC

(nuttx) 04/04: drivers/usbdev/cdcacm.c: Fix compilation issues

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit a88693f51957349b33e54ddc87fd6108a59fd991
Author: Jukka Laitinen <ju...@ssrc.tii.ae>
AuthorDate: Wed Oct 2 13:49:48 2024 +0300

    drivers/usbdev/cdcacm.c: Fix compilation issues
    
    Add #ifdef CONFIG_SERIAL_TXDMA/RXDMA in g_uartops init
    
    Signed-off-by: Jukka Laitinen <ju...@ssrc.tii.ae>
---
 drivers/usbdev/cdcacm.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/usbdev/cdcacm.c b/drivers/usbdev/cdcacm.c
index e06b7ba19e..a7e6260ba6 100644
--- a/drivers/usbdev/cdcacm.c
+++ b/drivers/usbdev/cdcacm.c
@@ -265,12 +265,18 @@ static const struct uart_ops_s g_uartops =
 #ifdef CONFIG_SERIAL_IFLOWCONTROL
   cdcuart_rxflowcontrol, /* rxflowcontrol */
 #endif
+#ifdef CONFIG_SERIAL_TXDMA
   cdcuart_dmasend,       /* dmasend */
+#endif
+#ifdef CONFIG_SERIAL_RXDMA
   cdcuart_dmareceive,    /* dmareceive */
   NULL,                  /* dmarxfree */
+#endif
+#ifdef CONFIG_SERIAL_TXDMA
   NULL,                  /* dmatxavail */
+#endif
   NULL,                  /* send */
-  cdcuart_txint,         /* txinit */
+  cdcuart_txint,         /* txint */
   cdcuart_txready,       /* txready */
   cdcuart_txempty,       /* txempty */
   cdcuart_release,       /* release */