You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2022/03/16 22:06:52 UTC

[incubator-nuttx] branch master updated (b302173 -> 39e9a17)

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

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


    from b302173  Revert "zig-build added"
     new 57273ad  xtensa/esp32s3: Fix IRQ setup hardcoded to CPU 0
     new 0dc2930  xtensa/esp32s3: Remove code for not yet supported USB-Serial Driver
     new 39e9a17  xtensa/esp32s3: Apply style fixes throughout serial driver

The 3 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/xtensa/src/esp32s3/esp32s3_lowputc.c |  3 --
 arch/xtensa/src/esp32s3/esp32s3_serial.c  | 84 +++++++++++++------------------
 2 files changed, 34 insertions(+), 53 deletions(-)

[incubator-nuttx] 01/03: xtensa/esp32s3: Fix IRQ setup hardcoded to CPU 0

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

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

commit 57273ad9946ba68ea96eb78dbb7d5f9358d61ab8
Author: Gustavo Henrique Nihei <gu...@espressif.com>
AuthorDate: Wed Mar 16 13:49:48 2022 -0300

    xtensa/esp32s3: Fix IRQ setup hardcoded to CPU 0
    
    Signed-off-by: Gustavo Henrique Nihei <gu...@espressif.com>
---
 arch/xtensa/src/esp32s3/esp32s3_serial.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/xtensa/src/esp32s3/esp32s3_serial.c b/arch/xtensa/src/esp32s3/esp32s3_serial.c
index 3b18965..c2fb972 100644
--- a/arch/xtensa/src/esp32s3/esp32s3_serial.c
+++ b/arch/xtensa/src/esp32s3/esp32s3_serial.c
@@ -463,7 +463,7 @@ static int esp32s3_attach(struct uart_dev_s *dev)
   /* Set up to receive peripheral interrupts on the current CPU */
 
   priv->cpu = up_cpu_index();
-  priv->cpuint = esp32s3_setup_irq(0, priv->periph, priv->int_pri,
+  priv->cpuint = esp32s3_setup_irq(priv->cpu, priv->periph, priv->int_pri,
                                    ESP32S3_CPUINT_LEVEL);
   if (priv->cpuint < 0)
     {

[incubator-nuttx] 02/03: xtensa/esp32s3: Remove code for not yet supported USB-Serial Driver

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

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

commit 0dc2930403325e88835ccb2f62cd921917199849
Author: Gustavo Henrique Nihei <gu...@espressif.com>
AuthorDate: Wed Mar 16 13:53:36 2022 -0300

    xtensa/esp32s3: Remove code for not yet supported USB-Serial Driver
    
    Signed-off-by: Gustavo Henrique Nihei <gu...@espressif.com>
---
 arch/xtensa/src/esp32s3/esp32s3_lowputc.c |  3 ---
 arch/xtensa/src/esp32s3/esp32s3_serial.c  | 13 -------------
 2 files changed, 16 deletions(-)

diff --git a/arch/xtensa/src/esp32s3/esp32s3_lowputc.c b/arch/xtensa/src/esp32s3/esp32s3_lowputc.c
index c0c1b48..fe0f721 100644
--- a/arch/xtensa/src/esp32s3/esp32s3_lowputc.c
+++ b/arch/xtensa/src/esp32s3/esp32s3_lowputc.c
@@ -812,9 +812,6 @@ void up_lowputc(char ch)
   /* Then send the character */
 
   esp32s3_lowputc_send_byte(priv, ch);
-
-#elif defined (CONFIG_ESP32S3_USBSERIAL)
-  esp32s3_usbserial_write(ch);
 #endif /* CONSOLE_UART */
 }
 
diff --git a/arch/xtensa/src/esp32s3/esp32s3_serial.c b/arch/xtensa/src/esp32s3/esp32s3_serial.c
index c2fb972..acc2b26 100644
--- a/arch/xtensa/src/esp32s3/esp32s3_serial.c
+++ b/arch/xtensa/src/esp32s3/esp32s3_serial.c
@@ -51,10 +51,6 @@
 #include "esp32s3_irq.h"
 #include "esp32s3_lowputc.h"
 
-#ifdef CONFIG_ESP32S3_USBSERIAL
-#  include "esp32s3_usbserial.h"
-#endif
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
@@ -96,11 +92,6 @@
 #  endif
 #endif /* CONSOLE_UART */
 
-#ifdef CONFIG_ESP32S3_USBSERIAL
-#  define CONSOLE_DEV           g_uart_usbserial
-#  define TTYACM0_DEV           g_uart_usbserial
-#endif
-
 /* Pick ttys1 */
 
 #if defined(CONFIG_ESP32S3_UART0) && !defined(UART0_ASSIGNED)
@@ -1093,10 +1084,6 @@ void xtensa_serialinit(void)
 #ifdef TTYS1_DEV
   uart_register("/dev/ttyS1", &TTYS1_DEV);
 #endif
-
-#ifdef CONFIG_ESP32S3_USBSERIAL
-  uart_register("/dev/ttyACM0", &TTYACM0_DEV);
-#endif
 }
 
 /****************************************************************************

[incubator-nuttx] 03/03: xtensa/esp32s3: Apply style fixes throughout serial driver

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

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

commit 39e9a17e600b0ed079aea7e86bb98ff8ad1b009d
Author: Gustavo Henrique Nihei <gu...@espressif.com>
AuthorDate: Wed Mar 16 13:55:02 2022 -0300

    xtensa/esp32s3: Apply style fixes throughout serial driver
    
    Signed-off-by: Gustavo Henrique Nihei <gu...@espressif.com>
---
 arch/xtensa/src/esp32s3/esp32s3_serial.c | 69 +++++++++++++++-----------------
 1 file changed, 33 insertions(+), 36 deletions(-)

diff --git a/arch/xtensa/src/esp32s3/esp32s3_serial.c b/arch/xtensa/src/esp32s3/esp32s3_serial.c
index acc2b26..a560fa2 100644
--- a/arch/xtensa/src/esp32s3/esp32s3_serial.c
+++ b/arch/xtensa/src/esp32s3/esp32s3_serial.c
@@ -23,40 +23,37 @@
  ****************************************************************************/
 
 #include <nuttx/config.h>
-#include <nuttx/arch.h>
-#include <nuttx/irq.h>
-#include <nuttx/serial/serial.h>
-#include <nuttx/fs/ioctl.h>
 
-#include <sys/types.h>
-#include <stdint.h>
-#include <stdbool.h>
-#include <unistd.h>
-#include <string.h>
 #include <assert.h>
-#include <errno.h>
 #include <debug.h>
-
+#include <errno.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <string.h>
+#include <sys/types.h>
 #ifdef CONFIG_SERIAL_TERMIOS
 #  include <termios.h>
 #endif
+#include <unistd.h>
 
-#include "xtensa.h"
-#include "chip.h"
-
-#include "hardware/esp32s3_uart.h"
-#include "hardware/esp32s3_system.h"
+#include <nuttx/arch.h>
+#include <nuttx/fs/ioctl.h>
+#include <nuttx/irq.h>
+#include <nuttx/serial/serial.h>
 
+#include "xtensa.h"
 #include "esp32s3_config.h"
 #include "esp32s3_irq.h"
 #include "esp32s3_lowputc.h"
+#include "hardware/esp32s3_uart.h"
+#include "hardware/esp32s3_system.h"
 
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
 
-/* The console is enabled, and it's not the syslog device,
- * so, it should be a serial device.
+/* The console is enabled, and it's not the syslog device, so, it should be a
+ * serial device.
  */
 
 #ifdef USE_SERIALDRIVER
@@ -67,8 +64,8 @@
  * Console can be UART0 or UART1, but will always be ttys0.
  */
 
-/* In case a UART was assigned to be
- * the console and the corresponding peripheral was also selected.
+/* In case a UART was assigned to be the console and the corresponding
+ * peripheral was also selected.
  */
 
 #ifdef CONSOLE_UART
@@ -92,7 +89,7 @@
 #  endif
 #endif /* CONSOLE_UART */
 
-/* Pick ttys1 */
+/* Pick ttyS1 */
 
 #if defined(CONFIG_ESP32S3_UART0) && !defined(UART0_ASSIGNED)
 #  define TTYS1_DEV           g_uart0_dev  /* UART0 is ttyS1 */
@@ -140,21 +137,21 @@ static bool esp32s3_rxflowcontrol(struct uart_dev_s *dev,
 
 static struct uart_ops_s g_uart_ops =
 {
-  .setup       = esp32s3_setup,
-  .shutdown    = esp32s3_shutdown,
-  .attach      = esp32s3_attach,
-  .detach      = esp32s3_detach,
-  .txint       = esp32s3_txint,
-  .rxint       = esp32s3_rxint,
-  .rxavailable = esp32s3_rxavailable,
-  .txready     = esp32s3_txready,
-  .txempty     = esp32s3_txempty,
-  .send        = esp32s3_send,
-  .receive     = esp32s3_receive,
-  .ioctl       = esp32s3_ioctl,
+  .setup         = esp32s3_setup,
+  .shutdown      = esp32s3_shutdown,
+  .attach        = esp32s3_attach,
+  .detach        = esp32s3_detach,
+  .ioctl         = esp32s3_ioctl,
+  .receive       = esp32s3_receive,
+  .rxint         = esp32s3_rxint,
+  .rxavailable   = esp32s3_rxavailable,
 #ifdef CONFIG_SERIAL_IFLOWCONTROL
-  .rxflowcontrol  = esp32s3_rxflowcontrol,
+  .rxflowcontrol = esp32s3_rxflowcontrol,
 #endif
+  .send          = esp32s3_send,
+  .txint         = esp32s3_txint,
+  .txready       = esp32s3_txready,
+  .txempty       = esp32s3_txempty
 };
 
 /* UART 0 */
@@ -678,7 +675,7 @@ static bool esp32s3_txempty(struct uart_dev_s *dev)
 
 static void esp32s3_send(struct uart_dev_s *dev, int ch)
 {
-  esp32s3_lowputc_send_byte(dev->priv, ch);
+  esp32s3_lowputc_send_byte(dev->priv, (char)ch);
 }
 
 /****************************************************************************
@@ -1111,7 +1108,7 @@ int up_putc(int ch)
       up_lowputc('\r');
     }
 
-  up_lowputc(ch);
+  up_lowputc((char)ch);
 
 #ifdef CONSOLE_UART
   esp32s3_lowputc_restore_all_uart_int(CONSOLE_DEV.priv, &int_status);