[GitHub] [nuttx] midokura-xavi92 commented on a diff in pull request #6718: add CMake build system support (Enhance #3704)

2023-03-28 Thread via GitHub


midokura-xavi92 commented on code in PR #6718:
URL: https://github.com/apache/nuttx/pull/6718#discussion_r1150361452


##
CMakeLists.txt:
##
@@ -0,0 +1,664 @@
+# 
##
+# CMakeLists.txt
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more 
contributor
+# license agreements.  See the NOTICE file distributed with this work for
+# additional information regarding copyright ownership.  The ASF licenses this
+# file to you under the Apache License, Version 2.0 (the "License"); you may 
not
+# use this file except in compliance with the License.  You may obtain a copy 
of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations under
+# the License.
+#
+# 
##
+
+# Request a version available on latest Ubuntu LTS (20.04)
+
+cmake_minimum_required(VERSION 3.16)
+
+# Handle newer CMake versions correctly by setting policies
+
+if(POLICY CMP0115)
+  # do not auto-guess extension in target_sources()
+  cmake_policy(SET CMP0115 NEW)
+endif()
+
+# Basic CMake configuration ##
+
+set(CMAKE_CXX_STANDARD 14)
+set(CMAKE_CXX_EXTENSIONS OFF)
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
+set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
+
+# Setup build type (Debug Release RelWithDebInfo MinSizeRel Coverage). Default
+# to minimum size release
+
+# Use nuttx optimization configuration options, workaround for cmake build type
+# TODO Integration the build type with CMAKE
+
+# if (NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "MinSizeRel" CACHE STRING
+# "Build type" FORCE) endif() set_property(CACHE CMAKE_BUILD_TYPE PROPERTY
+# STRINGS "Debug;Release;RelWithDebInfo;MinSizeRel")
+
+# Process board config & directory locations #
+
+set(NUTTX_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+set(NUTTX_APPS_DIR
+"../apps"

Review Comment:
   Looks great, thank you!



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



[GitHub] [nuttx] fjpanag commented on a diff in pull request #8911: asprintf: Fixed possible memory leak if print fails.

2023-03-28 Thread via GitHub


fjpanag commented on code in PR #8911:
URL: https://github.com/apache/nuttx/pull/8911#discussion_r1150376378


##
libs/libc/stdio/lib_vasprintf.c:
##
@@ -119,14 +119,18 @@ int vasprintf(FAR char **ptr, FAR const IPTR char *fmt, 
va_list ap)
 #endif
 
   /* Return a pointer to the string to the caller.  NOTE: the memstream put()
-   * method has already added the NUL terminator to the end of the string
+   * method has already added the NULL terminator to the end of the string

Review Comment:
   First time I ever see it written like that... I thought it was a typo.
   
   Anyway, fixed.



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



[GitHub] [nuttx] pussuw opened a new issue, #8917: nxsem_wait_irq with MMU

2023-03-28 Thread via GitHub


pussuw opened a new issue, #8917:
URL: https://github.com/apache/nuttx/issues/8917

   I have encountered a little issue with semaphores, and nxsem_wait_irq which 
is used to wake the process waiting for a sempahore and do other cleanup i.e. 
handle priority inheritance etc. 
   
   The issue arises when nxsem_wait_irq is called from ISR or from the signal 
dispatch logic; while it works like a charm with flat addressing, it fails when 
virtual memory is in use.
   
   The issue obviously is that sem_t is userspace data, and if the current task 
is not the one holding / waiting for the semaphore, the clean up fails due to 
wrong mappings.
   
   Now, the solution might be as simple as changing the mappings temporarily to 
the semaphore holder's mappings, but this to me seems like quite a heavy 
operation. At least the TLB is lost, maybe with other side effects as well.
   
   So I created this issue to open discussion about the subject. Is this a more 
generic problem (affecting more than just the semaphore API), needing a generic 
solution ? Has anyone ever thought of this issue and how to fix it ? Maybe 
coming up with a solution but no time to implement it ? If so I'll be more than 
happy to do the fix and test it.
   
   Regardless, I will present a patch (and reference this issue there) where 
the mappings are just swapped because that works and is a way to fix the issue. 
The issue is easier to grasp this way I think.


-- 
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.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [nuttx] pussuw opened a new pull request, #8918: Sem waitirq mmu fix

2023-03-28 Thread via GitHub


pussuw opened a new pull request, #8918:
URL: https://github.com/apache/nuttx/pull/8918

   ## Summary
   When MMU is in use, sem_waitirq fails because it tries to access sem_t (the 
waited object) which is user memory. This either results in page fault (crash) 
o access to the wrong address environment (crash later). This fixes the issue 
by:
   - Allowing user memory access from idle process (this is a more generic bug, 
fixed here)
   - Swapping to the correct address environment when accessing waitobj
   
   ## Impact
   Builds with MMU only (CONFIG_BUILD_KERNEL)
   
   ## Testing
   icicle:knsh
   


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



[GitHub] [nuttx] pussuw commented on issue #8917: nxsem_wait_irq with MMU

2023-03-28 Thread via GitHub


pussuw commented on issue #8917:
URL: https://github.com/apache/nuttx/issues/8917#issuecomment-148385

   Another option that comes to mind would be to temporarily map the user 
semaphore data to a kernel scratch area but this is quite a lot of work, as the 
physical page is needed and this is not easily obtainable. A significant amount 
of new mm related bookkeeping would be needed for this solution.


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



[GitHub] [nuttx] lucasssvaz commented on a diff in pull request #8913: boards: Fix broken defconfigs

2023-03-28 Thread via GitHub


lucasssvaz commented on code in PR #8913:
URL: https://github.com/apache/nuttx/pull/8913#discussion_r1150426033


##
tools/ci/testlist/arm-10.dat:
##
@@ -4,7 +4,7 @@
 
 /arm/stm32/stm32f103-minimum,CONFIG_ARM_TOOLCHAIN_GNU_EABI
 
-/arm/stm32/stm32f334-disco,CONFIG_ARM_TOOLCHAIN_CLANG
+/arm/stm32/stm32f334-disco,CONFIG_ARM_TOOLCHAIN_GNU_EABI

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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [nuttx] lucasssvaz commented on a diff in pull request #8913: boards: Fix broken defconfigs

2023-03-28 Thread via GitHub


lucasssvaz commented on code in PR #8913:
URL: https://github.com/apache/nuttx/pull/8913#discussion_r1150426264


##
boards/arm/stm32/nucleo-f302r8/configs/qenco/defconfig:
##
@@ -17,24 +71,40 @@ CONFIG_ARCH_INTERRUPTSTACK=1024
 CONFIG_ARCH_IRQPRIO=y
 CONFIG_BOARD_LOOPSPERMSEC=8499
 CONFIG_BUILTIN=y
-CONFIG_DEBUG_FULLOPT=y

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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [nuttx] pkarashchenko commented on a diff in pull request #8911: asprintf: Fixed possible memory leak if print fails.

2023-03-28 Thread via GitHub


pkarashchenko commented on code in PR #8911:
URL: https://github.com/apache/nuttx/pull/8911#discussion_r1150454461


##
libs/libc/stdio/lib_vasprintf.c:
##
@@ -119,14 +119,18 @@ int vasprintf(FAR char **ptr, FAR const IPTR char *fmt, 
va_list ap)
 #endif
 
   /* Return a pointer to the string to the caller.  NOTE: the memstream put()
-   * method has already added the NUL terminator to the end of the string
+   * method has already added the NULL terminator to the end of the string

Review Comment:
   Here is some discussion https://news.ycombinator.com/item?id=1401327
   However I just searched on the Internet and saw that most of the articles 
state "null-terminated", so maybe I was learning C from very old books some 
time ago that still used NUL term for string termination. Seems like your 
change was also correct.



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



[GitHub] [nuttx] pkarashchenko commented on a diff in pull request #8911: asprintf: Fixed possible memory leak if print fails.

2023-03-28 Thread via GitHub


pkarashchenko commented on code in PR #8911:
URL: https://github.com/apache/nuttx/pull/8911#discussion_r1150456626


##
libs/libc/stdio/lib_vasprintf.c:
##
@@ -119,14 +119,18 @@ int vasprintf(FAR char **ptr, FAR const IPTR char *fmt, 
va_list ap)
 #endif
 
   /* Return a pointer to the string to the caller.  NOTE: the memstream put()
-   * method has already added the NUL terminator to the end of the string
+   * method has already added the NULL terminator to the end of the string

Review Comment:
   Also some more info here 
https://www.ibm.com/docs/en/i/7.3?topic=essiccatus-nulls-nuls-in-c-c-applications-that-use-sql



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



[GitHub] [nuttx] davids5 commented on a diff in pull request #8911: asprintf: Fixed possible memory leak if print fails.

2023-03-28 Thread via GitHub


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


##
libs/libc/stdio/lib_vasprintf.c:
##
@@ -119,14 +119,18 @@ int vasprintf(FAR char **ptr, FAR const IPTR char *fmt, 
va_list ap)
 #endif
 
   /* Return a pointer to the string to the caller.  NOTE: the memstream put()
-   * method has already added the NUL terminator to the end of the string
+   * method has already added the NULL terminator to the end of the string

Review Comment:
   Oldtimers remember TTY really being a Teletype terminal. Here is where `NUL` 
is from.

   
![image](https://user-images.githubusercontent.com/1945821/228224038-e2a4ce1d-f8be-4a24-9540-d9ddc7998f67.png)
   



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



[GitHub] [nuttx] lucasssvaz commented on a diff in pull request #8913: boards: Fix broken defconfigs

2023-03-28 Thread via GitHub


lucasssvaz commented on code in PR #8913:
URL: https://github.com/apache/nuttx/pull/8913#discussion_r1150460067


##
tools/ci/testlist/arm-10.dat:
##
@@ -4,7 +4,7 @@
 
 /arm/stm32/stm32f103-minimum,CONFIG_ARM_TOOLCHAIN_GNU_EABI
 
-/arm/stm32/stm32f334-disco,CONFIG_ARM_TOOLCHAIN_CLANG
+/arm/stm32/stm32f334-disco,CONFIG_ARM_TOOLCHAIN_GNU_EABI

Review Comment:
   I'll see what config fails and apply the same optimization to it



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



[GitHub] [nuttx] fjpanag commented on a diff in pull request #8911: asprintf: Fixed possible memory leak if print fails.

2023-03-28 Thread via GitHub


fjpanag commented on code in PR #8911:
URL: https://github.com/apache/nuttx/pull/8911#discussion_r1150464696


##
libs/libc/stdio/lib_vasprintf.c:
##
@@ -119,14 +119,18 @@ int vasprintf(FAR char **ptr, FAR const IPTR char *fmt, 
va_list ap)
 #endif
 
   /* Return a pointer to the string to the caller.  NOTE: the memstream put()
-   * method has already added the NUL terminator to the end of the string
+   * method has already added the NULL terminator to the end of the string

Review Comment:
   Hmm indeed both seem "correct", although the NULL version is much more 
widely adopted. I have never seen it before as NUL (or maybe I also considered 
a typo?).
   
   I propose to leave it as is for the moment. If we want to rectify this, then 
it can be a dedicated PR.
   I see that there are 163 total occurrences in the code base. So, if it is to 
be changed, then it should be done for all of them at the same time, for 
consistency.
   
   



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



[GitHub] [nuttx] Gary-Hobson opened a new pull request, #8919: sched: fix compile error when SCHED_CRITMONITOR is enabled

2023-03-28 Thread via GitHub


Gary-Hobson opened a new pull request, #8919:
URL: https://github.com/apache/nuttx/pull/8919

   ## Summary
   Compilation error occurs after SCHED_CRITMONITOR is enabled
   
   sched/sched_critmonitor.c:315: undefined reference to `serr'
   
   ## Impact
   
   ## Testing
   
   


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



[GitHub] [nuttx] acassis commented on pull request #8913: boards: Fix broken defconfigs

2023-03-28 Thread via GitHub


acassis commented on PR #8913:
URL: https://github.com/apache/nuttx/pull/8913#issuecomment-1486879938

   > > Note that nxsig_timedwait and nxsig_procmask alone represent almost 50% 
of increase, maybe these could be the functions to investigate.
   > 
   > The three biggest increases in function size, is inexplicable. There is a 
very small change to each function but the expansion of the funciton size is 
large. Something else is going on. One would probably have to look at when the 
linker is doing in the disassembly. Here are the code changes:
   > 
   > * Added three functioin calls to nxsig_timedwait: 
[717bb04#diff-c610905678f957e3a394e88cfca1d9c97fc98017d9f5d4103d2707d07883b463](https://github.com/apache/nuttx/commit/717bb04cb7c6f1efb179d40a464e43e7cd13c7d8#diff-c610905678f957e3a394e88cfca1d9c97fc98017d9f5d4103d2707d07883b463)
   > 
   > * Added one function call to nxsig_procmask:  
[717bb04#diff-9688e7f9a0a4d148691d3ab31ac7ebaa2df66c89270533ff21fbb9f969082948](https://github.com/apache/nuttx/commit/717bb04cb7c6f1efb179d40a464e43e7cd13c7d8#diff-9688e7f9a0a4d148691d3ab31ac7ebaa2df66c89270533ff21fbb9f969082948)
   
   Also many options that had a CONFIG flag to enable/disable were removed to 
force the kernel to become more POSIX compatible. An alternative could be 
having a flag CONFIG_NON_POSIX_COMPLIANT to allow disable some of these 
features (like the increased number of signals), this way we could have NuttX 
running again on MCUs with 32KB Flash for example.
   Maybe in this case a NuttShell banner saying "Not POSIX Compliant" could be 
printed to warn the user.
   
   Just some ideas, but of course, if we could keep the functionalities and 
just optimize the code to reduce the flash size, it will be much better!


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



[GitHub] [nuttx] acassis commented on pull request #8919: sched: fix compile error when SCHED_CRITMONITOR is enabled

2023-03-28 Thread via GitHub


acassis commented on PR #8919:
URL: https://github.com/apache/nuttx/pull/8919#issuecomment-1486887383

   @Gary-Hobson it is a good idea to include the info from this Summary in the 
commit log message, this way people will see it in the git local repository.


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



[GitHub] [nuttx] acassis commented on pull request #8915: net/tcp: Reply RST when we cannot receive data

2023-03-28 Thread via GitHub


acassis commented on PR #8915:
URL: https://github.com/apache/nuttx/pull/8915#issuecomment-1486893216

   @wengzhe please include this Summary message in the commit log message.


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



[nuttx] branch master updated (c623a7b731 -> 10f294c026)

2023-03-28 Thread acassis
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/nuttx.git


from c623a7b731 drivers/lcd/st7789: Support mirror X/Y
 add 10f294c026 boards: Fix broken defconfigs

No new revisions were added by this update.

Summary of changes:
 .../stm32/nucleo-f302r8/configs/qenco/defconfig| 68 +-
 .../stm32f334-disco/configs/powerled/defconfig | 60 +++
 .../tiva/lm3s6965-ek/configs/qemu-flat/defconfig   |  1 -
 .../tiva/lm3s6965-ek/configs/qemu-nxflat/defconfig |  1 -
 .../lm3s6965-ek/configs/qemu-protected/defconfig   |  1 -
 boards/sim/sim/sim/configs/nimble/defconfig|  1 -
 boards/z80/z180/p112/configs/ostest/defconfig  |  1 -
 .../z80/z8/z8encore000zco/configs/ostest/defconfig |  1 -
 .../z80/z8/z8f64200100kit/configs/ostest/defconfig |  1 -
 boards/z80/z80/z80sim/configs/ostest/defconfig |  1 -
 10 files changed, 88 insertions(+), 48 deletions(-)



[GitHub] [nuttx] acassis merged pull request #8913: boards: Fix broken defconfigs

2023-03-28 Thread via GitHub


acassis merged PR #8913:
URL: https://github.com/apache/nuttx/pull/8913


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



[GitHub] [nuttx] lucasssvaz commented on pull request #8643: risc-v: SV32 MMU support for qemu-rv

2023-03-28 Thread via GitHub


lucasssvaz commented on PR #8643:
URL: https://github.com/apache/nuttx/pull/8643#issuecomment-1486979187

   @g2gps Please rebase your branch to the latest commit.


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



[GitHub] [nuttx] lucasssvaz commented on a diff in pull request #8905: esp32: Add support to Ai-Thinker Audio Kit board and ESP32-A1S module

2023-03-28 Thread via GitHub


lucasssvaz commented on code in PR #8905:
URL: https://github.com/apache/nuttx/pull/8905#discussion_r1150718229


##
boards/xtensa/esp32/esp32-audio-kit/src/esp32-audio-kit.h:
##
@@ -0,0 +1,177 @@
+/
+ * boards/xtensa/esp32/esp32-audio-kit/src/esp32-audio-kit.h
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ /
+
+#ifndef __BOARDS_XTENSA_ESP32_ESP32_AUDIO_KIT_SRC_ESP32_AUDIO_KIT_H
+#define __BOARDS_XTENSA_ESP32_ESP32_AUDIO_KIT_SRC_ESP32_AUDIO_KIT_H
+
+/
+ * Included Files
+ /
+
+#include 
+#include 
+#include 
+
+/
+ * Pre-processor Definitions
+ /
+
+/* ESP32-LyraT GPIOs /
+
+/* LEDs */
+
+#define GPIO_LED1  22
+
+/* Audio Amplifier */
+
+#define SPEAKER_ENABLE_GPIO   21
+
+/* Buttons */
+
+/* As BOOT_BUTTON shares pins with I2S and the SD card it cannot be used
+ * as an user button like regular ESP32 boards. As the ESP32-LyraT has
+ * other buttons that can be used, BOOT_BUTTON is disabled in the buttons
+ * driver to avoid conflict with the remaining peripherals.
+ */
+
+#define BUTTON_REC  36
+#define BUTTON_MODE 39
+#define BUTTON_PLAY_TP_CHANNEL  8
+#define BUTTON_SET_TP_CHANNEL   9
+#define BUTTON_VOLM_TP_CHANNEL  4
+#define BUTTON_VOLP_TP_CHANNEL  7

Review Comment:
   This section was made for the ESP32-LyraT board. Please double check the 
pins and buttons.



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



[GitHub] [nuttx] lucasssvaz commented on a diff in pull request #8905: esp32: Add support to Ai-Thinker Audio Kit board and ESP32-A1S module

2023-03-28 Thread via GitHub


lucasssvaz commented on code in PR #8905:
URL: https://github.com/apache/nuttx/pull/8905#discussion_r1150718229


##
boards/xtensa/esp32/esp32-audio-kit/src/esp32-audio-kit.h:
##
@@ -0,0 +1,177 @@
+/
+ * boards/xtensa/esp32/esp32-audio-kit/src/esp32-audio-kit.h
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ /
+
+#ifndef __BOARDS_XTENSA_ESP32_ESP32_AUDIO_KIT_SRC_ESP32_AUDIO_KIT_H
+#define __BOARDS_XTENSA_ESP32_ESP32_AUDIO_KIT_SRC_ESP32_AUDIO_KIT_H
+
+/
+ * Included Files
+ /
+
+#include 
+#include 
+#include 
+
+/
+ * Pre-processor Definitions
+ /
+
+/* ESP32-LyraT GPIOs /
+
+/* LEDs */
+
+#define GPIO_LED1  22
+
+/* Audio Amplifier */
+
+#define SPEAKER_ENABLE_GPIO   21
+
+/* Buttons */
+
+/* As BOOT_BUTTON shares pins with I2S and the SD card it cannot be used
+ * as an user button like regular ESP32 boards. As the ESP32-LyraT has
+ * other buttons that can be used, BOOT_BUTTON is disabled in the buttons
+ * driver to avoid conflict with the remaining peripherals.
+ */
+
+#define BUTTON_REC  36
+#define BUTTON_MODE 39
+#define BUTTON_PLAY_TP_CHANNEL  8
+#define BUTTON_SET_TP_CHANNEL   9
+#define BUTTON_VOLM_TP_CHANNEL  4
+#define BUTTON_VOLP_TP_CHANNEL  7

Review Comment:
   This section was made for the ESP32-LyraT board. Please, double check the 
pins, buttons and board name.



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



[GitHub] [nuttx] gustavonihei opened a new pull request, #8920: risc-v/espressif: Fix NULL-dereferencing in WDT interrupt handling

2023-03-28 Thread via GitHub


gustavonihei opened a new pull request, #8920:
URL: https://github.com/apache/nuttx/pull/8920

   ## Summary
   
   This PR intends to provide a fix for the WDT interrupt handling when using 
the `WDIOC_CAPTURE` feature.
   
   ## Impact
   
   Bugfix, now the `WDIOC_CAPTURE` ioctl is properly handled.
   
   ## Testing
   
   `esp32c3-generic:watchdog` with `EXAMPLES_WATCHER` enabled.
   
   The `watcher` application can now properly capture the WDT expiration and 
notify it.
   


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



[GitHub] [nuttx] fjpanag commented on pull request #8911: asprintf: Fixed possible memory leak if print fails.

2023-03-28 Thread via GitHub


fjpanag commented on PR #8911:
URL: https://github.com/apache/nuttx/pull/8911#issuecomment-1487062529

   The checks failure here is a CI issue, right?


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



[GitHub] [nuttx] pkarashchenko commented on pull request #8911: asprintf: Fixed possible memory leak if print fails.

2023-03-28 Thread via GitHub


pkarashchenko commented on PR #8911:
URL: https://github.com/apache/nuttx/pull/8911#issuecomment-1487064090

   Just rebase on top of the latest master


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



[GitHub] [nuttx] acassis commented on a diff in pull request #8905: esp32: Add support to Ai-Thinker Audio Kit board and ESP32-A1S module

2023-03-28 Thread via GitHub


acassis commented on code in PR #8905:
URL: https://github.com/apache/nuttx/pull/8905#discussion_r1150790155


##
boards/xtensa/esp32/esp32-audio-kit/src/esp32-audio-kit.h:
##
@@ -0,0 +1,177 @@
+/
+ * boards/xtensa/esp32/esp32-audio-kit/src/esp32-audio-kit.h
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ /
+
+#ifndef __BOARDS_XTENSA_ESP32_ESP32_AUDIO_KIT_SRC_ESP32_AUDIO_KIT_H
+#define __BOARDS_XTENSA_ESP32_ESP32_AUDIO_KIT_SRC_ESP32_AUDIO_KIT_H
+
+/
+ * Included Files
+ /
+
+#include 
+#include 
+#include 
+
+/
+ * Pre-processor Definitions
+ /
+
+/* ESP32-LyraT GPIOs /
+
+/* LEDs */
+
+#define GPIO_LED1  22
+
+/* Audio Amplifier */
+
+#define SPEAKER_ENABLE_GPIO   21
+
+/* Buttons */
+
+/* As BOOT_BUTTON shares pins with I2S and the SD card it cannot be used
+ * as an user button like regular ESP32 boards. As the ESP32-LyraT has
+ * other buttons that can be used, BOOT_BUTTON is disabled in the buttons
+ * driver to avoid conflict with the remaining peripherals.
+ */
+
+#define BUTTON_REC  36
+#define BUTTON_MODE 39
+#define BUTTON_PLAY_TP_CHANNEL  8
+#define BUTTON_SET_TP_CHANNEL   9
+#define BUTTON_VOLM_TP_CHANNEL  4
+#define BUTTON_VOLP_TP_CHANNEL  7

Review Comment:
   Fixed! I decided to remove buttons support for now



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



[GitHub] [nuttx] ldube opened a new pull request, #8921: usbhost_hidkbd: Add the option to use interrupt transfers.

2023-03-28 Thread via GitHub


ldube opened a new pull request, #8921:
URL: https://github.com/apache/nuttx/pull/8921

   ## Summary
   Using the interrupt pipe is recommended in the Get_Report request section of 
the HID standard. This option has been added to support some keyboards that 
refuse to return valid keys when polled using the Get_Report request. Support 
for the Caps Lock key, including the LED, has also been added.
   
   The interrupt transfers are not enabled by default. This will enable the 
feature:
   CONFIG_HIDKBD_NOGETREPORT=y
   
   ## Impact
   Affects the HID keyboard driver only.
   
   ## Testing
   Used the hidkbd application.
   Also used "cat /dev/kbda &"  and  "cat /dev/kbdb &"  to test two keyboards 
at the same time. Pressing caps lock changes the light on both keyboards.
   
   


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



[GitHub] [nuttx] patacongo commented on issue #8858: Issues with adjtime implementation / Build failure.

2023-03-28 Thread via GitHub


patacongo commented on issue #8858:
URL: https://github.com/apache/nuttx/issues/8858#issuecomment-1487212762

   > * Licensing issue: While major part of the implementation is my own and 
therefore can be released under Apache License, the idea of the algorithm 
itself is taken from libntp @patacongo refered to. I am not sure about 
licensing in this case. Do we need the original author agreement?
   
   I haven't looked at your implementation, but if you ONLY took the algorithm 
and implementation is wholly yours, then there is not copyright issues.
   
   Think of it this way:  The copyright protects the implementation.  It 
protects the actual code.  If you re-use code, or even copy-paste sections of 
the code, you may be violating a copy right.  If you look at the code to 
understand the algorithmic content, then write you own code that implements 
that algorithm, you have not violated any copyrights.  People do this all of 
the time.  That is why we can have work alike versions of some things.  This is 
the whole basis of IBM's clean room design that has led to thousands of line of 
opened code.  https://en.wikipedia.org/wiki/Clean_room_design
   
   There can be an issue with using if the underlying algorithm is patented, 
however.  Unlike copyrights, patents can protect the content of the code.  
Think for examples of the problems that people had with writing their own open 
source MPEG4/5 algorithms.  MPEG4/5 is patented so although there is no 
copyright violation from distributing the code, there is a patent violation if 
you use the code without permission.  I doubt that applies here; the adjtime() 
algorithm is not that complex and probably not patentable.
   
   > * I implemented adjtime function separately from TIMEKEEPING support as 
that seems to be implementing not only adjtime but also some other stuffs. I 
think it is ok to keep it separate, what do you think?
   
   adjtime() is a standard application interface.  It is not POSIX but still a 
part of standards that NuttX follows.  I think that adjtime() should be 
available with being conditioned on a configuration variable.  That should not 
result in any size increase since adjtim() is a leaf function in a library;  in 
the FLAT build it will not be drawn in unless it is specifically referenced. 
(It will get pulled into PROTECTED and KERNEL builds because the system call 
logic will reference it.
   
   
   


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



[GitHub] [nuttx] patacongo merged pull request #8914: signal: add SIGSYS

2023-03-28 Thread via GitHub


patacongo merged PR #8914:
URL: https://github.com/apache/nuttx/pull/8914


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



[nuttx] branch master updated: signal: add SIGSYS

2023-03-28 Thread gnutt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new a8f4a89221 signal: add SIGSYS
a8f4a89221 is described below

commit a8f4a89221a3a6401eea245f666d24f29b62b2f9
Author: Petro Karashchenko 
AuthorDate: Mon Mar 27 17:37:53 2023 +0300

signal: add SIGSYS

Signed-off-by: Petro Karashchenko 
---
 include/signal.h   | 2 ++
 sched/Kconfig  | 4 ++--
 sched/signal/sig_default.c | 1 +
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/signal.h b/include/signal.h
index fe20cede39..7b11e3b5ac 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -167,6 +167,8 @@
 
 #define SIGIO   SIGPOLL
 
+#define SIGSYS  31
+
 /* sigprocmask() "how" definitions. Only one of the following can be 
specified: */
 
 #define SIG_BLOCK   1  /* Block the given signals */
diff --git a/sched/Kconfig b/sched/Kconfig
index 305d51d1c1..7ea9b8bee0 100644
--- a/sched/Kconfig
+++ b/sched/Kconfig
@@ -1372,8 +1372,8 @@ config SIG_SIGKILL_ACTION
default y
---help---
Enable the default action for SIGHUP SIGILL SIGTRAP SIGABRT 
SIGBUS
-   SIGFPE SIGINT SIGKILL SIGSEGV SIGQUIT SIGTERM SIGXCPU AND
-   SIGXFSZ (terminate the task).
+   SIGFPE SIGINT SIGKILL SIGSEGV SIGQUIT SIGTERM SIGXCPU  SIGXFSZ 
and
+   SIGSYS (terminate the task).
 
 config SIG_SIGUSR1_ACTION
bool "SIGUSR1"
diff --git a/sched/signal/sig_default.c b/sched/signal/sig_default.c
index baac89a1c5..f49c131f4d 100644
--- a/sched/signal/sig_default.c
+++ b/sched/signal/sig_default.c
@@ -119,6 +119,7 @@ static const struct nxsig_defaction_s g_defactions[] =
   { SIGTERM,   0,nxsig_abnormal_termination },
   { SIGXCPU,   0,nxsig_abnormal_termination },
   { SIGXFSZ,   0,nxsig_abnormal_termination },
+  { SIGSYS,0,nxsig_abnormal_termination },
 #endif
 #ifdef CONFIG_SIG_SIGUSR1_ACTION
   { SIGUSR1,   0,nxsig_abnormal_termination },



[GitHub] [nuttx] acassis merged pull request #8912: risc-v/espressif: Update revision of esp-hal-3rdparty

2023-03-28 Thread via GitHub


acassis merged PR #8912:
URL: https://github.com/apache/nuttx/pull/8912


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



[nuttx] branch master updated: risc-v/espressif: Update revision of esp-hal-3rdparty

2023-03-28 Thread acassis
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/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
 new 6647f194db risc-v/espressif: Update revision of esp-hal-3rdparty
6647f194db is described below

commit 6647f194dbf3deaf015fcb306e6c7074192a2d52
Author: Gustavo Henrique Nihei 
AuthorDate: Fri Mar 24 19:02:29 2023 -0300

risc-v/espressif: Update revision of esp-hal-3rdparty

Small cleanup, no added features.

Signed-off-by: Gustavo Henrique Nihei 
---
 arch/risc-v/src/espressif/Make.defs  | 2 +-
 arch/risc-v/src/espressif/hal_esp32c3.mk | 6 +++---
 arch/risc-v/src/espressif/hal_esp32c6.mk | 6 +++---
 arch/risc-v/src/espressif/hal_esp32h2.mk | 6 +++---
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/risc-v/src/espressif/Make.defs 
b/arch/risc-v/src/espressif/Make.defs
index 5c4ecfd54a..06cefa545a 100644
--- a/arch/risc-v/src/espressif/Make.defs
+++ b/arch/risc-v/src/espressif/Make.defs
@@ -49,7 +49,7 @@ endif
 # Fetch source files and add them to build
 
 ESP_HAL_3RDPARTY_UNPACK = esp-hal-3rdparty
-ESP_HAL_3RDPARTY_ID = nuttx-20230310
+ESP_HAL_3RDPARTY_ID = nuttx-20230324
 ESP_HAL_3RDPARTY_ZIP= $(ESP_HAL_3RDPARTY_ID).zip
 ESP_HAL_3RDPARTY_URL= https://github.com/espressif/esp-hal-3rdparty/archive
 
diff --git a/arch/risc-v/src/espressif/hal_esp32c3.mk 
b/arch/risc-v/src/espressif/hal_esp32c3.mk
index 99fb1dba59..79b9ec66fa 100644
--- a/arch/risc-v/src/espressif/hal_esp32c3.mk
+++ b/arch/risc-v/src/espressif/hal_esp32c3.mk
@@ -20,7 +20,8 @@
 
 # Include header paths
 
-INCLUDES += 
$(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_UNPACK)/components/driver/include
+INCLUDES += 
$(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_UNPACK)/nuttx/include
+INCLUDES += 
$(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_UNPACK)/nuttx/$(CHIP_SERIES)/include
 INCLUDES += 
$(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_UNPACK)/components/efuse/include
 INCLUDES += 
$(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_UNPACK)/components/efuse/private_include
 INCLUDES += 
$(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_UNPACK)/components/efuse/$(CHIP_SERIES)/include
@@ -47,7 +48,6 @@ INCLUDES += 
$(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_UNPACK)/compo
 INCLUDES += 
$(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_UNPACK)/components/riscv/include
 INCLUDES += 
$(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_UNPACK)/components/soc/include
 INCLUDES += 
$(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_UNPACK)/components/soc/$(CHIP_SERIES)/include
-INCLUDES += 
$(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_UNPACK)/nuttx/$(CHIP_SERIES)/include
 
 # Linker scripts
 
@@ -70,8 +70,8 @@ CHIP_CSRCS += 
chip/$(ESP_HAL_3RDPARTY_UNPACK)/components/esp_hw_support/esp_clk.
 CHIP_CSRCS += 
chip/$(ESP_HAL_3RDPARTY_UNPACK)/components/esp_hw_support/periph_ctrl.c
 CHIP_CSRCS += 
chip/$(ESP_HAL_3RDPARTY_UNPACK)/components/esp_hw_support/regi2c_ctrl.c
 CHIP_CSRCS += 
chip/$(ESP_HAL_3RDPARTY_UNPACK)/components/esp_hw_support/port/clk_tree_common.c
-CHIP_CSRCS += 
chip/$(ESP_HAL_3RDPARTY_UNPACK)/components/esp_hw_support/port/$(CHIP_SERIES)/cpu_region_protect.c
 CHIP_CSRCS += 
chip/$(ESP_HAL_3RDPARTY_UNPACK)/components/esp_hw_support/port/$(CHIP_SERIES)/clk_tree.c
+CHIP_CSRCS += 
chip/$(ESP_HAL_3RDPARTY_UNPACK)/components/esp_hw_support/port/$(CHIP_SERIES)/cpu_region_protect.c
 CHIP_CSRCS += 
chip/$(ESP_HAL_3RDPARTY_UNPACK)/components/esp_hw_support/port/$(CHIP_SERIES)/rtc_clk.c
 CHIP_CSRCS += 
chip/$(ESP_HAL_3RDPARTY_UNPACK)/components/esp_hw_support/port/$(CHIP_SERIES)/rtc_init.c
 CHIP_CSRCS += 
chip/$(ESP_HAL_3RDPARTY_UNPACK)/components/esp_hw_support/port/$(CHIP_SERIES)/rtc_sleep.c
diff --git a/arch/risc-v/src/espressif/hal_esp32c6.mk 
b/arch/risc-v/src/espressif/hal_esp32c6.mk
index de59583fdb..6ae7a13d78 100644
--- a/arch/risc-v/src/espressif/hal_esp32c6.mk
+++ b/arch/risc-v/src/espressif/hal_esp32c6.mk
@@ -20,7 +20,8 @@
 
 # Include header paths
 
-INCLUDES += 
$(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_UNPACK)/components/driver/include
+INCLUDES += 
$(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_UNPACK)/nuttx/include
+INCLUDES += 
$(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_UNPACK)/nuttx/$(CHIP_SERIES)/include
 INCLUDES += 
$(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_UNPACK)/components/efuse/include
 INCLUDES += 
$(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_UNPACK)/components/efuse/private_include
 INCLUDES += 
$(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_UNPACK)/components/efuse/$(CHIP_SERIES)/include
@@ -47,7 +48,6 @@ INCLUDES += 
$(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_UNPACK)/compo
 INCLUDES += 
$(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_UNPACK)/components/riscv/inc

[nuttx] branch master updated: asprintf: Fixed possible memory leak if print fails.

2023-03-28 Thread acassis
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/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
 new 0b1ba70ac5 asprintf: Fixed possible memory leak if print fails.
0b1ba70ac5 is described below

commit 0b1ba70ac583289b53b88ccb86f9a08da67be789
Author: Fotis Panagiotopoulos 
AuthorDate: Mon Mar 27 12:18:47 2023 +0300

asprintf: Fixed possible memory leak if print fails.
---
 libs/libc/stdio/lib_vasprintf.c | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/libs/libc/stdio/lib_vasprintf.c b/libs/libc/stdio/lib_vasprintf.c
index fa93e2272c..5bba2d9d72 100644
--- a/libs/libc/stdio/lib_vasprintf.c
+++ b/libs/libc/stdio/lib_vasprintf.c
@@ -121,12 +121,16 @@ int vasprintf(FAR char **ptr, FAR const IPTR char *fmt, 
va_list ap)
   /* Return a pointer to the string to the caller.  NOTE: the memstream put()
* method has already added the NUL terminator to the end of the string
* (not included in the nput count).
-   *
-   * Hmmm.. looks like the memory would be stranded if lib_vsprintf()
-   * returned an error.  Does that ever happen?
*/
 
   DEBUGASSERT(nbytes < 0 || nbytes == nulloutstream.nput);
+
+  if (nbytes < 0)
+{
+  lib_free(buf);
+  return ERROR;
+}
+
   *ptr = buf;
   return nbytes;
 }



[GitHub] [nuttx] acassis merged pull request #8911: asprintf: Fixed possible memory leak if print fails.

2023-03-28 Thread via GitHub


acassis merged PR #8911:
URL: https://github.com/apache/nuttx/pull/8911


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



[GitHub] [nuttx-apps] acassis merged pull request #1649: Add another batch of missing headers throughout the repository

2023-03-28 Thread via GitHub


acassis merged PR #1649:
URL: https://github.com/apache/nuttx-apps/pull/1649


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



[nuttx-apps] 01/03: Add another batch of missing headers throughout the repository

2023-03-28 Thread acassis
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/nuttx-apps.git

commit efb4e0bc913a8858aac20aa9210fba3dba817e69
Author: Gustavo Henrique Nihei 
AuthorDate: Wed Mar 8 15:57:51 2023 -0300

Add another batch of missing headers throughout the repository

Signed-off-by: Gustavo Henrique Nihei 
---
 examples/foc/foc_fixed16_thr.c  |  8 
 examples/foc/foc_float_thr.c|  8 
 examples/foc/foc_motor_b16.c|  4 ++--
 examples/foc/foc_motor_f32.c|  4 ++--
 examples/foc/foc_thr.c  |  3 ++-
 examples/pipe/interlock_test.c  | 10 +-
 examples/pipe/transfer_test.c   |  3 ++-
 examples/popen/popen_main.c |  3 ++-
 examples/watchdog/watchdog_main.c   | 12 ++--
 industry/foc/fixed16/foc_ang_openloop.c |  1 +
 industry/foc/fixed16/foc_angle.c|  1 +
 industry/foc/fixed16/foc_handler.c  |  1 +
 industry/foc/fixed16/foc_model.c|  1 +
 industry/foc/fixed16/foc_routine.c  |  1 +
 industry/foc/fixed16/foc_velocity.c |  1 +
 industry/foc/float/foc_ang_openloop.c   |  1 +
 industry/foc/float/foc_angle.c  |  1 +
 industry/foc/float/foc_handler.c|  1 +
 industry/foc/float/foc_model.c  |  1 +
 industry/foc/float/foc_routine.c|  1 +
 industry/foc/float/foc_velocity.c   |  1 +
 system/nxlooper/nxlooper.c  | 22 +++---
 system/nxplayer/nxplayer.c  | 29 ++---
 system/nxplayer/nxplayer_mp3.c  |  4 +++-
 system/nxrecorder/nxrecorder.c  | 21 +++--
 testing/ostest/suspend.c|  3 +++
 26 files changed, 83 insertions(+), 63 deletions(-)

diff --git a/examples/foc/foc_fixed16_thr.c b/examples/foc/foc_fixed16_thr.c
index e507b2a15..5735adf29 100644
--- a/examples/foc/foc_fixed16_thr.c
+++ b/examples/foc/foc_fixed16_thr.c
@@ -24,12 +24,12 @@
 
 #include 
 
-#include 
-#include 
 #include 
-#include 
-
 #include 
+#include 
+#include 
+#include 
+#include 
 
 #include "foc_cfg.h"
 #include "foc_debug.h"
diff --git a/examples/foc/foc_float_thr.c b/examples/foc/foc_float_thr.c
index 7d26687bb..131d3c8e4 100644
--- a/examples/foc/foc_float_thr.c
+++ b/examples/foc/foc_float_thr.c
@@ -24,12 +24,12 @@
 
 #include 
 
-#include 
-#include 
 #include 
-#include 
-
 #include 
+#include 
+#include 
+#include 
+#include 
 
 #include "foc_cfg.h"
 #include "foc_debug.h"
diff --git a/examples/foc/foc_motor_b16.c b/examples/foc/foc_motor_b16.c
index b2a8ef5cf..5c030b48c 100644
--- a/examples/foc/foc_motor_b16.c
+++ b/examples/foc/foc_motor_b16.c
@@ -25,11 +25,11 @@
 #include 
 
 #include 
-
-#include "foc_motor_b16.h"
+#include 
 
 #include "foc_cfg.h"
 #include "foc_debug.h"
+#include "foc_motor_b16.h"
 
 /
  * Pre-processor Definitions
diff --git a/examples/foc/foc_motor_f32.c b/examples/foc/foc_motor_f32.c
index 37103e0d2..b1ccc6153 100644
--- a/examples/foc/foc_motor_f32.c
+++ b/examples/foc/foc_motor_f32.c
@@ -25,11 +25,11 @@
 #include 
 
 #include 
-
-#include "foc_motor_f32.h"
+#include 
 
 #include "foc_cfg.h"
 #include "foc_debug.h"
+#include "foc_motor_f32.h"
 
 /
  * Pre-processor Definitions
diff --git a/examples/foc/foc_thr.c b/examples/foc/foc_thr.c
index 11cb71711..debec1529 100644
--- a/examples/foc/foc_thr.c
+++ b/examples/foc/foc_thr.c
@@ -24,9 +24,10 @@
 
 #include 
 
-#include 
 #include 
 #include 
+#include 
+#include 
 
 #include "foc_mq.h"
 #include "foc_thr.h"
diff --git a/examples/pipe/interlock_test.c b/examples/pipe/interlock_test.c
index cddda2df2..cb00bd268 100644
--- a/examples/pipe/interlock_test.c
+++ b/examples/pipe/interlock_test.c
@@ -23,14 +23,14 @@
  /
 
 #include 
-#include 
-
-#include 
 
-#include 
+#include 
 #include 
+#include 
+#include 
+#include 
+#include 
 #include 
-#include 
 
 #include "pipe.h"
 
diff --git a/examples/pipe/transfer_test.c b/examples/pipe/transfer_test.c
index 1fe5ec03f..fc379c02b 100644
--- a/examples/pipe/transfer_test.c
+++ b/examples/pipe/transfer_test.c
@@ -24,9 +24,10 @@
 
 #include 
 
+#include 
+#include 
 #include 
 #include 
-#include 
 
 #include "pipe.h"
 
diff --git a/examples/popen/popen_main.c b/examples/popen/popen_main.c
index 1a6f35117..d9ef10c51 100644
--- a/examples/popen/popen_main.c
+++ b/examples/popen/popen_main.c
@@ -24,10 +24,11 @@
 
 #include 
 
+#include 
+#include 
 #include 
 #include 
 #include 
-#include 
 
 /
  * Public Functions
diff --git a/examples/watchdog/watchdog_main.c 
b/examples/watchdog/watchdog_main.c
index 5a8cefcbb..611088702 100644
--- a/examp

[nuttx-apps] 03/03: luamodules: Fix implicit declaration warning for strncasecmp

2023-03-28 Thread acassis
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/nuttx-apps.git

commit d650d3276f15236da91f3477c32c6b4995807e06
Author: Gustavo Henrique Nihei 
AuthorDate: Wed Mar 8 18:35:37 2023 -0300

luamodules: Fix implicit declaration warning for strncasecmp

Signed-off-by: Gustavo Henrique Nihei 
---
 ...implicit-declaration-warning-for-strncase.patch | 26 ++
 interpreters/luamodules/cjson/Makefile |  1 +
 2 files changed, 27 insertions(+)

diff --git 
a/interpreters/luamodules/cjson/0002-bugfix-Fix-implicit-declaration-warning-for-strncase.patch
 
b/interpreters/luamodules/cjson/0002-bugfix-Fix-implicit-declaration-warning-for-strncase.patch
new file mode 100644
index 0..6beef060b
--- /dev/null
+++ 
b/interpreters/luamodules/cjson/0002-bugfix-Fix-implicit-declaration-warning-for-strncase.patch
@@ -0,0 +1,26 @@
+From e6e8fbe68a95bf6fca463781dbc22e631c4b7b7a Mon Sep 17 00:00:00 2001
+From: Gustavo Henrique Nihei 
+Date: Wed, 8 Mar 2023 17:18:02 -0300
+Subject: [PATCH] bugfix: Fix implicit declaration warning for strncasecmp
+ function
+
+Signed-off-by: Gustavo Henrique Nihei 
+---
+ lua_cjson.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lua_cjson.c b/lua_cjson.c
+index 42672de..f443626 100644
+--- a/lua_cjson.c
 b/lua_cjson.c
+@@ -39,6 +39,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ #include 
+ #include 
+ #include 
+-- 
+2.37.2
+
diff --git a/interpreters/luamodules/cjson/Makefile 
b/interpreters/luamodules/cjson/Makefile
index c5a8fb800..2fd741157 100644
--- a/interpreters/luamodules/cjson/Makefile
+++ b/interpreters/luamodules/cjson/Makefile
@@ -39,6 +39,7 @@ $(LUACJSON_UNPACK): $(LUACJSON_TARBALL)
$(Q) tar -xvzf $(LUACJSON_TARBALL)
$(Q) mv lua-cjson-$(LUACJSON_VERSION) $(LUACJSON_UNPACK)
$(Q) patch -d $(LUACJSON_UNPACK) -p1 < 0001-fix-compile-warnings.patch
+   $(Q) patch -d $(LUACJSON_UNPACK) -p1 < 
0002-bugfix-Fix-implicit-declaration-warning-for-strncase.patch
 
 $(LUACJSON_UNPACK)/.patch: $(LUACJSON_UNPACK)
touch $(LUACJSON_UNPACK)/.patch



[nuttx-apps] branch master updated (a1bca5070 -> d650d3276)

2023-03-28 Thread acassis
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/nuttx-apps.git


from a1bca5070 Changes to apps needed by nutts PR 8885
 new efb4e0bc9 Add another batch of missing headers throughout the 
repository
 new ce68d7a73 examples/popen: Fix NxStyle long line warning
 new d650d3276 luamodules: Fix implicit declaration warning for strncasecmp

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:
 examples/foc/foc_fixed16_thr.c |  8 +++---
 examples/foc/foc_float_thr.c   |  8 +++---
 examples/foc/foc_motor_b16.c   |  4 +--
 examples/foc/foc_motor_f32.c   |  4 +--
 examples/foc/foc_thr.c |  3 ++-
 examples/pipe/interlock_test.c | 10 
 examples/pipe/transfer_test.c  |  3 ++-
 examples/popen/popen_main.c|  6 +++--
 examples/watchdog/watchdog_main.c  | 12 -
 industry/foc/fixed16/foc_ang_openloop.c|  1 +
 industry/foc/fixed16/foc_angle.c   |  1 +
 industry/foc/fixed16/foc_handler.c |  1 +
 industry/foc/fixed16/foc_model.c   |  1 +
 industry/foc/fixed16/foc_routine.c |  1 +
 industry/foc/fixed16/foc_velocity.c|  1 +
 industry/foc/float/foc_ang_openloop.c  |  1 +
 industry/foc/float/foc_angle.c |  1 +
 industry/foc/float/foc_handler.c   |  1 +
 industry/foc/float/foc_model.c |  1 +
 industry/foc/float/foc_routine.c   |  1 +
 industry/foc/float/foc_velocity.c  |  1 +
 ...implicit-declaration-warning-for-strncase.patch | 26 +++
 interpreters/luamodules/cjson/Makefile |  1 +
 system/nxlooper/nxlooper.c | 22 
 system/nxplayer/nxplayer.c | 29 +++---
 system/nxplayer/nxplayer_mp3.c |  4 ++-
 system/nxrecorder/nxrecorder.c | 21 
 testing/ostest/suspend.c   |  3 +++
 28 files changed, 112 insertions(+), 64 deletions(-)
 create mode 100644 
interpreters/luamodules/cjson/0002-bugfix-Fix-implicit-declaration-warning-for-strncase.patch



[nuttx-apps] 02/03: examples/popen: Fix NxStyle long line warning

2023-03-28 Thread acassis
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/nuttx-apps.git

commit ce68d7a7388ff63b20c0259be871d35cb7dec9db
Author: Gustavo Henrique Nihei 
AuthorDate: Wed Mar 8 18:34:59 2023 -0300

examples/popen: Fix NxStyle long line warning

Signed-off-by: Gustavo Henrique Nihei 
---
 examples/popen/popen_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/examples/popen/popen_main.c b/examples/popen/popen_main.c
index d9ef10c51..d928629e1 100644
--- a/examples/popen/popen_main.c
+++ b/examples/popen/popen_main.c
@@ -167,7 +167,8 @@ int main(int argc, FAR char *argv[])
 
   if (errcode == ECHILD)
 {
-  printf("The shell has already exited (and exit status is not 
available)\n");
+  printf("The shell has already exited "
+ "(and exit status is not available)\n");
 }
   else
 {



[GitHub] [nuttx] pkarashchenko merged pull request #8905: esp32: Add support to Ai-Thinker Audio Kit board and ESP32-A1S module

2023-03-28 Thread via GitHub


pkarashchenko merged PR #8905:
URL: https://github.com/apache/nuttx/pull/8905


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



[nuttx] branch master updated (0b1ba70ac5 -> b87eb7c82f)

2023-03-28 Thread pkarashchenko
This is an automated email from the ASF dual-hosted git repository.

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


from 0b1ba70ac5 asprintf: Fixed possible memory leak if print fails.
 new c5145257fe esp32: Add Ai-Thinker ESP32-A1S module
 new b87eb7c82f esp32: Add Ai-Thinker ESP32 Audio Kit board

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:
 .../esp32-audio-config-file.png| Bin
 .../boards/esp32-audio-kit/esp32-audio-kit.png | Bin 0 -> 161397 bytes
 .../xtensa/esp32/boards/esp32-audio-kit/index.rst  | 155 +++
 arch/xtensa/src/esp32/Kconfig  |   9 +
 boards/Kconfig |  16 +
 boards/xtensa/esp32/esp32-audio-kit/Kconfig|   8 +
 .../esp32/esp32-audio-kit/configs/audio/defconfig  | 120 ++
 .../esp32/esp32-audio-kit/configs/nsh/defconfig|  44 ++
 .../esp32/esp32-audio-kit/configs/wifi/defconfig   |  90 +
 .../xtensa/esp32/esp32-audio-kit/include/board.h   |  78 
 .../esp32-audio-kit/include/board_memorymap.h  | 128 ++
 .../xtensa/esp32/esp32-audio-kit/scripts/Make.defs |  72 
 boards/xtensa/esp32/esp32-audio-kit/src/Make.defs  |  51 +++
 .../esp32/esp32-audio-kit/src/esp32-audio-kit.h| 181 +
 .../esp32/esp32-audio-kit/src/esp32_appinit.c  |  80 
 .../xtensa/esp32/esp32-audio-kit/src/esp32_boot.c  | 101 +
 .../esp32/esp32-audio-kit/src/esp32_bringup.c  | 450 +
 .../esp32/esp32-audio-kit/src/esp32_buttons.c  | 166 
 .../xtensa/esp32/esp32-audio-kit/src/esp32_gpio.c  | 391 ++
 .../xtensa/esp32/esp32-audio-kit/src/esp32_mmcsd.c |  84 
 .../xtensa/esp32/esp32-audio-kit/src/esp32_reset.c |  63 +++
 .../esp32/esp32-audio-kit/src/esp32_userleds.c |  95 +
 22 files changed, 2382 insertions(+)
 copy Documentation/platforms/xtensa/esp32/boards/{esp32-devkitc => 
esp32-audio-kit}/esp32-audio-config-file.png (100%)
 create mode 100644 
Documentation/platforms/xtensa/esp32/boards/esp32-audio-kit/esp32-audio-kit.png
 create mode 100644 
Documentation/platforms/xtensa/esp32/boards/esp32-audio-kit/index.rst
 create mode 100644 boards/xtensa/esp32/esp32-audio-kit/Kconfig
 create mode 100644 boards/xtensa/esp32/esp32-audio-kit/configs/audio/defconfig
 create mode 100644 boards/xtensa/esp32/esp32-audio-kit/configs/nsh/defconfig
 create mode 100644 boards/xtensa/esp32/esp32-audio-kit/configs/wifi/defconfig
 create mode 100644 boards/xtensa/esp32/esp32-audio-kit/include/board.h
 create mode 100644 
boards/xtensa/esp32/esp32-audio-kit/include/board_memorymap.h
 create mode 100644 boards/xtensa/esp32/esp32-audio-kit/scripts/Make.defs
 create mode 100644 boards/xtensa/esp32/esp32-audio-kit/src/Make.defs
 create mode 100644 boards/xtensa/esp32/esp32-audio-kit/src/esp32-audio-kit.h
 create mode 100644 boards/xtensa/esp32/esp32-audio-kit/src/esp32_appinit.c
 create mode 100644 boards/xtensa/esp32/esp32-audio-kit/src/esp32_boot.c
 create mode 100644 boards/xtensa/esp32/esp32-audio-kit/src/esp32_bringup.c
 create mode 100644 boards/xtensa/esp32/esp32-audio-kit/src/esp32_buttons.c
 create mode 100644 boards/xtensa/esp32/esp32-audio-kit/src/esp32_gpio.c
 create mode 100644 boards/xtensa/esp32/esp32-audio-kit/src/esp32_mmcsd.c
 create mode 100644 boards/xtensa/esp32/esp32-audio-kit/src/esp32_reset.c
 create mode 100644 boards/xtensa/esp32/esp32-audio-kit/src/esp32_userleds.c



[nuttx] 01/02: esp32: Add Ai-Thinker ESP32-A1S module

2023-03-28 Thread pkarashchenko
This is an automated email from the ASF dual-hosted git repository.

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

commit c5145257fe85a75a4e6abc4fa24d3a3a3b84e94a
Author: Alan Carvalho de Assis 
AuthorDate: Sat Mar 25 10:31:27 2023 -0300

esp32: Add Ai-Thinker ESP32-A1S module
---
 arch/xtensa/src/esp32/Kconfig | 9 +
 1 file changed, 9 insertions(+)

diff --git a/arch/xtensa/src/esp32/Kconfig b/arch/xtensa/src/esp32/Kconfig
index abecc8a2d4..02d0c2c003 100644
--- a/arch/xtensa/src/esp32/Kconfig
+++ b/arch/xtensa/src/esp32/Kconfig
@@ -81,6 +81,15 @@ config ARCH_CHIP_ESP32SOLO1
---help---
Generic module with an embedded ESP32-S0WD chip, 4 MB of Flash 
memory
 
+config ARCH_CHIP_ESP32_A1S
+   bool "Ai-Thinker ESP32-A1S"
+   select ESP32_ESP32DXWDXX
+   select ESP32_FLASH_16M
+   select ESP32_PSRAM_8M
+   ---help---
+   Ai-Thinker ESP32-A1S module with an embedded ESP32-D0WD chip, 
16 MB of
+   Flash memory, 8 MB of PSRAM
+
 endchoice # ESP32 Chip Selection
 
 config ESP32_SINGLE_CPU



[nuttx] 02/02: esp32: Add Ai-Thinker ESP32 Audio Kit board

2023-03-28 Thread pkarashchenko
This is an automated email from the ASF dual-hosted git repository.

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

commit b87eb7c82fcdd2310d571521e022aebda256cf2b
Author: Alan Carvalho de Assis 
AuthorDate: Sat Mar 25 11:21:18 2023 -0300

esp32: Add Ai-Thinker ESP32 Audio Kit board

This commit adds support to Ai-Thinker ESP32 Audio Kit V2.2 A247
board.

There are two modules of this board. The old model uses AC101 audio
and is not supported currently (AFAIK there is no AC101 driver) and
the new version uses the ES8388 audio codec. This model is supported
by this commit.

Just read the documentation to test playing an audio file.
TODO: Test audio recording.
---
 .../esp32-audio-kit/esp32-audio-config-file.png| Bin 0 -> 21276 bytes
 .../boards/esp32-audio-kit/esp32-audio-kit.png | Bin 0 -> 161397 bytes
 .../xtensa/esp32/boards/esp32-audio-kit/index.rst  | 155 +++
 boards/Kconfig |  16 +
 boards/xtensa/esp32/esp32-audio-kit/Kconfig|   8 +
 .../esp32/esp32-audio-kit/configs/audio/defconfig  | 120 ++
 .../esp32/esp32-audio-kit/configs/nsh/defconfig|  44 ++
 .../esp32/esp32-audio-kit/configs/wifi/defconfig   |  90 +
 .../xtensa/esp32/esp32-audio-kit/include/board.h   |  78 
 .../esp32-audio-kit/include/board_memorymap.h  | 128 ++
 .../xtensa/esp32/esp32-audio-kit/scripts/Make.defs |  72 
 boards/xtensa/esp32/esp32-audio-kit/src/Make.defs  |  51 +++
 .../esp32/esp32-audio-kit/src/esp32-audio-kit.h| 181 +
 .../esp32/esp32-audio-kit/src/esp32_appinit.c  |  80 
 .../xtensa/esp32/esp32-audio-kit/src/esp32_boot.c  | 101 +
 .../esp32/esp32-audio-kit/src/esp32_bringup.c  | 450 +
 .../esp32/esp32-audio-kit/src/esp32_buttons.c  | 166 
 .../xtensa/esp32/esp32-audio-kit/src/esp32_gpio.c  | 391 ++
 .../xtensa/esp32/esp32-audio-kit/src/esp32_mmcsd.c |  84 
 .../xtensa/esp32/esp32-audio-kit/src/esp32_reset.c |  63 +++
 .../esp32/esp32-audio-kit/src/esp32_userleds.c |  95 +
 21 files changed, 2373 insertions(+)

diff --git 
a/Documentation/platforms/xtensa/esp32/boards/esp32-audio-kit/esp32-audio-config-file.png
 
b/Documentation/platforms/xtensa/esp32/boards/esp32-audio-kit/esp32-audio-config-file.png
new file mode 100644
index 00..c51fa32e29
Binary files /dev/null and 
b/Documentation/platforms/xtensa/esp32/boards/esp32-audio-kit/esp32-audio-config-file.png
 differ
diff --git 
a/Documentation/platforms/xtensa/esp32/boards/esp32-audio-kit/esp32-audio-kit.png
 
b/Documentation/platforms/xtensa/esp32/boards/esp32-audio-kit/esp32-audio-kit.png
new file mode 100644
index 00..a3dd18a730
Binary files /dev/null and 
b/Documentation/platforms/xtensa/esp32/boards/esp32-audio-kit/esp32-audio-kit.png
 differ
diff --git 
a/Documentation/platforms/xtensa/esp32/boards/esp32-audio-kit/index.rst 
b/Documentation/platforms/xtensa/esp32/boards/esp32-audio-kit/index.rst
new file mode 100644
index 00..e352fb1f47
--- /dev/null
+++ b/Documentation/platforms/xtensa/esp32/boards/esp32-audio-kit/index.rst
@@ -0,0 +1,155 @@
+===
+ESP32-AUDIO-KIT
+===
+
+The `Ai-Thinker ESP32 Audio Kit 
`_ is a development board for 
the ESP32 SoC from Espressif, based on Ai-Thinker ESP32-A1S audio module.
+
+.. list-table::
+   :align: center
+
+   * - .. figure:: esp32-audio-kit.png
+  :align: center
+
+  Ai-Thinker ESP32 Audio Kit board
+
+Features
+
+
+  - ESP32-A1S module
+  - Audio Earphones Output
+  - Audio LINEIN Input
+  - 2 Microphones in the board (stereo audio input)
+  - 8 Buttons in the boards (1 RST Button and 7 user buttons)
+  - MicroSD card slot
+
+Some of the ESP32 I/O pins are broken out to the board's pin header.
+
+Serial Console
+==
+
+UART0 is, by default, the serial console. It connects to the on-board
+Silabs CP2102 converter and is available on the USB connector (UART label).
+
+It will show up as /dev/ttyUSB[n] where [n] normally is 0 if you don't have
+another USB/Serial adapter connected in your computer.
+
+Buttons and LEDs
+
+
+Board Buttons
+-
+
+There are eight buttons labeled as RST, BOOT, KEY1..KEY6.
+The RST button is not available to software.
+
+The BOOT button is connected to IO0. On reset it is used as a strapping
+pin to determine whether the chip boots normally or into the serial
+bootloader. After reset, however, the BOOT button can be used for software
+input.
+
+Board LEDs
+--
+
+There are several on-board LEDs for that indicate the presence of power
+and USB activity.
+
+I/O Mapping
+===
+
+= = ==
+I/O   SignalNotes
+= = ==
+0 BOOT Button
+2 DATA0 SDCard
+4 DATA1 SDCard

[GitHub] [nuttx] acassis commented on pull request #8893: rndis: various fixes for composite

2023-03-28 Thread via GitHub


acassis commented on PR #8893:
URL: https://github.com/apache/nuttx/pull/8893#issuecomment-1487374305

   please rebase to pass on CI


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



[GitHub] [nuttx] acassis commented on pull request #8906: MiniF4 peripherals support improvements

2023-03-28 Thread via GitHub


acassis commented on PR #8906:
URL: https://github.com/apache/nuttx/pull/8906#issuecomment-1487375366

   please rebase to pass CI


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



[GitHub] [nuttx] acassis commented on pull request #8907: video/fb: add vsync offset support

2023-03-28 Thread via GitHub


acassis commented on PR #8907:
URL: https://github.com/apache/nuttx/pull/8907#issuecomment-1487375944

   please rebase to pass CI


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



[GitHub] [nuttx] acassis commented on pull request #8908: nrf53: add RTC and tickless support

2023-03-28 Thread via GitHub


acassis commented on PR #8908:
URL: https://github.com/apache/nuttx/pull/8908#issuecomment-1487376893

   please rebase to pass CI


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



[GitHub] [nuttx] acassis commented on pull request #8909: nrf53: add GPIOTE support (GPIO interrupts)

2023-03-28 Thread via GitHub


acassis commented on PR #8909:
URL: https://github.com/apache/nuttx/pull/8909#issuecomment-1487377385

   please rebase to pass CI


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



[GitHub] [nuttx] ALTracer commented on pull request #8906: MiniF4 peripherals support improvements

2023-03-28 Thread via GitHub


ALTracer commented on PR #8906:
URL: https://github.com/apache/nuttx/pull/8906#issuecomment-1487487457

   Will rebase & test on master, fix lint warnings from local checkpatch.pl, 
and add README.md for this board, just later this week.
   To clarify, did you use precisely WeAct boards v3.1 revision like me, or 
some other noname boards? Pinout might differ.
   Is Documentation/ in .rst format the new preferred place for board docs? 
What about converting old readmes?


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



[GitHub] [nuttx-apps] patacongo commented on pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

2023-03-28 Thread via GitHub


patacongo commented on PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683#issuecomment-1487491570

   Looks like this is trying to use the NuttX buildroot toolchain:
   
   /usr/bin/bash: arm-nuttx-eabi-gcc: command not found
   


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



[GitHub] [nuttx] pkarashchenko merged pull request #8920: risc-v/espressif: Fix NULL-dereferencing in WDT interrupt handling

2023-03-28 Thread via GitHub


pkarashchenko merged PR #8920:
URL: https://github.com/apache/nuttx/pull/8920


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



[nuttx] branch master updated: risc-v/espressif: Fix NULL-dereferencing in WDT interrupt handling

2023-03-28 Thread pkarashchenko
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new f462be5365 risc-v/espressif: Fix NULL-dereferencing in WDT interrupt 
handling
f462be5365 is described below

commit f462be5365894817c8529f620fc7c0f64fb4e253
Author: Gustavo Henrique Nihei 
AuthorDate: Tue Mar 28 09:46:46 2023 -0300

risc-v/espressif: Fix NULL-dereferencing in WDT interrupt handling

Signed-off-by: Gustavo Henrique Nihei 
---
 arch/risc-v/src/espressif/esp_wdt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/risc-v/src/espressif/esp_wdt.c 
b/arch/risc-v/src/espressif/esp_wdt.c
index f423218b46..9688f943d6 100644
--- a/arch/risc-v/src/espressif/esp_wdt.c
+++ b/arch/risc-v/src/espressif/esp_wdt.c
@@ -74,7 +74,7 @@ struct esp_wdt_lowerhalf_s
   uint32_t lastreset; /* The last reset time */
   bool started;   /* True: Timer has been started */
   xcpt_t   handler;   /* User Handler */
-  void *   upper; /* Pointer to watchdog_upperhalf_s */
+  void*upper; /* Pointer to watchdog_upperhalf_s */
 };
 
 /
@@ -577,7 +577,7 @@ int esp_wdt_initialize(void)
 
   /* Attach the handler for the timer IRQ */
 
-  irq_attach(ESP_IRQ_TG0_WDT_LEVEL, (xcpt_t)wdt_handler, NULL);
+  irq_attach(ESP_IRQ_TG0_WDT_LEVEL, (xcpt_t)wdt_handler, lower);
 
   /* Enable the allocated CPU interrupt */
 



[GitHub] [nuttx-apps] pkarashchenko commented on pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

2023-03-28 Thread via GitHub


pkarashchenko commented on PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683#issuecomment-1487496587

   Some configs have it enabled, but CI changes the toolchain to either 
GNU_EABI or CLANG, so the actual build is done with one of those


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



[GitHub] [nuttx-apps] pkarashchenko commented on pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

2023-03-28 Thread via GitHub


pkarashchenko commented on PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683#issuecomment-1487497263

   @xiaoxiang781216 could you please rebase PR?


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



[GitHub] [nuttx] acassis commented on a diff in pull request #8921: usbhost_hidkbd: Add the option to use interrupt transfers.

2023-03-28 Thread via GitHub


acassis commented on code in PR #8921:
URL: https://github.com/apache/nuttx/pull/8921#discussion_r1151181433


##
drivers/usbhost/usbhost_hidkbd.c:
##
@@ -977,6 +1023,332 @@ static inline void usbhost_encodescancode(FAR struct 
usbhost_state_s *priv,
 }
 #endif
 
+/
+ * Name: usbhost_get_capslock
+ *
+ * Description:
+ *  Get the global value of caps lock.
+ *
+ * Input Parameters:
+ *   None
+ *
+ * Returned Value:
+ *   The value of g_caps_lock
+ *
+ /
+
+static inline bool usbhost_get_capslock()

Review Comment:
   ```suggestion
   static inline bool usbhost_get_capslock(void)



##
drivers/usbhost/usbhost_hidkbd.c:
##
@@ -1801,6 +2117,131 @@ static int usbhost_tdfree(FAR struct usbhost_state_s 
*priv)
   return result;
 }
 
+/
+ * Name: usbhost_cralloc
+ *
+ * Description:
+ *   Allocate control request buffer memory.
+ *
+ * Input Parameters:
+ *   priv - A reference to the class instance.
+ *
+ * Returned Value:
+ *   On success, zero (OK) is returned.  On failure, an negated errno value
+ *   is returned to indicate the nature of the failure.
+ *
+ /
+
+static int usbhost_cralloc(FAR struct usbhost_state_s *priv)
+{
+  FAR struct usbhost_hubport_s *hport;
+
+  DEBUGASSERT(priv != NULL && priv->usbclass.hport != NULL &&
+  priv->tbuffer == NULL);
+  hport = priv->usbclass.hport;
+
+  return DRVR_ALLOC(hport->drvr, &priv->ctrlreq, &priv->ctrllen);
+}
+
+/
+ * Name: usbhost_crfree
+ *
+ * Description:
+ *   Free control request buffer memory.
+ *
+ * Input Parameters:
+ *   priv - A reference to the class instance.
+ *
+ * Returned Value:
+ *   On success, zero (OK) is returned.  On failure, an negated errno value
+ *   is returned to indicate the nature of the failure.
+ *
+ /
+
+static int usbhost_crfree(FAR struct usbhost_state_s *priv)
+{
+  FAR struct usbhost_hubport_s *hport;
+  int result = OK;
+
+  DEBUGASSERT(priv);
+
+  if (priv->ctrlreq)
+{
+  DEBUGASSERT(priv->usbclass.hport);
+  hport = priv->usbclass.hport;
+  result= DRVR_FREE(hport->drvr, priv->ctrlreq);
+  priv->ctrlreq = NULL;
+  priv->ctrllen = 0;
+}
+
+  return result;
+}
+
+/
+ * Name: usbhost_send_request
+ *
+ * Description:
+ *   Send a request.
+ *
+ * Input Parameters:
+ *   priv  - A reference to the class instance.
+ *   dir   - USB_REQ_DIR_IN or USB_REQ_DIR_OUT
+ *   req   - request identifier
+ *   value - request value
+ *   index - request index
+ *   len   - request length
+ *
+ * Returned Value:
+ *   On success, zero (OK) is returned.  On failure, an negated errno value
+ *   is returned to indicate the nature of the failure.
+ *
+ /
+
+static int usbhost_send_request(FAR struct usbhost_state_s *priv,
+uint8_t dir,
+uint8_t req,
+uint16_t value,
+uint16_t index,
+uint16_t len, uint8_t *data)

Review Comment:
   Please align "uint*" lines to start just at start of "FAR"



##
drivers/usbhost/usbhost_hidkbd.c:
##
@@ -977,6 +1023,332 @@ static inline void usbhost_encodescancode(FAR struct 
usbhost_state_s *priv,
 }
 #endif
 
+/
+ * Name: usbhost_get_capslock
+ *
+ * Description:
+ *  Get the global value of caps lock.
+ *
+ * Input Parameters:
+ *   None
+ *
+ * Returned Value:
+ *   The value of g_caps_lock
+ *
+ /
+
+static inline bool usbhost_get_capslock()
+{
+  irqstate_t flags;
+  bool retval;
+
+  flags = enter_critical_section();
+  retval = g_caps_lock;
+  leave_critical_section(flags);
+
+  return retval;
+}
+
+/
+ * Name: usbhost_toggle_capslock
+ *
+ * Description:
+ *  Toggle g_caps_lock.
+ *
+ * Input Parameters:
+ *   None
+ *
+ * Returned Value:
+ *   None
+ *
+ /
+
+static inline void usbhost_toggle_capslock()

Review Comment:
   ```suggestion
   static inline void usbhost_toggle_capslock(void)



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

[GitHub] [nuttx] acassis commented on pull request #8921: usbhost_hidkbd: Add the option to use interrupt transfers.

2023-03-28 Thread via GitHub


acassis commented on PR #8921:
URL: https://github.com/apache/nuttx/pull/8921#issuecomment-1487637310

   Hi @ldube nice work improving the USB Keyboard, thank you! I suggested 
include the (void) because some compilers will complain about missing it.


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



[GitHub] [nuttx] acassis merged pull request #8909: nrf53: add GPIOTE support (GPIO interrupts)

2023-03-28 Thread via GitHub


acassis merged PR #8909:
URL: https://github.com/apache/nuttx/pull/8909


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



[nuttx] 01/03: arch/nrf53: rename nrf53_gpioe.h to nrf53_gpiote.h

2023-03-28 Thread acassis
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/nuttx.git

commit 74b0e8c2c8b602495d87a0d76d63a969e7289edd
Author: raiden00pl 
AuthorDate: Tue Mar 14 10:35:13 2023 +0100

arch/nrf53: rename nrf53_gpioe.h to nrf53_gpiote.h
---
 arch/arm/src/nrf53/hardware/{nrf53_gpioe.h => nrf53_gpiote.h} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/src/nrf53/hardware/nrf53_gpioe.h 
b/arch/arm/src/nrf53/hardware/nrf53_gpiote.h
similarity index 99%
rename from arch/arm/src/nrf53/hardware/nrf53_gpioe.h
rename to arch/arm/src/nrf53/hardware/nrf53_gpiote.h
index 49285cbf0f..aa2239580d 100644
--- a/arch/arm/src/nrf53/hardware/nrf53_gpioe.h
+++ b/arch/arm/src/nrf53/hardware/nrf53_gpiote.h
@@ -1,5 +1,5 @@
 /
- * arch/arm/src/nrf53/hardware/nrf53_gpioe.h
+ * arch/arm/src/nrf53/hardware/nrf53_gpiote.h
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with



[nuttx] branch master updated (f462be5365 -> 6a2152aa44)

2023-03-28 Thread acassis
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/nuttx.git


from f462be5365 risc-v/espressif: Fix NULL-dereferencing in WDT interrupt 
handling
 new 74b0e8c2c8 arch/nrf53: rename nrf53_gpioe.h to nrf53_gpiote.h
 new bcecf2023f arch/nrf53: add GPIOTE support
 new 6a2152aa44 boards/nrf5340-dk: add buttons example

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/arm/src/nrf53/Kconfig |  30 +++
 arch/arm/src/nrf53/Make.defs   |   4 +
 .../hardware/{nrf53_gpioe.h => nrf53_gpiote.h} |   2 +-
 .../src/nrf53/hardware/nrf53_memorymap_cpunet.h|   2 +-
 .../{nrf52/nrf52_gpiote.c => nrf53/nrf53_gpiote.c} | 243 +
 .../{nrf52/nrf52_gpiote.h => nrf53/nrf53_gpiote.h} |  56 +++--
 boards/Kconfig |   1 +
 .../{nsh_cpuapp => buttons_cpuapp}/defconfig   |   7 +
 boards/arm/nrf53/nrf5340-dk/src/Makefile   |   4 +
 boards/arm/nrf53/nrf5340-dk/src/nrf53_bringup.c|  14 ++
 .../nrf5340-dk/src/nrf53_buttons.c}|  18 +-
 11 files changed, 244 insertions(+), 137 deletions(-)
 rename arch/arm/src/nrf53/hardware/{nrf53_gpioe.h => nrf53_gpiote.h} (99%)
 copy arch/arm/src/{nrf52/nrf52_gpiote.c => nrf53/nrf53_gpiote.c} (71%)
 copy arch/arm/src/{nrf52/nrf52_gpiote.h => nrf53/nrf53_gpiote.h} (81%)
 copy boards/arm/nrf53/nrf5340-dk/configs/{nsh_cpuapp => 
buttons_cpuapp}/defconfig (87%)
 copy boards/arm/{nrf52/nrf52840-dk/src/nrf52_buttons.c => 
nrf53/nrf5340-dk/src/nrf53_buttons.c} (91%)



[nuttx] 03/03: boards/nrf5340-dk: add buttons example

2023-03-28 Thread acassis
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/nuttx.git

commit 6a2152aa44758e4cbb2eb58fb19de1ed9d5f789f
Author: raiden00pl 
AuthorDate: Tue Mar 14 10:34:42 2023 +0100

boards/nrf5340-dk: add buttons example
---
 boards/Kconfig |   1 +
 .../nrf5340-dk/configs/buttons_cpuapp/defconfig|  50 +++
 boards/arm/nrf53/nrf5340-dk/src/Makefile   |   4 +
 boards/arm/nrf53/nrf5340-dk/src/nrf53_bringup.c|  14 ++
 boards/arm/nrf53/nrf5340-dk/src/nrf53_buttons.c| 153 +
 5 files changed, 222 insertions(+)

diff --git a/boards/Kconfig b/boards/Kconfig
index 06da821666..3321ee0419 100644
--- a/boards/Kconfig
+++ b/boards/Kconfig
@@ -1071,6 +1071,7 @@ config ARCH_BOARD_NRF5340_DK
depends on ARCH_CHIP_NRF53
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
+   select ARCH_HAVE_IRQBUTTONS
---help---
This option selects the nRF5340 Development Kit (PCA10095)
 
diff --git a/boards/arm/nrf53/nrf5340-dk/configs/buttons_cpuapp/defconfig 
b/boards/arm/nrf53/nrf5340-dk/configs/buttons_cpuapp/defconfig
new file mode 100644
index 00..456af44faa
--- /dev/null
+++ b/boards/arm/nrf53/nrf5340-dk/configs/buttons_cpuapp/defconfig
@@ -0,0 +1,50 @@
+#
+# This file is autogenerated: PLEASE DO NOT EDIT IT.
+#
+# You can use "make menuconfig" to make any modifications to the installed 
.config file.
+# You can then do "make savedefconfig" to generate a new defconfig file that 
includes your
+# modifications.
+#
+# CONFIG_NSH_DISABLE_IFCONFIG is not set
+# CONFIG_NSH_DISABLE_PS is not set
+# CONFIG_STANDARD_SERIAL is not set
+CONFIG_ARCH="arm"
+CONFIG_ARCH_BOARD="nrf5340-dk"
+CONFIG_ARCH_BOARD_NRF5340_DK=y
+CONFIG_ARCH_BUTTONS=y
+CONFIG_ARCH_CHIP="nrf53"
+CONFIG_ARCH_CHIP_NRF5340=y
+CONFIG_ARCH_CHIP_NRF5340_CPUAPP=y
+CONFIG_ARCH_CHIP_NRF53=y
+CONFIG_ARCH_IRQBUTTONS=y
+CONFIG_ARCH_STACKDUMP=y
+CONFIG_ARCH_STDARG_H=y
+CONFIG_BOARD_LOOPSPERMSEC=5500
+CONFIG_EXAMPLES_BUTTONS=y
+CONFIG_EXPERIMENTAL=y
+CONFIG_FAT_LCNAMES=y
+CONFIG_FAT_LFN=y
+CONFIG_FS_FAT=y
+CONFIG_INIT_ENTRYPOINT="nsh_main"
+CONFIG_INPUT=y
+CONFIG_INPUT_BUTTONS=y
+CONFIG_INPUT_BUTTONS_LOWER=y
+CONFIG_MM_REGIONS=2
+CONFIG_NRF53_GPIOTE=y
+CONFIG_NRF53_UART0=y
+CONFIG_NSH_ARCHINIT=y
+CONFIG_NSH_FILEIOSIZE=512
+CONFIG_NSH_LINELEN=64
+CONFIG_NSH_READLINE=y
+CONFIG_PREALLOC_TIMERS=4
+CONFIG_RAM_SIZE=524288
+CONFIG_RAM_START=0x2000
+CONFIG_RAW_BINARY=y
+CONFIG_RR_INTERVAL=200
+CONFIG_SCHED_WAITPID=y
+CONFIG_START_DAY=26
+CONFIG_START_MONTH=3
+CONFIG_SYMTAB_ORDEREDBYNAME=y
+CONFIG_SYSTEM_NSH=y
+CONFIG_TASK_NAME_SIZE=0
+CONFIG_UART0_SERIAL_CONSOLE=y
diff --git a/boards/arm/nrf53/nrf5340-dk/src/Makefile 
b/boards/arm/nrf53/nrf5340-dk/src/Makefile
index 9c5313b9b7..0b4d1b1546 100644
--- a/boards/arm/nrf53/nrf5340-dk/src/Makefile
+++ b/boards/arm/nrf53/nrf5340-dk/src/Makefile
@@ -36,6 +36,10 @@ else
 CSRCS += nrf53_userleds.c
 endif
 
+ifeq ($(CONFIG_ARCH_BUTTONS),y)
+CSRCS += nrf53_buttons.c
+endif
+
 ifeq ($(CONFIG_TIMER),y)
 ifeq ($(CONFIG_NRF53_TIMER),y)
 CSRCS += nrf53_timer.c
diff --git a/boards/arm/nrf53/nrf5340-dk/src/nrf53_bringup.c 
b/boards/arm/nrf53/nrf5340-dk/src/nrf53_bringup.c
index 3523706b0a..147b811912 100644
--- a/boards/arm/nrf53/nrf5340-dk/src/nrf53_bringup.c
+++ b/boards/arm/nrf53/nrf5340-dk/src/nrf53_bringup.c
@@ -31,6 +31,10 @@
 #  include 
 #endif
 
+#ifdef CONFIG_INPUT_BUTTONS
+#  include 
+#endif
+
 #ifdef CONFIG_NRF53_SOFTDEVICE_CONTROLLER
 #  include "nrf53_sdc.h"
 #endif
@@ -79,6 +83,16 @@ int nrf53_bringup(void)
 }
 #endif
 
+#ifdef CONFIG_INPUT_BUTTONS
+  /* Register the BUTTON driver */
+
+  ret = btn_lower_initialize("/dev/buttons");
+  if (ret < 0)
+{
+  syslog(LOG_ERR, "ERROR: btn_lower_initialize() failed: %d\n", ret);
+}
+#endif
+
 #ifdef CONFIG_RPTUN
 #ifdef CONFIG_NRF53_APPCORE
   nrf53_rptun_init("nrf53-shmem", "appcore");
diff --git a/boards/arm/nrf53/nrf5340-dk/src/nrf53_buttons.c 
b/boards/arm/nrf53/nrf5340-dk/src/nrf53_buttons.c
new file mode 100644
index 00..521551f868
--- /dev/null
+++ b/boards/arm/nrf53/nrf5340-dk/src/nrf53_buttons.c
@@ -0,0 +1,153 @@
+/
+ * boards/arm/nrf53/nrf5340-dk/src/nrf53_buttons.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distribut

[nuttx] 02/03: arch/nrf53: add GPIOTE support

2023-03-28 Thread acassis
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/nuttx.git

commit bcecf2023f90ea22ff0d5941c128706bb8a4314a
Author: raiden00pl 
AuthorDate: Mon Mar 13 12:51:29 2023 +0100

arch/nrf53: add GPIOTE support
---
 arch/arm/src/nrf53/Kconfig |  30 +
 arch/arm/src/nrf53/Make.defs   |   4 +
 .../src/nrf53/hardware/nrf53_memorymap_cpunet.h|   2 +-
 arch/arm/src/nrf53/nrf53_gpiote.c  | 653 +
 arch/arm/src/nrf53/nrf53_gpiote.h  | 172 ++
 5 files changed, 860 insertions(+), 1 deletion(-)

diff --git a/arch/arm/src/nrf53/Kconfig b/arch/arm/src/nrf53/Kconfig
index d5ad8fe8d8..890c7a1dc3 100644
--- a/arch/arm/src/nrf53/Kconfig
+++ b/arch/arm/src/nrf53/Kconfig
@@ -23,6 +23,7 @@ config NRF53_APPCORE
select ARM_HAVE_DSP
select ARCH_HAVE_FPU
select NRF53_HAVE_PWM
+   select NRF52_HAVE_GPIOTE1
select NRF53_HAVE_SAADC
select NRF53_HAVE_UART1
 
@@ -75,6 +76,10 @@ config NRF53_HAVE_UART1
bool
default n
 
+config NRF53_HAVE_GPIOTE1
+   bool
+   default n
+
 config NRF53_HAVE_PWM
bool
default n
@@ -103,6 +108,10 @@ config NRF53_PWM
 
 menu "NRF53 Peripheral Selection"
 
+config NRF53_GPIOTE
+   bool "GPIOTE (GPIO interrupts)"
+   default n
+
 config NRF53_UART0
bool "UART0"
default n
@@ -404,6 +413,27 @@ endif # NRF53_SAADC
 
 endmenu # SAADC Configuration
 
+menu "GPIO Interrupt Configuration"
+
+config NRF53_PER_PIN_INTERRUPTS
+   bool "Per-pin interrupt callbacks"
+   default !DEFAULT_SMALL
+   depends on NRF53_GPIOTE
+   ---help---
+   The GPIOTE peripheral supports a limited number of channels 
which can
+   be set to EVENT mode and thus generate interrupts on pin state 
changes.
+   Another mechanism offered by the GPIO/GPIOTE peripherals is the 
PORT
+   event. This event is generated from a signal shared by all pins 
in
+   the GPIO port.
+
+   This option enables the ability to set per-pin callbacks that 
will
+   be invoked from the main GPIOTE ISR when a PORT event is 
generated.
+   As this involves extra storage to store each callback, this 
option can
+   be disabled to save space. In such case, it is possible to set 
a callback
+   for the whole PORT event directly.
+
+endmenu # GPIO Interrupt Configuration
+
 menuconfig NRF53_SOFTDEVICE_CONTROLLER
bool "SoftDevice Controller"
depends on ALLOW_BSDNORDIC_COMPONENTS
diff --git a/arch/arm/src/nrf53/Make.defs b/arch/arm/src/nrf53/Make.defs
index ab2ee577a5..b90a88b948 100644
--- a/arch/arm/src/nrf53/Make.defs
+++ b/arch/arm/src/nrf53/Make.defs
@@ -35,6 +35,10 @@ ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y)
 CHIP_CSRCS += nrf53_idle.c
 endif
 
+ifeq ($(CONFIG_NRF53_GPIOTE),y)
+CHIP_CSRCS += nrf53_gpiote.c
+endif
+
 ifeq ($(CONFIG_NRF53_UART),y)
 CHIP_CSRCS += nrf53_serial.c
 endif
diff --git a/arch/arm/src/nrf53/hardware/nrf53_memorymap_cpunet.h 
b/arch/arm/src/nrf53/hardware/nrf53_memorymap_cpunet.h
index 8479c61bbd..64088bedb7 100644
--- a/arch/arm/src/nrf53/hardware/nrf53_memorymap_cpunet.h
+++ b/arch/arm/src/nrf53/hardware/nrf53_memorymap_cpunet.h
@@ -48,7 +48,7 @@
 #define NRF53_CTRLAPPERI_BASE 0x41006000
 #define NRF53_RADIO_BASE  0x41008000
 #define NRF53_RNG_BASE0x41009000
-#define NRF53_GPIOTE_BASE 0x4100A000
+#define NRF53_GPIOTE0_BASE0x4100A000
 #define NRF53_WDT_BASE0x4100B000
 #define NRF53_TIMER0_BASE 0x4100C000
 #define NRF53_ECB_BASE0x4100D000
diff --git a/arch/arm/src/nrf53/nrf53_gpiote.c 
b/arch/arm/src/nrf53/nrf53_gpiote.c
new file mode 100644
index 00..b4c2913088
--- /dev/null
+++ b/arch/arm/src/nrf53/nrf53_gpiote.c
@@ -0,0 +1,653 @@
+/
+ * arch/arm/src/nrf53/nrf53_gpiote.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ /
+
+/***

[GitHub] [nuttx] acassis merged pull request #8908: nrf53: add RTC and tickless support

2023-03-28 Thread via GitHub


acassis merged PR #8908:
URL: https://github.com/apache/nuttx/pull/8908


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



[nuttx] 01/03: arch/nrf53: add RTC support

2023-03-28 Thread acassis
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/nuttx.git

commit f9f41bbd95d7250e3d7505d81fcf8d1bbc95a29e
Author: raiden00pl 
AuthorDate: Mon Mar 13 12:55:17 2023 +0100

arch/nrf53: add RTC support
---
 arch/arm/src/nrf53/Kconfig |  15 +
 arch/arm/src/nrf53/Make.defs   |   4 +
 arch/arm/src/nrf53/nrf53_rtc.c | 801 +
 arch/arm/src/nrf53/nrf53_rtc.h | 139 +++
 4 files changed, 959 insertions(+)

diff --git a/arch/arm/src/nrf53/Kconfig b/arch/arm/src/nrf53/Kconfig
index 890c7a1dc3..b4b8e07c7a 100644
--- a/arch/arm/src/nrf53/Kconfig
+++ b/arch/arm/src/nrf53/Kconfig
@@ -106,6 +106,10 @@ config NRF53_PWM
bool
default n
 
+config NRF53_RTC
+   bool
+   default n
+
 menu "NRF53 Peripheral Selection"
 
 config NRF53_GPIOTE
@@ -159,6 +163,17 @@ config NRF53_SAADC
bool "SAADC"
default n
 
+config NRF53_RTC0
+   bool "RTC0"
+   select NRF53_RTC
+   depends on !NRF53_SOFTDEVICE_CONTROLLER
+   default n
+
+config NRF53_RTC1
+   bool "RTC1"
+   select NRF53_RTC
+   default n
+
 endmenu # NRF53 Peripheral Selection
 
 menu "Clock Configuration"
diff --git a/arch/arm/src/nrf53/Make.defs b/arch/arm/src/nrf53/Make.defs
index b90a88b948..81f78f16e8 100644
--- a/arch/arm/src/nrf53/Make.defs
+++ b/arch/arm/src/nrf53/Make.defs
@@ -70,6 +70,10 @@ ifeq ($(CONFIG_NRF53_SAADC),y)
 CHIP_CSRCS += nrf53_adc.c
 endif
 
+ifeq ($(CONFIG_NRF53_RTC),y)
+CHIP_CSRCS += nrf53_rtc.c
+endif
+
 ifeq ($(CONFIG_PM),y)
 CHIP_CSRCS += nrf53_pminitialize.c
 endif
diff --git a/arch/arm/src/nrf53/nrf53_rtc.c b/arch/arm/src/nrf53/nrf53_rtc.c
new file mode 100644
index 00..d104feb6c9
--- /dev/null
+++ b/arch/arm/src/nrf53/nrf53_rtc.c
@@ -0,0 +1,801 @@
+/
+ * arch/arm/src/nrf53/nrf53_rtc.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ /
+
+/
+ * Included Files
+ /
+
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+
+#include "arm_internal.h"
+#include "hardware/nrf53_rtc.h"
+
+#include "nrf53_rtc.h"
+
+/
+ * Pre-processor Definitions
+ /
+
+/
+ * Private Types
+ /
+
+struct nrf53_rtc_priv_s
+{
+  struct nrf53_rtc_ops_s *ops;
+  uint32_tbase;
+  uint32_tirq;
+  uint8_t chan;
+  boolinuse;
+};
+
+/
+ * Private Function Prototypes
+ /
+
+/* RTC registers access */
+
+static uint32_t nrf53_rtc_getreg(struct nrf53_rtc_dev_s *dev,
+ uint32_t offset);
+static void nrf53_rtc_putreg(struct nrf53_rtc_dev_s *dev,
+ uint32_t offset,
+ uint32_t value);
+
+/* RTC helpers **/
+
+static uint32_t nrf53_rtc_irq2reg(struct nrf53_rtc_dev_s *dev,
+  uint8_t s);
+static uint32_t nrf53_rtc_evt2reg(struct nrf53_rtc_dev_s *dev,
+  uint8_t evt);
+
+/* RTC operations ***/
+
+static int nrf53_rtc_start(struct nrf53_rtc_dev_s *dev);
+static int nrf53_rtc_stop(struct nrf53_rtc_dev_s *dev);
+static int nrf53_rtc_clear(struct nrf53_rtc_dev_s *dev);
+static int nrf53_rtc_trgovrflw(struct nrf53_rtc_dev_s *dev);
+static int nrf53_rtc_getcounter(struct nrf53_rt

[nuttx] branch master updated (6a2152aa44 -> da47c468b8)

2023-03-28 Thread acassis
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/nuttx.git


from 6a2152aa44 boards/nrf5340-dk: add buttons example
 new f9f41bbd95 arch/nrf53: add RTC support
 new d23759d457 arch/nrf53: add tickless support
 new da47c468b8 boards/nrf5340-dk: add ostest_tickless configuration

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/arm/src/nrf53/Kconfig |  36 +++
 arch/arm/src/nrf53/Make.defs   |   9 +
 .../src/{nrf52/nrf52_rtc.c => nrf53/nrf53_rtc.c}   | 353 ++---
 arch/arm/src/nrf53/nrf53_rtc.h | 139 
 .../nrf53_tickless_rtc.c}  |  82 +++--
 .../defconfig  |   3 +-
 6 files changed, 391 insertions(+), 231 deletions(-)
 copy arch/arm/src/{nrf52/nrf52_rtc.c => nrf53/nrf53_rtc.c} (62%)
 create mode 100644 arch/arm/src/nrf53/nrf53_rtc.h
 copy arch/arm/src/{nrf52/nrf52_tickless_rtc.c => nrf53/nrf53_tickless_rtc.c} 
(78%)
 copy boards/arm/nrf53/nrf5340-dk/configs/{timer_cpuapp => 
ostest_tickless_cpuapp}/defconfig (96%)



[nuttx] 03/03: boards/nrf5340-dk: add ostest_tickless configuration

2023-03-28 Thread acassis
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/nuttx.git

commit da47c468b8897ccaee18173512d6df523e439bc6
Author: raiden00pl 
AuthorDate: Thu Mar 16 10:01:55 2023 +0100

boards/nrf5340-dk: add ostest_tickless configuration
---
 .../configs/ostest_tickless_cpuapp/defconfig   | 47 ++
 1 file changed, 47 insertions(+)

diff --git 
a/boards/arm/nrf53/nrf5340-dk/configs/ostest_tickless_cpuapp/defconfig 
b/boards/arm/nrf53/nrf5340-dk/configs/ostest_tickless_cpuapp/defconfig
new file mode 100644
index 00..9011dd5980
--- /dev/null
+++ b/boards/arm/nrf53/nrf5340-dk/configs/ostest_tickless_cpuapp/defconfig
@@ -0,0 +1,47 @@
+#
+# This file is autogenerated: PLEASE DO NOT EDIT IT.
+#
+# You can use "make menuconfig" to make any modifications to the installed 
.config file.
+# You can then do "make savedefconfig" to generate a new defconfig file that 
includes your
+# modifications.
+#
+# CONFIG_NSH_DISABLE_IFCONFIG is not set
+# CONFIG_NSH_DISABLE_PS is not set
+# CONFIG_STANDARD_SERIAL is not set
+CONFIG_ARCH="arm"
+CONFIG_ARCH_BOARD="nrf5340-dk"
+CONFIG_ARCH_BOARD_NRF5340_DK=y
+CONFIG_ARCH_CHIP="nrf53"
+CONFIG_ARCH_CHIP_NRF5340=y
+CONFIG_ARCH_CHIP_NRF5340_CPUAPP=y
+CONFIG_ARCH_CHIP_NRF53=y
+CONFIG_ARCH_STACKDUMP=y
+CONFIG_ARCH_STDARG_H=y
+CONFIG_BOARD_LOOPSPERMSEC=5500
+CONFIG_BUILTIN=y
+CONFIG_EXPERIMENTAL=y
+CONFIG_FAT_LCNAMES=y
+CONFIG_FAT_LFN=y
+CONFIG_FS_FAT=y
+CONFIG_INIT_ENTRYPOINT="nsh_main"
+CONFIG_INTELHEX_BINARY=y
+CONFIG_MM_REGIONS=2
+CONFIG_NRF53_UART0=y
+CONFIG_NSH_ARCHINIT=y
+CONFIG_NSH_BUILTIN_APPS=y
+CONFIG_NSH_FILEIOSIZE=512
+CONFIG_NSH_LINELEN=64
+CONFIG_NSH_READLINE=y
+CONFIG_PREALLOC_TIMERS=4
+CONFIG_RAM_SIZE=524288
+CONFIG_RAM_START=0x2000
+CONFIG_RAW_BINARY=y
+CONFIG_RR_INTERVAL=200
+CONFIG_SCHED_WAITPID=y
+CONFIG_START_DAY=26
+CONFIG_START_MONTH=3
+CONFIG_SYMTAB_ORDEREDBYNAME=y
+CONFIG_SYSTEM_NSH=y
+CONFIG_TASK_NAME_SIZE=0
+CONFIG_TESTING_OSTEST=y
+CONFIG_UART0_SERIAL_CONSOLE=y



[nuttx] 02/03: arch/nrf53: add tickless support

2023-03-28 Thread acassis
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/nuttx.git

commit d23759d45719dc1bf4396e9203d43784eac67b5c
Author: raiden00pl 
AuthorDate: Mon Mar 13 16:05:38 2023 +0100

arch/nrf53: add tickless support
---
 arch/arm/src/nrf53/Kconfig  |  21 ++
 arch/arm/src/nrf53/Make.defs|   5 +
 arch/arm/src/nrf53/nrf53_tickless_rtc.c | 342 
 3 files changed, 368 insertions(+)

diff --git a/arch/arm/src/nrf53/Kconfig b/arch/arm/src/nrf53/Kconfig
index b4b8e07c7a..4cf7b88105 100644
--- a/arch/arm/src/nrf53/Kconfig
+++ b/arch/arm/src/nrf53/Kconfig
@@ -248,8 +248,29 @@ config NRF53_SYSTIMER_SYSTICK
you choose this option, WFE/WFI will not be used
in idle loop.
 
+config NRF53_SYSTIMER_RTC
+   bool "RTC"
+   select NRF53_RTC
+   select SCHED_TICKLESS
+   select SCHED_TICKLESS_ALARM
+   select NRF53_USE_LFCLK
+   ---help---
+   Use RTC timer in tickless mode.
+
 endchoice
 
+if NRF53_SYSTIMER_RTC
+
+config NRF53_SYSTIMER_RTC_INSTANCE
+   int "RTC timer instance"
+   default 0 if !NRF53_SOFTDEVICE_CONTROLLER
+   default 1 if NRF53_SOFTDEVICE_CONTROLLER
+   range 0 1
+   ---help---
+   Which RTC instance to use to drive the system timer
+
+endif
+
 endmenu # System Timer
 
 menu "PWM configuration"
diff --git a/arch/arm/src/nrf53/Make.defs b/arch/arm/src/nrf53/Make.defs
index 81f78f16e8..77b2916452 100644
--- a/arch/arm/src/nrf53/Make.defs
+++ b/arch/arm/src/nrf53/Make.defs
@@ -22,7 +22,12 @@ include armv8-m/Make.defs
 
 ifeq ($(CONFIG_NRF53_SYSTIMER_SYSTICK),y)
 CHIP_CSRCS += nrf53_systick.c
+else
+ifeq ($(CONFIG_NRF53_SYSTIMER_RTC),y)
+CHIP_CSRCS += nrf53_tickless_rtc.c
 endif
+endif
+
 CHIP_CSRCS += nrf53_start.c nrf53_clockconfig.c nrf53_irq.c nrf53_utils.c
 CHIP_CSRCS += nrf53_allocateheap.c nrf53_lowputc.c nrf53_gpio.c
 CHIP_CSRCS += nrf53_uid.c
diff --git a/arch/arm/src/nrf53/nrf53_tickless_rtc.c 
b/arch/arm/src/nrf53/nrf53_tickless_rtc.c
new file mode 100644
index 00..418fee3288
--- /dev/null
+++ b/arch/arm/src/nrf53/nrf53_tickless_rtc.c
@@ -0,0 +1,342 @@
+/
+ * arch/arm/src/nrf53/nrf53_tickless_rtc.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ /
+
+/
+ * Included Files
+ /
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include "arm_internal.h"
+#include "hardware/nrf53_rtc.h"
+#include "nrf53_rtc.h"
+
+/
+ * Pre-processor Definitions
+ /
+
+/* Check configuration */
+
+#ifdef CONFIG_TIMER_ARCH
+#  error CONFIG_TIMER_ARCH must be not set
+#endif
+
+/* Check corresponding RTC support */
+
+#if (CONFIG_NRF53_SYSTIMER_RTC_INSTANCE == 0) && !defined(CONFIG_NRF53_RTC0)
+#  error "Support for RTC0 is not enabled"
+#elif (CONFIG_NRF53_SYSTIMER_RTC_INSTANCE == 1) && !defined(CONFIG_NRF53_RTC1)
+#  error "Support for RTC1 is not enabled"
+#endif
+
+#define NRF53_RTC_PERIOD   (512)
+#define NRF53_RTC_MAX  (0x00ff)
+#define NRF53_RTC_MAX_TIME (NRF53_RTC_MAX * 31)
+
+/* Convert uS to timer count for f = 32768Hz, using more precision
+ * when possible:
+ * (1 / 32768) s ~ 30.51 uS ~ 31 uS
+ * 512 * (1 / 32768) s = 0.015625 s = 15625 uS
+ * So, instead of always dividing by 31, if t * 512 < (2**32 - 1), we can do:
+ * (t * 512) / 15625 ~ t / 30.51
+ */
+
+#define USEC_TO_COUNTER(t) (t > 0x7f ? (t / 31) : ((t * 512) / 15625))
+
+/* To convert from counter to uS we split the counter into one second worth
+ * of counts (32768) and a fractional part we can safely multiply first
+ * by (USEC_PER_SEC/8) and still be within 32 bit value
+ */
+
+#define COUNTER_TO_USEC(c) ((c / 32768) * USEC_PER_

[GitHub] [nuttx] acassis merged pull request #8893: rndis: various fixes for composite

2023-03-28 Thread via GitHub


acassis merged PR #8893:
URL: https://github.com/apache/nuttx/pull/8893


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



[nuttx] 02/05: rndis: fix dev info init for composite

2023-03-28 Thread acassis
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/nuttx.git

commit 10f1d3e76e63c8d61a0a3631b53ef39d1a5bf222
Author: raiden00pl 
AuthorDate: Tue Mar 21 12:16:44 2023 +0100

rndis: fix dev info init for composite
---
 drivers/usbdev/rndis.c | 22 ++
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/drivers/usbdev/rndis.c b/drivers/usbdev/rndis.c
index afc3c78573..840ce5a82a 100644
--- a/drivers/usbdev/rndis.c
+++ b/drivers/usbdev/rndis.c
@@ -87,6 +87,7 @@ static_assert((CONFIG_NET_LL_GUARDSIZE % 4) == 2,
 #define RNDIS_CONFIGID  (1)
 #define RNDIS_CONFIGIDNONE  (0)
 #define RNDIS_NINTERFACES   (2)
+#define RNDIS_NSTRIDS   (0)
 
 #define RNDIS_EPINTIN_ADDR  USB_EPIN(CONFIG_RNDIS_EPINTIN)
 #define RNDIS_EPBULKIN_ADDR USB_EPIN(CONFIG_RNDIS_EPBULKIN)
@@ -2847,13 +2848,9 @@ static int usbclass_classobject(int minor,
   drvr = &alloc->drvr;
   *classdev = &drvr->drvr;
 
-#ifdef CONFIG_RNDIS_COMPOSITE
-  priv->devinfo = *devinfo;
-#else
-  priv->devinfo.epno[RNDIS_EP_INTIN_IDX] = USB_EPNO(RNDIS_EPINTIN_ADDR);
-  priv->devinfo.epno[RNDIS_EP_BULKIN_IDX] = USB_EPNO(RNDIS_EPBULKIN_ADDR);
-  priv->devinfo.epno[RNDIS_EP_BULKOUT_IDX] = USB_EPNO(RNDIS_EPBULKOUT_ADDR);
-#endif
+  /* Get device info */
+
+  memcpy(&priv->devinfo, devinfo, sizeof(struct usbdev_devinfo_s));
 
   /* Initialize the USB ethernet driver structure */
 
@@ -2935,8 +2932,17 @@ int usbdev_rndis_initialize(FAR const uint8_t 
*mac_address)
   int ret;
   FAR struct usbdevclass_driver_s *classdev;
   FAR struct rndis_driver_s *drvr;
+  struct usbdev_devinfo_s devinfo;
+
+  memset(&devinfo, 0, sizeof(struct usbdev_devinfo_s));
+  devinfo.ninterfaces= RNDIS_NINTERFACES;
+  devinfo.nstrings   = RNDIS_NSTRIDS;
+  devinfo.nendpoints = RNDIS_NUM_EPS;
+  devinfo.epno[RNDIS_EP_INTIN_IDX]   = CONFIG_RNDIS_EPINTIN;
+  devinfo.epno[RNDIS_EP_BULKIN_IDX]  = CONFIG_RNDIS_EPBULKIN;
+  devinfo.epno[RNDIS_EP_BULKOUT_IDX] = CONFIG_RNDIS_EPBULKOUT;
 
-  ret = usbclass_classobject(0, NULL, &classdev);
+  ret = usbclass_classobject(0, &devinfo, &classdev);
   if (ret)
 {
   nerr("usbclass_classobject failed: %d\n", ret);



[nuttx] 01/05: rndis: refactor usbdev_rndis_get_composite_devdesc to make it more like in other composite drivers

2023-03-28 Thread acassis
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/nuttx.git

commit 9b70e010dca45e0d2e449d9bed51b564ff09231f
Author: raiden00pl 
AuthorDate: Tue Mar 21 10:16:59 2023 +0100

rndis: refactor usbdev_rndis_get_composite_devdesc to make it more like in 
other composite drivers
---
 drivers/usbdev/rndis.c | 76 +++---
 1 file changed, 54 insertions(+), 22 deletions(-)

diff --git a/drivers/usbdev/rndis.c b/drivers/usbdev/rndis.c
index 4e3f205235..afc3c78573 100644
--- a/drivers/usbdev/rndis.c
+++ b/drivers/usbdev/rndis.c
@@ -2056,27 +2056,31 @@ static int16_t usbclass_mkcfgdesc(FAR uint8_t *buf,
*/
 
   totallen = sizeof(g_rndis_cfgdesc);
-  memcpy(dest, &g_rndis_cfgdesc, totallen);
 
-  usbclass_copy_epdesc(RNDIS_EP_INTIN_IDX, &dest->epintindesc,
-   devinfo, hispeed);
-  usbclass_copy_epdesc(RNDIS_EP_BULKIN_IDX, &dest->epbulkindesc,
-   devinfo, hispeed);
-  usbclass_copy_epdesc(RNDIS_EP_BULKOUT_IDX, &dest->epbulkoutdesc,
-   devinfo, hispeed);
+  if (dest != NULL)
+{
+  memcpy(dest, &g_rndis_cfgdesc, totallen);
+
+  usbclass_copy_epdesc(RNDIS_EP_INTIN_IDX, &dest->epintindesc,
+   devinfo, hispeed);
+  usbclass_copy_epdesc(RNDIS_EP_BULKIN_IDX, &dest->epbulkindesc,
+   devinfo, hispeed);
+  usbclass_copy_epdesc(RNDIS_EP_BULKOUT_IDX, &dest->epbulkoutdesc,
+   devinfo, hispeed);
 
 #ifndef CONFIG_RNDIS_COMPOSITE
-  /* For a stand-alone device, just fill in the total length */
+  /* For a stand-alone device, just fill in the total length */
 
-  dest->cfgdesc.totallen[0] = LSBYTE(totallen);
-  dest->cfgdesc.totallen[1] = MSBYTE(totallen);
+  dest->cfgdesc.totallen[0] = LSBYTE(totallen);
+  dest->cfgdesc.totallen[1] = MSBYTE(totallen);
 #else
-  /* For composite device, apply possible offset to the interface numbers */
+  /* For composite device, apply possible offset to the interface numbers 
*/
 
-  dest->assoc_desc.firstif += devinfo->ifnobase;
-  dest->comm_ifdesc.ifno   += devinfo->ifnobase;
-  dest->data_ifdesc.ifno   += devinfo->ifnobase;
+  dest->assoc_desc.firstif += devinfo->ifnobase;
+  dest->comm_ifdesc.ifno   += devinfo->ifnobase;
+  dest->data_ifdesc.ifno   += devinfo->ifnobase;
 #endif
+}
 
   return totallen;
 }
@@ -3016,21 +3020,49 @@ void usbdev_rndis_get_composite_devdesc(struct 
composite_devdesc_s *dev)
 {
   memset(dev, 0, sizeof(struct composite_devdesc_s));
 
+  /* The callback functions for the RNDIS class.
+   *
+   * classobject() and uninitialize() must be provided by board-specific
+   * logic
+   */
+
   dev->mkconfdesc  = usbclass_mkcfgdesc;
   dev->mkstrdesc   = usbclass_mkstrdesc;
   dev->classobject = usbclass_classobject;
   dev->uninitialize= usbclass_uninitialize;
-  dev->nconfigs= RNDIS_NCONFIGS;
-  dev->configid= RNDIS_CONFIGID;
-  dev->cfgdescsize = sizeof(g_rndis_cfgdesc);
+
+  dev->nconfigs= RNDIS_NCONFIGS; /* Number of configurations 
supported  */
+  dev->configid= RNDIS_CONFIGID; /* The only supported 
configuration ID */
+
+  /* Let the construction function calculate the size of config descriptor */
+
+#ifdef CONFIG_USBDEV_DUALSPEED
+  dev->cfgdescsize  = usbclass_mkcfgdesc(NULL, NULL, USB_SPEED_UNKNOWN, 0);
+#else
+  dev->cfgdescsize  = usbclass_mkcfgdesc(NULL, NULL);
+#endif
+
+  /* Board-specific logic must provide the device minor */
+
+  /* Interfaces.
+   *
+   * ifnobase must be provided by board-specific logic
+   */
+
   dev->devinfo.ninterfaces = RNDIS_NINTERFACES;
+
+  /* Strings.
+   *
+   * strbase must be provided by board-specific logic
+   */
+
   dev->devinfo.nstrings= 0;
-  dev->devinfo.nendpoints  = RNDIS_NUM_EPS;
 
-  /* Default endpoint indexes, board-specific logic can override these */
+  /* Endpoints.
+   *
+   * Endpoint numbers must be provided by board-specific logic.
+   */
 
-  dev->devinfo.epno[RNDIS_EP_INTIN_IDX] = USB_EPNO(RNDIS_EPINTIN_ADDR);
-  dev->devinfo.epno[RNDIS_EP_BULKIN_IDX] = USB_EPNO(RNDIS_EPBULKIN_ADDR);
-  dev->devinfo.epno[RNDIS_EP_BULKOUT_IDX] = USB_EPNO(RNDIS_EPBULKOUT_ADDR);
+  dev->devinfo.nendpoints  = RNDIS_NUM_EPS;
 }
 #endif



[nuttx] 05/05: rndis: EP0 belongs to composite class if composite enabled

2023-03-28 Thread acassis
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/nuttx.git

commit bed53538e87453c329d4f62cd25dfea548b354d4
Author: raiden00pl 
AuthorDate: Thu Mar 23 12:55:29 2023 +0100

rndis: EP0 belongs to composite class if composite enabled
---
 drivers/usbdev/rndis.c | 15 +++
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/drivers/usbdev/rndis.c b/drivers/usbdev/rndis.c
index d260e9a7a7..6e38074ae4 100644
--- a/drivers/usbdev/rndis.c
+++ b/drivers/usbdev/rndis.c
@@ -1728,14 +1728,19 @@ static void rndis_wrcomplete(FAR struct usbdev_ep_s *ep,
 static void usbclass_ep0incomplete(FAR struct usbdev_ep_s *ep,
FAR struct usbdev_req_s *req)
 {
-  struct rndis_dev_s *priv = (FAR struct rndis_dev_s *)ep->priv;
+  FAR struct rndis_dev_s *priv;
+
   if (req->result || req->xfrd != req->len)
 {
   usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_REQRESULT),
(uint16_t)-req->result);
 }
-  else if (req->len > 0 && req->priv == priv->response_queue)
+  else if (req->len > 0 && req->priv)
 {
+  /* Get EP0 request private data  */
+
+  priv = (FAR struct rndis_dev_s *)req->priv;
+
   /* This transfer was from the response queue,
* subtract remaining byte count.
*/
@@ -1761,7 +1766,7 @@ static void usbclass_ep0incomplete(FAR struct usbdev_ep_s 
*ep,
 }
 
 /
- * Name: usbclass_ep0incomplete
+ * Name: usbclass_epintin_complete
  *
  * Description:
  *   Handle completion of interrupt IN endpoint operations
@@ -2122,7 +2127,9 @@ static int usbclass_bind(FAR struct usbdevclass_driver_s 
*driver,
* EP0).
*/
 
+#ifndef CONFIG_RNDIS_COMPOSITE
   dev->ep0->priv = priv;
+#endif
 
   /* Preallocate control request */
 
@@ -2581,7 +2588,7 @@ static int usbclass_setup(FAR struct usbdevclass_driver_s 
*driver,
 FAR struct rndis_response_header *hdr =
   (struct rndis_response_header *)priv->response_queue;
 memcpy(ctrlreq->buf, hdr, hdr->msglen);
-ctrlreq->priv = priv->response_queue;
+ctrlreq->priv = priv;
 ret = hdr->msglen;
   }
   }



[nuttx] branch master updated (da47c468b8 -> bed53538e8)

2023-03-28 Thread acassis
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/nuttx.git


from da47c468b8 boards/nrf5340-dk: add ostest_tickless configuration
 new 9b70e010dc rndis: refactor usbdev_rndis_get_composite_devdesc to make 
it more like in other composite drivers
 new 10f1d3e76e rndis: fix dev info init for composite
 new cb05700acf rndis: interface association descriptor should depend on 
CONFIG_COMPOSITE_IAD
 new 8de2197773 rndis: exclude the logic that belongs to composite
 new bed53538e8 rndis: EP0 belongs to composite class if composite enabled

The 5 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:
 drivers/usbdev/rndis.c | 153 +++--
 1 file changed, 111 insertions(+), 42 deletions(-)



[nuttx] 04/05: rndis: exclude the logic that belongs to composite

2023-03-28 Thread acassis
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/nuttx.git

commit 8de219777365a88979fa65e826fd948d6ac14e8e
Author: raiden00pl 
AuthorDate: Thu Mar 23 13:18:38 2023 +0100

rndis: exclude the logic that belongs to composite
---
 drivers/usbdev/rndis.c | 30 --
 1 file changed, 24 insertions(+), 6 deletions(-)

diff --git a/drivers/usbdev/rndis.c b/drivers/usbdev/rndis.c
index b07ac08ddd..d260e9a7a7 100644
--- a/drivers/usbdev/rndis.c
+++ b/drivers/usbdev/rndis.c
@@ -2474,20 +2474,28 @@ static int usbclass_setup(FAR struct 
usbdevclass_driver_s *driver,
   break;
 #endif
 
-#ifdef CONFIG_USBDEV_DUALSPEED
+/* If the serial device is used in as part of a composite
+ * device, then the configuration descriptor is provided by
+ * logic in the composite device implementation.
+ */
+
+#ifndef CONFIG_CDCACM_COMPOSITE
+#  ifdef CONFIG_USBDEV_DUALSPEED
 case USB_DESC_TYPE_OTHERSPEEDCONFIG:
-#endif /* CONFIG_USBDEV_DUALSPEED */
+#  endif /* CONFIG_USBDEV_DUALSPEED */
 case USB_DESC_TYPE_CONFIG:
   {
-#ifdef CONFIG_USBDEV_DUALSPEED
+#  ifdef CONFIG_USBDEV_DUALSPEED
 ret = usbclass_mkcfgdesc(ctrlreq->buf, &priv->devinfo,
  dev->speed, ctrl->req);
-#else
+#  else
 ret = usbclass_mkcfgdesc(ctrlreq->buf, &priv->devinfo);
-#endif
+#  endif
   }
   break;
+#endif
 
+#ifndef CONFIG_CDCACM_COMPOSITE
 case USB_DESC_TYPE_STRING:
   {
 /* index == language code. */
@@ -2496,6 +2504,7 @@ static int usbclass_setup(FAR struct usbdevclass_driver_s 
*driver,
   (FAR struct usb_strdesc_s *)ctrlreq->buf);
   }
   break;
+#endif
 
 default:
   {
@@ -2516,6 +2525,12 @@ static int usbclass_setup(FAR struct 
usbdevclass_driver_s *driver,
 }
 break;
 
+  /* If the serial device is used in as part of a composite device,
+   * then the overall composite class configuration is managed by
+   * logic in the composite device implementation.
+   */
+
+#ifndef CONFIG_CDCACM_COMPOSITE
   case USB_REQ_GETCONFIGURATION:
 {
   if (ctrl->type == USB_DIR_IN)
@@ -2525,6 +2540,7 @@ static int usbclass_setup(FAR struct usbdevclass_driver_s 
*driver,
 }
 }
 break;
+#endif
 
   default:
 usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_UNSUPPORTEDSTDREQ),
@@ -2663,10 +2679,12 @@ static void usbclass_disconnect(FAR struct 
usbdevclass_driver_s *driver,
   leave_critical_section(flags);
 
   /* Perform the soft connect function so that we will we can be
-   * re-enumerated.
+   * re-enumerated (unless we are part of a composite device)
*/
 
+#ifndef CONFIG_CDCACM_COMPOSITE
   DEV_CONNECT(dev);
+#endif
 }
 
 /



[nuttx] 03/05: rndis: interface association descriptor should depend on CONFIG_COMPOSITE_IAD

2023-03-28 Thread acassis
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/nuttx.git

commit cb05700acfc9e2c90bbea6c28abb6d37f4e0103d
Author: raiden00pl 
AuthorDate: Tue Mar 21 21:18:35 2023 +0100

rndis: interface association descriptor should depend on 
CONFIG_COMPOSITE_IAD
---
 drivers/usbdev/rndis.c | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/usbdev/rndis.c b/drivers/usbdev/rndis.c
index 840ce5a82a..b07ac08ddd 100644
--- a/drivers/usbdev/rndis.c
+++ b/drivers/usbdev/rndis.c
@@ -192,8 +192,9 @@ struct rndis_cfgdesc_s
 {
 #ifndef CONFIG_RNDIS_COMPOSITE
   struct usb_cfgdesc_s cfgdesc;/* Configuration descriptor */
-#endif
+#elif defined(CONFIG_COMPOSITE_IAD)
   struct usb_iaddesc_s assoc_desc; /* Interface association descriptor */
+#endif
   struct usb_ifdesc_s  comm_ifdesc;/* Communication interface descriptor */
   struct usb_epdesc_s  epintindesc;/* Interrupt endpoint descriptor */
   struct usb_ifdesc_s  data_ifdesc;/* Data interface descriptor */
@@ -299,7 +300,7 @@ const static struct rndis_cfgdesc_s g_rndis_cfgdesc =
 .attr = USB_CONFIG_ATTR_ONE | USB_CONFIG_ATTR_SELFPOWER,
 .mxpower  = (CONFIG_USBDEV_MAXPOWER + 1) / 2
   },
-#endif
+#elif defined(CONFIG_COMPOSITE_IAD)
   {
 .len  = USB_SIZEOF_IADDESC,
 .type = USB_DESC_TYPE_INTERFACEASSOCIATION,
@@ -310,6 +311,7 @@ const static struct rndis_cfgdesc_s g_rndis_cfgdesc =
 .protocol = 0x01,
 .ifunction= 0
   },
+#endif
   {
 .len  = USB_SIZEOF_IFDESC,
 .type = USB_DESC_TYPE_INTERFACE,
@@ -2075,9 +2077,13 @@ static int16_t usbclass_mkcfgdesc(FAR uint8_t *buf,
   dest->cfgdesc.totallen[0] = LSBYTE(totallen);
   dest->cfgdesc.totallen[1] = MSBYTE(totallen);
 #else
-  /* For composite device, apply possible offset to the interface numbers 
*/
+  /* For composite device, apply possible offset to the interface
+   * numbers
+   */
 
+#  ifdef CONFIG_COMPOSITE_IAD
   dest->assoc_desc.firstif += devinfo->ifnobase;
+#  endif
   dest->comm_ifdesc.ifno   += devinfo->ifnobase;
   dest->data_ifdesc.ifno   += devinfo->ifnobase;
 #endif



[GitHub] [nuttx] ldube commented on pull request #8921: usbhost_hidkbd: Add the option to use interrupt transfers.

2023-03-28 Thread via GitHub


ldube commented on PR #8921:
URL: https://github.com/apache/nuttx/pull/8921#issuecomment-1487746207

   Thanks @acassis . I was forced to fix this driver because my USB keyboard 
was refusing to work with hidkbd. 


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



[nuttx-website] branch asf-site updated: Publishing web: b50f5ca4ed22743959c1160aab5dcc9ae18b3eff docs: bed53538e87453c329d4f62cd25dfea548b354d4

2023-03-28 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/nuttx-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new 74f934e7 Publishing web: b50f5ca4ed22743959c1160aab5dcc9ae18b3eff 
docs: bed53538e87453c329d4f62cd25dfea548b354d4
74f934e7 is described below

commit 74f934e7f8253f4a7ce265a473c55126f8572dfb
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
AuthorDate: Wed Mar 29 00:13:28 2023 +

Publishing web: b50f5ca4ed22743959c1160aab5dcc9ae18b3eff docs: 
bed53538e87453c329d4f62cd25dfea548b354d4
---
 content/docs/10.0.0/index.html |   2 +-
 content/docs/10.0.0/searchindex.js |   2 +-
 content/docs/10.0.1/index.html |   2 +-
 content/docs/10.0.1/searchindex.js |   2 +-
 content/docs/10.1.0/index.html |   2 +-
 content/docs/10.1.0/searchindex.js |   2 +-
 content/docs/10.2.0/index.html |   2 +-
 content/docs/10.2.0/searchindex.js |   2 +-
 content/docs/10.3.0/index.html |   2 +-
 content/docs/10.3.0/searchindex.js |   2 +-
 content/docs/11.0.0/index.html |   2 +-
 content/docs/11.0.0/searchindex.js |   2 +-
 content/docs/12.0.0/index.html |   2 +-
 content/docs/12.0.0/searchindex.js |   2 +-
 .../latest/_images/esp32-audio-config-file1.png| Bin 0 -> 21276 bytes
 content/docs/latest/_images/esp32-audio-kit.png| Bin 0 -> 161397 bytes
 .../esp32/boards/esp32-audio-kit/index.rst.txt | 155 +++
 content/docs/latest/index.html |   2 +-
 content/docs/latest/objects.inv| Bin 43491 -> 43633 bytes
 content/docs/latest/platforms/index.html   |   1 +
 .../index.html | 304 +++--
 .../xtensa/esp32/boards/esp32-devkitc/index.html   |   7 +-
 .../esp32/boards/esp32-ethernet-kit/index.html |   1 +
 .../xtensa/esp32/boards/esp32-lyrat/index.html |   1 +
 .../esp32/boards/esp32-wrover-kit/index.html   |   1 +
 .../docs/latest/platforms/xtensa/esp32/index.html  |   6 +-
 content/docs/latest/searchindex.js |   2 +-
 content/feed.xml   |   4 +-
 28 files changed, 284 insertions(+), 228 deletions(-)

diff --git a/content/docs/10.0.0/index.html b/content/docs/10.0.0/index.html
index 6c730561..6958b8ac 100644
--- a/content/docs/10.0.0/index.html
+++ b/content/docs/10.0.0/index.html
@@ -133,7 +133,7 @@ by following these 
 NuttX Documentation
 NuttX is a real-time operating system (RTOS) with an emphasis on standards 
compliance and small footprint. Scalable from 8-bit to 32-bit microcontroller 
environments, the primary governing standards in NuttX are Posix and ANSI 
standards. Additional standard APIs from Unix and other common RTOS’s (such as 
VxWorks) are adopted for functionality not available under these standards, or 
for functionality that is not appropriate for deeply-embedded environments 
(such as fork()).
-Last Updated: 28 March 23 at 00:10
+Last Updated: 29 March 23 at 00:11
 
 Table of 
Contents
 
diff --git a/content/docs/10.0.0/searchindex.js 
b/content/docs/10.0.0/searchindex.js
index 239e377d..2ae9c60c 100644
--- a/content/docs/10.0.0/searchindex.js
+++ b/content/docs/10.0.0/searchindex.js
@@ -1 +1 @@
-Search.setIndex({docnames:["applications/index","boards/index","components/binfmt","components/drivers/block/index","components/drivers/character/analog","components/drivers/character/can","components/drivers/character/index","components/drivers/character/keypad","components/drivers/character/pwm","components/drivers/character/quadrature","components/drivers/character/rtc","components/drivers/character/serial","components/drivers/character/timer","components/drivers/character/touchscreen
 [...]
\ No newline at end of file
+Search.setIndex({docnames:["applications/index","boards/index","components/binfmt","components/drivers/block/index","components/drivers/character/analog","components/drivers/character/can","components/drivers/character/index","components/drivers/character/keypad","components/drivers/character/pwm","components/drivers/character/quadrature","components/drivers/character/rtc","components/drivers/character/serial","components/drivers/character/timer","components/drivers/character/touchscreen
 [...]
\ No newline at end of file
diff --git a/content/docs/10.0.1/index.html b/content/docs/10.0.1/index.html
index b4d11c68..74dc20f2 100644
--- a/content/docs/10.0.1/index.html
+++ b/content/docs/10.0.1/index.html
@@ -147,7 +147,7 @@ by following these 
 NuttX Documentation
 NuttX is a real-time operating system (RTOS) with an emphasis on standards 
compliance and small footprint. Scalable from 8-bit to 3

[GitHub] [nuttx] lucasssvaz commented on a diff in pull request #8643: risc-v: SV32 MMU support for qemu-rv

2023-03-28 Thread via GitHub


lucasssvaz commented on code in PR #8643:
URL: https://github.com/apache/nuttx/pull/8643#discussion_r1151293818


##
boards/risc-v/qemu-rv/rv-virt/configs/knsh32/defconfig:
##


Review Comment:
   Please, normalize your defconfig by running `./tools/refresh.sh --silent 
rv-virt:knsh32`



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



[GitHub] [nuttx] radek-pesina opened a new pull request, #8922: eMMC driver support

2023-03-28 Thread via GitHub


radek-pesina opened a new pull request, #8922:
URL: https://github.com/apache/nuttx/pull/8922

   ## Summary
   Extend sdmmc driver to add support for eMMC.
   
   ## Impact
   Upon detection/insertion of an SD/eMMC device, the driver now determines if 
it is talking to an SD card or eMMC and takes appropriate steps to initialise 
the device.
   
   ## Testing
   Tested with: SanDisk 8GiB SD card formatted in fat32 file format and 
Hardkernel eMMC v0.4 16GiB card, fat32 filesystem.  Successfully mounted SD 
card, filesystem read, modified and validated. SD removed and eMMC inserted 
(during same boot) and allowed successful mount/read/modify/write functionality 
of eMMC.  Tested reversing the procedure (eMMC inserted first during/after 
boot) with same results. Tested with SDIO debug turned on and observed no 
abnormal behaviour/debug logs.
   


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



[GitHub] [nuttx] g2gps commented on pull request #8247: tools/ci: Update docker to ubuntu 22.04

2023-03-28 Thread via GitHub


g2gps commented on PR #8247:
URL: https://github.com/apache/nuttx/pull/8247#issuecomment-1487944462

   > Yes, that's why I want to upgrade Ubuntu to 22.04 since we can get the new 
version of gcc automatically.
   
   I'm not sure if that is really going to help us in this situation. In 
theory, a newer version of gcc is available, but we would still be restricted 
to using the latest version of the toolchain which Renesas provides, 8.3.0. 
   
   > If we can download it automatically, I think it's fine.
   As far as I'm aware, the login credentials would need to be sent as part of 
the request, which isn't really viable.


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



[GitHub] [nuttx] xiaoxiang781216 commented on pull request #8247: tools/ci: Update docker to ubuntu 22.04

2023-03-28 Thread via GitHub


xiaoxiang781216 commented on PR #8247:
URL: https://github.com/apache/nuttx/pull/8247#issuecomment-1487972294

   > > Yes, that's why I want to upgrade Ubuntu to 22.04 since we can get the 
new version of gcc automatically.
   > 
   > I'm not sure if that is really going to help us in this situation. In 
theory, a newer version of gcc is available, but we would still be restricted 
to using the latest version of the toolchain which Renesas provides, 8.3.0.
   > 
   
   it's fine that we use Renesas arch with 8.3.0, but not good to simulator.
   
   > > If we can download it automatically, I think it's fine.
   > 
   > As far as I'm aware, the login credentials would need to be sent as part 
of the request, which isn't really viable.
   
   Another possible method is we build Renesas toolchain in Ubuntu 18.04 and 
use it in  Ubuntu 22.04.


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



[GitHub] [nuttx-apps] xiaoxiang781216 commented on pull request #1649: Add another batch of missing headers throughout the repository

2023-03-28 Thread via GitHub


xiaoxiang781216 commented on PR #1649:
URL: https://github.com/apache/nuttx-apps/pull/1649#issuecomment-1487973935

   @acassis from the policy, you can't merge the common code from the same 
company.


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



[GitHub] [nuttx-apps] xiaoxiang781216 commented on pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

2023-03-28 Thread via GitHub


xiaoxiang781216 commented on PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683#issuecomment-1487976441

   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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [nuttx-apps] davids5 commented on a diff in pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

2023-03-28 Thread via GitHub


davids5 commented on code in PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683#discussion_r1151432282


##
include/graphics/twm4nx/twm4nx_config.hxx:
##
@@ -448,7 +448,7 @@
  */
 
 #ifndef CONFIG_TWM4NX_INPUT_SIGNO
-#  define CONFIG_TWM4NX_INPUT_SIGNO 6
+#  define CONFIG_TWM4NX_INPUT_SIGNO 33

Review Comment:
   typo?



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



[GitHub] [nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1683: Minor signal fix found from https://github.com/apache/nuttx/pull/8900

2023-03-28 Thread via GitHub


xiaoxiang781216 commented on code in PR #1683:
URL: https://github.com/apache/nuttx-apps/pull/1683#discussion_r1151438835


##
include/graphics/twm4nx/twm4nx_config.hxx:
##
@@ -448,7 +448,7 @@
  */
 
 #ifndef CONFIG_TWM4NX_INPUT_SIGNO
-#  define CONFIG_TWM4NX_INPUT_SIGNO 6
+#  define CONFIG_TWM4NX_INPUT_SIGNO 33

Review Comment:
   No, this problem use two signal 5/6 at th same time, we need map to 32/33.



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



[GitHub] [nuttx] davids5 commented on a diff in pull request #8922: eMMC driver support

2023-03-28 Thread via GitHub


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


##
drivers/mmcsd/mmcsd_sdio.c:
##
@@ -2464,16 +2469,22 @@ static void mmcsd_mediachange(FAR void *arg)
  *
  /
 
-static int mmcsd_widebus(FAR struct mmcsd_state_s *priv)
+static int mmcsd_widebus(FAR struct mmcsd_state_s *priv, bool wide)
 {
   int ret;
 
   /* Check if the SD card supports wide bus operation (as reported in the
* SCR or in the SDIO driver capabililities)
*/
 
-  if ((priv->buswidth & MMCSD_SCR_BUSWIDTH_4BIT) != 0 &&
-  (priv->caps & SDIO_CAPS_1BIT_ONLY) == 0)
+  finfo("Setting BUS width to %s. Card type: %d\n",

Review Comment:
   This looks incorrect for several reasons.
   1. Removing the SDIO_CAPS_1BIT_ONLY is not expectable. It is a hardware 
trait. I can have a 4 bit interface and only wire 1 bit. This is set by Kconfig.
   2. mmcsd_widebus is changing to wide. The addition of the `wide` looks 
hack-ish.  
   How can this be better 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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [nuttx-apps] pkarashchenko commented on a diff in pull request #1687: system/cu: Move fd_std_tty, g_tio_std and g_tio_dev to cu_globals_s

2023-03-28 Thread via GitHub


pkarashchenko commented on code in PR #1687:
URL: https://github.com/apache/nuttx-apps/pull/1687#discussion_r1151456308


##
system/cu/cu_main.c:
##
@@ -291,15 +288,15 @@ int main(int argc, FAR char *argv[])
 
   /* Initialize global data */
 
-  memset(&g_cu, 0, sizeof(struct cu_globals_s));
+  memset(cu, 0, sizeof(struct cu_globals_s));

Review Comment:
   Optional: Let's use the same style here and at line 295. So either
   
   ```suggestion
 memset(cu, 0, sizeof(*cu));
   ```
   Or change line 295



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



[GitHub] [nuttx] pkarashchenko commented on pull request #8247: tools/ci: Update docker to ubuntu 22.04

2023-03-28 Thread via GitHub


pkarashchenko commented on PR #8247:
URL: https://github.com/apache/nuttx/pull/8247#issuecomment-1488027215

   > Another possible method is we build Renesas toolchain in Ubuntu 18.04 and 
use it in  Ubuntu 22.04.
   
   But most probably we will need to host binaries somewhere. Or create a 
GitHub repo with Renesas toolchain source code and setup GitHub CI to bake 
binaries. But that is quite a big infrastructure effort I think.
   Maybe we can contact Renesas and ask for help? Is that an option?


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



[GitHub] [nuttx-apps] wangchen61698 closed pull request #1688: examples/ftpd: Add support for choosing address family

2023-03-28 Thread via GitHub


wangchen61698 closed pull request #1688: examples/ftpd: Add support for 
choosing address family
URL: https://github.com/apache/nuttx-apps/pull/1688


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



[GitHub] [nuttx] pkarashchenko commented on pull request #8247: tools/ci: Update docker to ubuntu 22.04

2023-03-28 Thread via GitHub


pkarashchenko commented on PR #8247:
URL: https://github.com/apache/nuttx/pull/8247#issuecomment-1488028985

   > but not good to simulator.
   @xiaoxiang781216 what do you mean? Do we used simulation of Renesas? Or you 
are talking that Renesas boards will be restricted to use C++ because of GCC 
version?


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



[GitHub] [nuttx-apps] wangchen61698 opened a new pull request, #1689: examples/ftpd: Add support for choosing address family

2023-03-28 Thread via GitHub


wangchen61698 opened a new pull request, #1689:
URL: https://github.com/apache/nuttx-apps/pull/1689

   ## Summary
   choose the network protocol (ipv4 or ipv6) to bind network in setting 
ftpd(default ipv6)
   
   ## Impact
   N/A
   
   ## Testing
   CI check
   
   before
   
   ap> ftpd_start
   Starting the FTP daemon
   ap> FTP daemon [91] started
   Adding accounts:
   
   Root account: USER=root PASSWORD=abc123 HOME=(none)
   User account: USER=ftp PASSWORD=(none) HOME=(none)
   User account: USER=anonymous PASSWORD=(none) HOME=(none)
   
   after
   
   ap> ftpd_start -4
   Starting the FTP daemon
   ap> FTP daemon [58] started
   Adding accounts:
   
   Root account: USER=root PASSWORD=abc123 HOME=(none)
   User account: USER=ftp PASSWORD=(none) HOME=(none)
   User account: USER=anonymous PASSWORD=(none) HOME=(none)
   
   ap> ftpd_start -6
   Starting the FTP daemon
   ap> FTP daemon [86] started
   Adding accounts:
   
   Root account: USER=root PASSWORD=abc123 HOME=(none)
   User account: USER=ftp PASSWORD=(none) HOME=(none)
   User account: USER=anonymous PASSWORD=(none) HOME=(none)
   
   


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