You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ra...@apache.org on 2023/06/05 07:25:38 UTC

[nuttx] branch master updated (961a68b4cf -> add569d0e5)

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

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


    from 961a68b4cf arch/arm: initial FPU support for armv8r aarch32
     new 694c0f0b7f usbhost/cdcacm: Fix the compiler warning when serial dma is enabled
     new add569d0e5 arch/sim: Replace uart_[xmit|recv]chars_dma with uart_dma[txavail|rxfree]

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 arch/sim/src/sim/sim_uart.c      | 17 ++++++++++++-----
 drivers/usbhost/usbhost_cdcacm.c | 12 +++++++++++-
 2 files changed, 23 insertions(+), 6 deletions(-)


[nuttx] 01/02: usbhost/cdcacm: Fix the compiler warning when serial dma is enabled

Posted by ra...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 694c0f0b7f8f7afafc832c2f93f3fad870248ea9
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sat Jun 3 20:19:54 2023 +0800

    usbhost/cdcacm: Fix the compiler warning when serial dma is enabled
    
    CP:  nuttx/nuttx/include/nuttx/config.h
    CC:  mqueue/mq_sndinternal.c usbhost/usbhost_cdcacm.c:435:3: warning: initialization of ‘void (*)(struct uart_dev_s *)’ from incompatible pointer type ‘void (*)(struct uart_dev_s *, _Bool)’ [-Wincompatible-pointer-types]
      435 |   usbhost_txint,         /* txinit */
          |   ^~~~~~~~~~~~~
    usbhost/usbhost_cdcacm.c:435:3: note: (near initialization for ‘g_uart_ops.dmareceive’)
    usbhost/usbhost_cdcacm.c:436:3: warning: initialization of ‘void (*)(struct uart_dev_s *)’ from incompatible pointer type ‘_Bool (*)(struct uart_dev_s *)’ [-Wincompatible-pointer-types]
      436 |   usbhost_txready,       /* txready */
          |   ^~~~~~~~~~~~~~~
    usbhost/usbhost_cdcacm.c:436:3: note: (near initialization for ‘g_uart_ops.dmarxfree’)
    usbhost/usbhost_cdcacm.c:437:3: warning: initialization of ‘void (*)(struct uart_dev_s *)’ from incompatible pointer type ‘_Bool (*)(struct uart_dev_s *)’ [-Wincompatible-pointer-types]
      437 |   usbhost_txempty        /* txempty */
          |   ^~~~~~~~~~~~~~~
    usbhost/usbhost_cdcacm.c:437:3: note: (near initialization for ‘g_uart_ops.dmatxavail’)
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 drivers/usbhost/usbhost_cdcacm.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/usbhost/usbhost_cdcacm.c b/drivers/usbhost/usbhost_cdcacm.c
index fb900fe3d8..4dc4e2c99f 100644
--- a/drivers/usbhost/usbhost_cdcacm.c
+++ b/drivers/usbhost/usbhost_cdcacm.c
@@ -425,11 +425,21 @@ static const struct uart_ops_s g_uart_ops =
   usbhost_attach,        /* attach */
   usbhost_detach,        /* detach */
   usbhost_ioctl,         /* ioctl */
-  NULL           ,       /* receive */
+  NULL,                  /* receive */
   usbhost_rxint,         /* rxinit */
   usbhost_rxavailable,   /* rxavailable */
 #ifdef CONFIG_SERIAL_IFLOWCONTROL
   usbhost_rxflowcontrol, /* rxflowcontrol */
+#endif
+#ifdef CONFIG_SERIAL_TXDMA
+  NULL,                  /* dmasend */
+#endif
+#ifdef CONFIG_SERIAL_RXDMA
+  NULL,                  /* dmareceive */
+  NULL,                  /* dmarxfree */
+#endif
+#ifdef CONFIG_SERIAL_TXDMA
+  NULL,                  /* dmatxavail */
 #endif
   NULL,                  /* send */
   usbhost_txint,         /* txinit */


[nuttx] 02/02: arch/sim: Replace uart_[xmit|recv]chars_dma with uart_dma[txavail|rxfree]

Posted by ra...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit add569d0e5f8d0af5a53af217c0ba2fb31ffddfb
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sat Jun 3 20:46:24 2023 +0800

    arch/sim: Replace uart_[xmit|recv]chars_dma with uart_dma[txavail|rxfree]
    
    to follow the original dma design
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/sim/src/sim/sim_uart.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/arch/sim/src/sim/sim_uart.c b/arch/sim/src/sim/sim_uart.c
index ee8d71ef79..f2e2d97263 100644
--- a/arch/sim/src/sim/sim_uart.c
+++ b/arch/sim/src/sim/sim_uart.c
@@ -421,19 +421,19 @@ static void tty_work(void *arg)
       return;
     }
 
-  if (priv->txint && host_uart_checkout(dev->isconsole ? 1 : priv->fd))
+  if (priv->txint)
     {
 #ifdef CONFIG_SIM_UART_DMA
-      uart_xmitchars_dma(dev);
+      uart_dmatxavail(dev);
 #else
       uart_xmitchars(dev);
 #endif
     }
 
-  if (priv->rxint && host_uart_checkin(priv->fd))
+  if (priv->rxint)
     {
 #ifdef CONFIG_SIM_UART_DMA
-      uart_recvchars_dma(dev);
+      uart_dmarxfree(dev);
 #else
       uart_recvchars(dev);
 #endif
@@ -511,6 +511,10 @@ static bool tty_rxflowcontrol(struct uart_dev_s *dev,
 
 static void tty_dmatxavail(FAR struct uart_dev_s *dev)
 {
+  if (uart_txready(dev))
+    {
+      uart_xmitchars_dma(dev);
+    }
 }
 
 /****************************************************************************
@@ -557,6 +561,10 @@ static void tty_dmasend(FAR struct uart_dev_s *dev)
 
 static void tty_dmarxfree(FAR struct uart_dev_s *dev)
 {
+  if (uart_rxavailable(dev))
+    {
+      uart_recvchars_dma(dev);
+    }
 }
 
 /****************************************************************************
@@ -730,4 +738,3 @@ int up_putc(int ch)
 #endif
   return 0;
 }
-