[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #2650: ctype/iscntrl: correct the control character function

2021-01-04 Thread GitBox


xiaoxiang781216 merged pull request #2650:
URL: https://github.com/apache/incubator-nuttx/pull/2650


   



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.

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




[incubator-nuttx] branch master updated (8940646 -> c8784fa)

2021-01-04 Thread xiaoxiang
This is an automated email from the ASF dual-hosted git repository.

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


from 8940646  sched: sched: Don't call sched_lock()/unlock() in 
nx_waitid()/waitpid() for SMP
 add c8784fa  ctype/iscntrl: correct the control character function

No new revisions were added by this update.

Summary of changes:
 include/ctype.h   | 2 +-
 libs/libc/ctype/lib_iscntrl.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)



[GitHub] [incubator-nuttx] btashton commented on a change in pull request #2654: Deal with "sed -i" portability

2021-01-04 Thread GitBox


btashton commented on a change in pull request #2654:
URL: https://github.com/apache/incubator-nuttx/pull/2654#discussion_r551760293



##
File path: tools/configure.sh
##
@@ -296,7 +296,7 @@ done
 
 if [ "X${defappdir}" = "Xy" ]; then
   # In-place edit can mess up permissions on Windows
-  # sed -i -e "/^CONFIG_APPS_DIR/d" "${dest_config}"

Review comment:
   > maybe this instance can be replaced with kconfig-tweak too
   
   Looks like the commented section can be removed and the next line updated. 
It was coping to a temporary file editing via sed and moving back. 





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.

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




[GitHub] [incubator-nuttx] btashton commented on a change in pull request #2654: Deal with "sed -i" portability

2021-01-04 Thread GitBox


btashton commented on a change in pull request #2654:
URL: https://github.com/apache/incubator-nuttx/pull/2654#discussion_r551760001



##
File path: tools/configure.sh
##
@@ -296,7 +296,7 @@ done
 
 if [ "X${defappdir}" = "Xy" ]; then
   # In-place edit can mess up permissions on Windows
-  # sed -i -e "/^CONFIG_APPS_DIR/d" "${dest_config}"

Review comment:
   Looks like the commented section can be removed and the next line 
updated. It was coping to a temporary file editing via sed and moving back. 





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.

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




[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #2654: Deal with "sed -i" portability

2021-01-04 Thread GitBox


xiaoxiang781216 commented on a change in pull request #2654:
URL: https://github.com/apache/incubator-nuttx/pull/2654#discussion_r551760041



##
File path: tools/configure.sh
##
@@ -296,7 +296,7 @@ done
 
 if [ "X${defappdir}" = "Xy" ]; then
   # In-place edit can mess up permissions on Windows
-  # sed -i -e "/^CONFIG_APPS_DIR/d" "${dest_config}"

Review comment:
   The change is same as before so, we can't use kconfig-tweak here?





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.

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




[GitHub] [incubator-nuttx] yamt commented on a change in pull request #2654: Deal with "sed -i" portability

2021-01-04 Thread GitBox


yamt commented on a change in pull request #2654:
URL: https://github.com/apache/incubator-nuttx/pull/2654#discussion_r551758572



##
File path: tools/testbuild.sh
##
@@ -244,11 +244,11 @@ function configure {
 varname=`echo $setting | cut -d'=' -f1`
 if [ ! -z "$varname" ]; then
   echo "  Disabling $varname"
-  sed -i -e "/$varname/d" $nuttx/.config

Review comment:
   done

##
File path: tools/Makefile.unix
##
@@ -505,7 +505,7 @@ gconfig: apps_preconfig
 
 savedefconfig: apps_preconfig
$(Q) APPSDIR=${CONFIG_APPS_DIR} EXTERNALDIR=$(EXTERNALDIR) kconfig-conf 
--savedefconfig defconfig.tmp Kconfig
-   $(Q) sed -i -e "/CONFIG_APPS_DIR=/d" defconfig.tmp

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.

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




[GitHub] [incubator-nuttx] yamt commented on a change in pull request #2654: Deal with "sed -i" portability

2021-01-04 Thread GitBox


yamt commented on a change in pull request #2654:
URL: https://github.com/apache/incubator-nuttx/pull/2654#discussion_r551758507



##
File path: tools/configure.sh
##
@@ -296,7 +296,7 @@ done
 
 if [ "X${defappdir}" = "Xy" ]; then
   # In-place edit can mess up permissions on Windows
-  # sed -i -e "/^CONFIG_APPS_DIR/d" "${dest_config}"

Review comment:
   maybe this instance can be replaced with kconfig-tweak too





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.

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




[GitHub] [incubator-nuttx] yamt commented on pull request #2654: Deal with "sed -i" portability

2021-01-04 Thread GitBox


yamt commented on pull request #2654:
URL: https://github.com/apache/incubator-nuttx/pull/2654#issuecomment-754457877


   > > @yamt can you merge all patch into one? it's important to keep the 
history clean without the intermediate commit
   > 
   > i will merge them later
   
   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.

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




[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #551: make/archive: replace the dependency to preprequisite list

2021-01-04 Thread GitBox


xiaoxiang781216 commented on a change in pull request #551:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/551#discussion_r551757718



##
File path: Application.mk
##
@@ -138,11 +138,11 @@ $(CXXOBJS): %$(SUFFIX)$(OBJEXT): %$(CXXEXT)
$(if $(and $(CONFIG_BUILD_LOADABLE),$(CXXELFFLAGS)), \
$(call ELFCOMPILEXX, $<, $@), $(call COMPILEXX, $<, $@))
 
-archive:
+archive: $(OBJS)

Review comment:
   should we chnage archive to a real target? then we can avoid the achive 
every time even there is nothing to change.





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.

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




[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #2654: Always specify an extension for "sed -i"

2021-01-04 Thread GitBox


xiaoxiang781216 commented on a change in pull request #2654:
URL: https://github.com/apache/incubator-nuttx/pull/2654#discussion_r551755975



##
File path: boards/risc-v/nr5m100/nr5m100-nexys4/README.txt
##
@@ -143,7 +143,7 @@ Debugger
  shadowed variable warnings, so disable the -Werror flag also:
 
  cd openocd
- sed -i 's/ -Werror//g' configure.ac
+ sed -i.bak 's/ -Werror//g' configure.ac

Review comment:
   I think it's a demo, but anyway it's fine to modify 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.

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




[GitHub] [incubator-nuttx] btashton commented on issue #2594: Should we remove the support of too old and incompatible risc-v chip(gap8 and nr5m100)?

2021-01-04 Thread GitBox


btashton commented on issue #2594:
URL: 
https://github.com/apache/incubator-nuttx/issues/2594#issuecomment-754449876


   Ken,
   I know you did a lot of work getting the first RISC-V support going, and
   that included the nr5m100 which I understood is based on work you did
   with IQ-Analog.
   
   I don't think the RTL ever made it public, do you think this is still of
   use with all the other publicly available implementations out there today?
   
   --Brennan
   
   
   On Wed, Dec 23, 2020, 12:30 AM Xiang Xiao  wrote:
   
   > To support these prehistoric chips, there are many hack code in
   > arch/risc-v/common and arch/risc-v/rv32im.
   > BTW, these two chips need be compiled by specific gcc toolchain, which
   > block them from the daily check:
   >
   > 
https://github.com/apache/incubator-nuttx-testing/blob/master/testlist/other.dat#L25-L26
   > So, the quality isn't good as other riscv chip too.
   >
   > —
   > You are receiving this because you are subscribed to this thread.
   > Reply to this email directly, view it on GitHub
   > , or unsubscribe
   > 

   > .
   >
   



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.

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




[GitHub] [incubator-nuttx-apps] jerpelea merged pull request #550: system/readline: check the control ascii only to support multi-languages

2021-01-04 Thread GitBox


jerpelea merged pull request #550:
URL: https://github.com/apache/incubator-nuttx-apps/pull/550


   



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.

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




[incubator-nuttx-apps] branch master updated: system/readline: check the control ascii only to support multi-languages

2021-01-04 Thread jerpelea
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 54bbfee  system/readline: check the control ascii only to support 
multi-languages
54bbfee is described below

commit 54bbfee30e92f7aa8fa7b241e4c7c444087111f0
Author: chao.an 
AuthorDate: Mon Jan 4 17:21:48 2021 +0800

system/readline: check the control ascii only to support multi-languages

Signed-off-by: chao.an 
---
 system/readline/readline_common.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/system/readline/readline_common.c 
b/system/readline/readline_common.c
index 13750fe..413767a 100644
--- a/system/readline/readline_common.c
+++ b/system/readline/readline_common.c
@@ -733,11 +733,11 @@ ssize_t readline_common(FAR struct rl_common_s *vtbl, FAR 
char *buf,
   return nch;
 }
 
-  /* Otherwise, check if the character is printable and, if so, put the
-   * character in the line buffer
+  /* Otherwise, put the character in the line buffer if the
+   * character is not a control byte
*/
 
-  else if (isprint(ch))
+  else if (!iscntrl(ch & 0xff))
 {
   buf[nch++] = ch;
 



[GitHub] [incubator-nuttx-apps] jerpelea merged pull request #552: wireless/wapi: add set country code support

2021-01-04 Thread GitBox


jerpelea merged pull request #552:
URL: https://github.com/apache/incubator-nuttx-apps/pull/552


   



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.

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




[incubator-nuttx-apps] branch master updated: wireless/wapi: add set country code support

2021-01-04 Thread jerpelea
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new bd9174a  wireless/wapi: add set country code support
bd9174a is described below

commit bd9174a3b639c2db60cbbc73c9f0260ab17bee5b
Author: chao.an 
AuthorDate: Mon Jan 4 17:53:19 2021 +0800

wireless/wapi: add set country code support

Signed-off-by: chao.an 
---
 include/wireless/wapi.h  | 11 +++
 wireless/wapi/src/wapi.c | 18 ++
 wireless/wapi/src/wireless.c | 34 ++
 3 files changed, 63 insertions(+)

diff --git a/include/wireless/wapi.h b/include/wireless/wapi.h
index 8c3df1a..77b4fda 100644
--- a/include/wireless/wapi.h
+++ b/include/wireless/wapi.h
@@ -700,6 +700,17 @@ int wapi_scan_coll(int sock, FAR const char *ifname,
 void wapi_scan_coll_free(FAR struct wapi_list_s *aps);
 
 /
+ * Name: wapi_set_country
+ *
+ * Description:
+ *Set the country code
+ *
+ /
+
+int wapi_set_country(int sock, FAR const char *ifname,
+ FAR const char *country);
+
+/
  * Name: wapi_get_sensitivity
  *
  * Description:
diff --git a/wireless/wapi/src/wapi.c b/wireless/wapi/src/wapi.c
index b0c6f5f..2e1ef96 100644
--- a/wireless/wapi/src/wapi.c
+++ b/wireless/wapi/src/wapi.c
@@ -96,6 +96,7 @@ static int wapi_bitrate_cmd  (int sock, int argc, FAR 
char **argv);
 static int wapi_txpower_cmd  (int sock, int argc, FAR char **argv);
 static int wapi_scan_results_cmd (int sock, int argc, FAR char **argv);
 static int wapi_scan_cmd (int sock, int argc, FAR char **argv);
+static int wapi_country_cmd  (int sock, int argc, FAR char **argv);
 #ifdef CONFIG_WIRELESS_WAPI_INITCONF
 static int wapi_reconnect_cmd(int sock, int argc, FAR char **argv);
 static int wapi_save_config_cmd  (int sock, int argc, FAR char **argv);
@@ -121,6 +122,7 @@ static const struct wapi_command_s g_wapi_commands[] =
   {"ap",   2, 2, wapi_ap_cmd},
   {"bitrate",  3, 3, wapi_bitrate_cmd},
   {"txpower",  3, 3, wapi_txpower_cmd},
+  {"country",  2, 2, wapi_country_cmd},
 #ifdef CONFIG_WIRELESS_WAPI_INITCONF
   {"reconnect",1, 1, wapi_reconnect_cmd},
   {"save_config",  1, 1, wapi_save_config_cmd},
@@ -745,6 +747,22 @@ static int wapi_scan_cmd(int sock, int argc, FAR char 
**argv)
   return wapi_scan_results_cmd(sock, 1, argv);
 }
 
+/
+ * Name: wapi_country_cmd
+ *
+ * Description:
+ *  Set the country code
+ *
+ * Returned Value:
+ *   None
+ *
+ /
+
+static int wapi_country_cmd(int sock, int argc, FAR char **argv)
+{
+  return wapi_set_country(sock, argv[0], argv[1]);
+}
+
 #ifdef CONFIG_WIRELESS_WAPI_INITCONF
 
 /
diff --git a/wireless/wapi/src/wireless.c b/wireless/wapi/src/wireless.c
index 9ddec6d..d507012 100644
--- a/wireless/wapi/src/wireless.c
+++ b/wireless/wapi/src/wireless.c
@@ -1394,6 +1394,40 @@ void wapi_scan_coll_free(FAR struct wapi_list_s *list)
 }
 
 /
+ * Name: wapi_set_country
+ *
+ * Description:
+ *Set the country code
+ *
+ /
+
+int wapi_set_country(int sock, FAR const char *ifname,
+ FAR const char *country)
+{
+  struct iwreq wrq =
+  {
+  };
+
+  int ret;
+
+  /* Prepare request. */
+
+  wrq.u.data.pointer = (FAR void *)country;
+  wrq.u.data.length = 2;
+
+  strncpy(wrq.ifr_name, ifname, IFNAMSIZ);
+  ret = ioctl(sock, SIOCSIWCOUNTRY, (unsigned long)((uintptr_t)));
+  if (ret < 0)
+{
+  int errcode = errno;
+  WAPI_IOCTL_STRERROR(SIOCSIWCOUNTRY, errcode);
+  ret = -errcode;
+}
+
+  return ret;
+}
+
+/
  * Name: wapi_get_sensitivity
  *
  * Description:



[GitHub] [incubator-nuttx] yamt commented on a change in pull request #2654: Always specify an extension for "sed -i"

2021-01-04 Thread GitBox


yamt commented on a change in pull request #2654:
URL: https://github.com/apache/incubator-nuttx/pull/2654#discussion_r551747059



##
File path: boards/risc-v/nr5m100/nr5m100-nexys4/README.txt
##
@@ -143,7 +143,7 @@ Debugger
  shadowed variable warnings, so disable the -Werror flag also:
 
  cd openocd
- sed -i 's/ -Werror//g' configure.ac
+ sed -i.bak 's/ -Werror//g' configure.ac

Review comment:
   why not?





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.

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




[GitHub] [incubator-nuttx] yamt commented on pull request #2654: Always specify an extension for "sed -i"

2021-01-04 Thread GitBox


yamt commented on pull request #2654:
URL: https://github.com/apache/incubator-nuttx/pull/2654#issuecomment-754440010


   > @yamt can you merge all patch into one? it's important to keep the history 
clean without the intermediate commit
   
   i will merge them later



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.

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




[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #2654: Always specify an extension for "sed -i"

2021-01-04 Thread GitBox


xiaoxiang781216 commented on a change in pull request #2654:
URL: https://github.com/apache/incubator-nuttx/pull/2654#discussion_r551729511



##
File path: boards/risc-v/nr5m100/nr5m100-nexys4/README.txt
##
@@ -143,7 +143,7 @@ Debugger
  shadowed variable warnings, so disable the -Werror flag also:
 
  cd openocd
- sed -i 's/ -Werror//g' configure.ac
+ sed -i.bak 's/ -Werror//g' configure.ac

Review comment:
   don't need to moidfy README.txt?





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.

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




[GitHub] [incubator-nuttx] btashton commented on a change in pull request #2654: Always specify an extension for "sed -i"

2021-01-04 Thread GitBox


btashton commented on a change in pull request #2654:
URL: https://github.com/apache/incubator-nuttx/pull/2654#discussion_r551716159



##
File path: tools/Makefile.unix
##
@@ -505,7 +505,7 @@ gconfig: apps_preconfig
 
 savedefconfig: apps_preconfig
$(Q) APPSDIR=${CONFIG_APPS_DIR} EXTERNALDIR=$(EXTERNALDIR) kconfig-conf 
--savedefconfig defconfig.tmp Kconfig
-   $(Q) sed -i -e "/CONFIG_APPS_DIR=/d" defconfig.tmp

Review comment:
   Can we just use kconfig-tweak for the config patches?

##
File path: tools/configure.sh
##
@@ -296,7 +296,7 @@ done
 
 if [ "X${defappdir}" = "Xy" ]; then
   # In-place edit can mess up permissions on Windows
-  # sed -i -e "/^CONFIG_APPS_DIR/d" "${dest_config}"

Review comment:
   Commented out seems like we can just drop this

##
File path: tools/testbuild.sh
##
@@ -244,11 +244,11 @@ function configure {
 varname=`echo $setting | cut -d'=' -f1`
 if [ ! -z "$varname" ]; then
   echo "  Disabling $varname"
-  sed -i -e "/$varname/d" $nuttx/.config

Review comment:
   kconfig tweak would be better here as well





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.

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




[GitHub] [incubator-nuttx] yamt opened a new pull request #2654: Always specify an extension for "sed -i"

2021-01-04 Thread GitBox


yamt opened a new pull request #2654:
URL: https://github.com/apache/incubator-nuttx/pull/2654


   ## Summary
   An empty extension for sed -i is not widely available.
   
   * Where it isn't available (eg. macOS's sed) "sed -i -e" will
 create a backup file with the "-e" suffix. It isn't our intention.
   
   * Even GNU sed documentation says it's "not recommended".
   
   ## 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.

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




[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #2653: sched: sched: Don't call sched_lock()/unlock() in nx_waitid()/waitpid() for SMP

2021-01-04 Thread GitBox


xiaoxiang781216 merged pull request #2653:
URL: https://github.com/apache/incubator-nuttx/pull/2653


   



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.

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




[incubator-nuttx] branch master updated: sched: sched: Don't call sched_lock()/unlock() in nx_waitid()/waitpid() for SMP

2021-01-04 Thread xiaoxiang
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 8940646  sched: sched: Don't call sched_lock()/unlock() in 
nx_waitid()/waitpid() for SMP
8940646 is described below

commit 89406462cc710a3e9c7e16af1d97b026f1177bdd
Author: Masayuki Ishikawa 
AuthorDate: Tue Jan 5 09:35:19 2021 +0900

sched: sched: Don't call sched_lock()/unlock() in nx_waitid()/waitpid() for 
SMP

Summary:
- Calling sched_lock()/unlock() is unnecessary for SMP
  because we've been using the critical section API

Impact:
- SMP only

Testing:
- Tested with smp and ostest with the following configurations
- sabre-6quad:smp (QEMU, dev board)
- spresense:smp, spresense:wifi_smp
- sim:smp, sim:ostest
- maix-bit:smp (QEMU)
- esp32-devkitc:smp (QEMU)
- lc823450-xgevk:rndis

Signed-off-by: Masayuki Ishikawa 
---
 sched/sched/sched_waitid.c  |  7 ---
 sched/sched/sched_waitpid.c | 14 --
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/sched/sched/sched_waitid.c b/sched/sched/sched_waitid.c
index 3b119d3..0c8c895 100644
--- a/sched/sched/sched_waitid.c
+++ b/sched/sched/sched_waitid.c
@@ -152,11 +152,11 @@ int nx_waitid(int idtype, id_t id, FAR siginfo_t *info, 
int options)
 
 #ifdef CONFIG_SMP
   irqstate_t flags = enter_critical_section();
-#endif
-
+#else
   /* Disable pre-emption so that nothing changes while the loop executes */
 
   sched_lock();
+#endif
 
   /* Verify that this task actually has children and that the requested
* TCB is actually a child of this task.
@@ -417,10 +417,11 @@ int nx_waitid(int idtype, id_t id, FAR siginfo_t *info, 
int options)
 }
 
 errout:
-  sched_unlock();
 
 #ifdef CONFIG_SMP
   leave_critical_section(flags);
+#else
+  sched_unlock();
 #endif
 
   return ret;
diff --git a/sched/sched/sched_waitpid.c b/sched/sched/sched_waitpid.c
index 40534b6..d787ca0 100644
--- a/sched/sched/sched_waitpid.c
+++ b/sched/sched/sched_waitpid.c
@@ -78,11 +78,11 @@ pid_t nx_waitpid(pid_t pid, int *stat_loc, int options)
 
 #ifdef CONFIG_SMP
   irqstate_t flags = enter_critical_section();
-#endif
-
+#else
   /* Disable pre-emption so that nothing changes in the following tests */
 
   sched_lock();
+#endif
 
   /* Get the TCB corresponding to this PID */
 
@@ -169,10 +169,11 @@ pid_t nx_waitpid(pid_t pid, int *stat_loc, int options)
   ret = pid;
 
 errout:
-  sched_unlock();
 
 #ifdef CONFIG_SMP
   leave_critical_section(flags);
+#else
+  sched_unlock();
 #endif
 
   return ret;
@@ -217,11 +218,11 @@ pid_t nx_waitpid(pid_t pid, int *stat_loc, int options)
 
 #ifdef CONFIG_SMP
   irqstate_t flags = enter_critical_section();
-#endif
-
+#else
   /* Disable pre-emption so that nothing changes while the loop executes */
 
   sched_lock();
+#endif
 
   /* Verify that this task actually has children and that the requested PID
* is actually a child of this task.
@@ -464,10 +465,11 @@ pid_t nx_waitpid(pid_t pid, int *stat_loc, int options)
   ret = pid;
 
 errout:
-  sched_unlock();
 
 #ifdef CONFIG_SMP
   leave_critical_section(flags);
+#else
+  sched_unlock();
 #endif
 
   return ret;



[GitHub] [incubator-nuttx] masayuki2009 commented on pull request #2653: sched: sched: Don't call sched_lock()/unlock() in nx_waitid()/waitpid() for SMP

2021-01-04 Thread GitBox


masayuki2009 commented on pull request #2653:
URL: https://github.com/apache/incubator-nuttx/pull/2653#issuecomment-754321531


   See https://github.com/apache/incubator-nuttx/pull/2298 as well
   



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.

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




[incubator-nuttx-website] branch asf-site updated: Publishing web: 59c4fb7620bc9aabf46df895f9e5cdb361f50177 docs: 4ccaedf91f60e87c289baede2326662635673c56

2021-01-04 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/incubator-nuttx-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new 9eb1baa  Publishing web: 59c4fb7620bc9aabf46df895f9e5cdb361f50177 
docs: 4ccaedf91f60e87c289baede2326662635673c56
9eb1baa is described below

commit 9eb1baa50568dc029c9fdaf17eea91f512f8b48a
Author: Ouss4 
AuthorDate: Tue Jan 5 01:07:06 2021 +

Publishing web: 59c4fb7620bc9aabf46df895f9e5cdb361f50177 docs: 
4ccaedf91f60e87c289baede2326662635673c56
---
 content/docs/10.0.0/index.html | 2 +-
 content/docs/10.0.1/index.html | 2 +-
 content/docs/latest/index.html | 2 +-
 content/feed.xml   | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/content/docs/10.0.0/index.html b/content/docs/10.0.0/index.html
index 7c8959a..d9d84fb 100644
--- a/content/docs/10.0.0/index.html
+++ b/content/docs/10.0.0/index.html
@@ -207,7 +207,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: 04 January 21 at 01:05
+Last Updated: 05 January 21 at 01:04
 
 Table of Contents
 
diff --git a/content/docs/10.0.1/index.html b/content/docs/10.0.1/index.html
index 5ebbbe0..ade2ab9 100644
--- a/content/docs/10.0.1/index.html
+++ b/content/docs/10.0.1/index.html
@@ -211,7 +211,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: 04 January 21 at 01:05
+Last Updated: 05 January 21 at 01:05
 
 Table of Contents
 
diff --git a/content/docs/latest/index.html b/content/docs/latest/index.html
index 6ee24f0..2afdced 100644
--- a/content/docs/latest/index.html
+++ b/content/docs/latest/index.html
@@ -210,7 +210,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 64-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: 04 January 21 at 01:06
+Last Updated: 05 January 21 at 01:05
 
 Table of Contents
 
diff --git a/content/feed.xml b/content/feed.xml
index a666d96..0709636 100644
--- a/content/feed.xml
+++ b/content/feed.xml
@@ -5,8 +5,8 @@
 
 /
 
-Mon, 04 Jan 2021 01:07:48 +
-Mon, 04 Jan 2021 01:07:48 +
+Tue, 05 Jan 2021 01:07:04 +
+Tue, 05 Jan 2021 01:07:04 +
 Jekyll v3.8.5
 
   



[GitHub] [incubator-nuttx] masayuki2009 opened a new pull request #2653: sched: sched: Don't call sched_lock()/unlock() in nx_waitid()/waitpid() for SMP

2021-01-04 Thread GitBox


masayuki2009 opened a new pull request #2653:
URL: https://github.com/apache/incubator-nuttx/pull/2653


   ## Summary
   
   - Calling sched_lock()/unlock() is unnecessary for SMP
 because we've been using the critical section API
   
   ## Impact
   
   - SMP only
   
   ## Testing
   
   - Tested with smp and ostest with the following configurations
   - sabre-6quad:smp (QEMU, dev board)
   - spresense:smp, spresense:wifi_smp
   - sim:smp, sim:ostest
   - maix-bit:smp (QEMU)
   - esp32-devkitc:smp (QEMU)
   - lc823450-xgevk:rndis
   



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.

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




[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #2652: arch/stm32h7: Fix nxstyle errors

2021-01-04 Thread GitBox


xiaoxiang781216 merged pull request #2652:
URL: https://github.com/apache/incubator-nuttx/pull/2652


   



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.

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




[incubator-nuttx] branch master updated: arch/stm32h7: Fix nxstyle errors

2021-01-04 Thread xiaoxiang
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 4ccaedf  arch/stm32h7: Fix nxstyle errors
4ccaedf is described below

commit 4ccaedf91f60e87c289baede2326662635673c56
Author: Nathan Hartman <59230071+hartmannat...@users.noreply.github.com>
AuthorDate: Mon Jan 4 11:40:03 2021 -0500

arch/stm32h7: Fix nxstyle errors

arch/arm/src/stm32h7/stm32_adc.c:
arch/arm/src/stm32h7/stm32_adc.h:

* Fix nxstyle issues.
---
 arch/arm/src/stm32h7/stm32_adc.c | 32 +---
 arch/arm/src/stm32h7/stm32_adc.h | 40 +---
 2 files changed, 42 insertions(+), 30 deletions(-)

diff --git a/arch/arm/src/stm32h7/stm32_adc.c b/arch/arm/src/stm32h7/stm32_adc.c
index db2290b..4609111 100644
--- a/arch/arm/src/stm32h7/stm32_adc.c
+++ b/arch/arm/src/stm32h7/stm32_adc.c
@@ -551,7 +551,8 @@ static void adc_putregm(FAR struct stm32_dev_s *priv, int 
offset,
 static void adc_modifyregm(FAR struct stm32_dev_s *priv, int offset,
   uint32_t clrbits, uint32_t setbits)
 {
-  adc_putregm(priv, offset, (adc_getregm(priv, offset) & ~clrbits) | setbits);
+  adc_putregm(priv, offset,
+  (adc_getregm(priv, offset) & ~clrbits) | setbits);
 }
 
 /
@@ -1568,8 +1569,8 @@ static void adc_rxint(FAR struct adc_dev_s *dev, bool 
enable)
  * Name: adc_sqrbits
  /
 
-static uint32_t adc_sqrbits(FAR struct stm32_dev_s *priv, int first, int last,
-int offset)
+static uint32_t adc_sqrbits(FAR struct stm32_dev_s *priv, int first,
+int last, int offset)
 {
   uint32_t bits = 0;
   int i;
@@ -1691,17 +1692,21 @@ static int adc_set_ch(FAR struct adc_dev_s *dev, 
uint8_t ch)
 
   DEBUGASSERT(priv->nchannels <= ADC_MAX_SAMPLES);
 
-  bits = adc_sqrbits(priv, ADC_SQR4_FIRST, ADC_SQR4_LAST, ADC_SQR4_SQ_OFFSET);
+  bits = adc_sqrbits(priv, ADC_SQR4_FIRST, ADC_SQR4_LAST,
+ ADC_SQR4_SQ_OFFSET);
   adc_modifyreg(priv, STM32_ADC_SQR4_OFFSET, ~ADC_SQR4_RESERVED, bits);
 
-  bits = adc_sqrbits(priv, ADC_SQR3_FIRST, ADC_SQR3_LAST, ADC_SQR3_SQ_OFFSET);
+  bits = adc_sqrbits(priv, ADC_SQR3_FIRST, ADC_SQR3_LAST,
+ ADC_SQR3_SQ_OFFSET);
   adc_modifyreg(priv, STM32_ADC_SQR3_OFFSET, ~ADC_SQR3_RESERVED, bits);
 
-  bits = adc_sqrbits(priv, ADC_SQR2_FIRST, ADC_SQR2_LAST, ADC_SQR2_SQ_OFFSET);
+  bits = adc_sqrbits(priv, ADC_SQR2_FIRST, ADC_SQR2_LAST,
+ ADC_SQR2_SQ_OFFSET);
   adc_modifyreg(priv, STM32_ADC_SQR2_OFFSET, ~ADC_SQR2_RESERVED, bits);
 
   bits = ((uint32_t)priv->nchannels - 1) << ADC_SQR1_L_SHIFT |
- adc_sqrbits(priv, ADC_SQR1_FIRST, ADC_SQR1_LAST, ADC_SQR1_SQ_OFFSET);
+ adc_sqrbits(priv, ADC_SQR1_FIRST, ADC_SQR1_LAST,
+ ADC_SQR1_SQ_OFFSET);
   adc_modifyreg(priv, STM32_ADC_SQR1_OFFSET, ~ADC_SQR1_RESERVED, bits);
 
 #ifdef ADC_HAVE_DFSDM
@@ -1835,7 +1840,8 @@ static int adc_interrupt(FAR struct adc_dev_s *dev, 
uint32_t adcisr)
   value  = adc_getreg(priv, STM32_ADC_DR_OFFSET);
   value &= ADC_DR_MASK;
 
-  awarn("WARNING: Analog Watchdog, Value (0x%03x) out of range!\n", value);
+  awarn("WARNING: Analog Watchdog, Value (0x%03x) out of range!\n",
+value);
 
   /* Stop ADC conversions to avoid continuous interrupts */
 
@@ -1874,7 +1880,9 @@ static int adc_interrupt(FAR struct adc_dev_s *dev, 
uint32_t adcisr)
   priv->cb->au_receive(dev, priv->chanlist[priv->current], value);
 }
 
-  /* Set the channel number of the next channel that will complete 
conversion */
+  /* Set the channel number of the next channel that will complete
+   * conversion
+   */
 
   priv->current++;
 
@@ -1988,7 +1996,8 @@ static int adc3_interrupt(int irq, FAR void *context, FAR 
void *arg)
  /
 
 #ifdef ADC_HAVE_DMA
-static void adc_dmaconvcallback(DMA_HANDLE handle, uint8_t isr, FAR void *arg)
+static void adc_dmaconvcallback(DMA_HANDLE handle, uint8_t isr,
+FAR void *arg)
 {
   FAR struct adc_dev_s   *dev  = (FAR struct adc_dev_s *)arg;
   FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)dev->ad_priv;
@@ -2051,7 +2060,8 @@ static void adc_dmaconvcallback(DMA_HANDLE handle, 
uint8_t isr, FAR void *arg)
  *
  /
 
-struct adc_dev_s *stm32h7_adc_initialize(int intf, FAR const uint8_t *chanlist,
+struct adc_dev_s *stm32h7_adc_initialize(int intf,
+ FAR const uint8_t *chanlist,

[GitHub] [incubator-nuttx] hartmannathan opened a new pull request #2652: arch/stm32h7: Fix nxstyle errors

2021-01-04 Thread GitBox


hartmannathan opened a new pull request #2652:
URL: https://github.com/apache/incubator-nuttx/pull/2652


   ## Summary
   
   arch/arm/src/stm32h7/stm32_adc.c:
   arch/arm/src/stm32h7/stm32_adc.h:
   
   - Fix nxstyle issues.
   
   ## Impact
   
   Removes nxstyle errors.
   
   ## Testing
   
   nxstyle



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.

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




[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #2628: Add generic efuse driver for NuttX

2021-01-04 Thread GitBox


xiaoxiang781216 commented on a change in pull request #2628:
URL: https://github.com/apache/incubator-nuttx/pull/2628#discussion_r551321958



##
File path: include/nuttx/efuse/efuse.h
##
@@ -0,0 +1,294 @@
+/
+ * include/nuttx/efuse/efuse.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 __INCLUDE_NUTTX_EFUSE_EFUSE_H
+#define __INCLUDE_NUTTX_EFUSE_EFUSE_H
+
+/
+ * Included Files
+ /
+
+#include 
+#include 
+
+#include 
+#include 
+
+#ifdef CONFIG_EFUSE
+
+/
+ * Pre-processor Definitions
+ /
+
+/* Command: EFUSEIOC_READ_FIELD_BLOB
+ * Description: Read a blob of bits from an efuse field.
+ * Arguments:   A structure containing the field[], a dst pointer, and size
+ *  of bits to be read from efuses.
+ * Return:  Zero (OK) on success.  Minus one will be returned on failure
+ *  with the errno value set appropriately.
+ */
+
+#define EFUSEIOC_READ_FIELD_BLOB  _EFUSEIOC(0x0001)
+
+/* Command: EFUSEIOC_READ_FIELD_BIT
+ * Description: Read of state of an efuse bit.
+ * Arguments:   A structure containing the field to be read.
+ * Return:  Zero (OK) on success.  Minus one will be returned on failure
+ *  with the errno value set appropriately.
+ */
+
+#define EFUSEIOC_READ_FIELD_BIT   _EFUSEIOC(0x0002)
+
+/* Command: EFUSEIOC_WRITE_FIELD_BLOB
+ * Description: Write a blob of bits to an efuse's field
+ * Arguments:   A structure containing the field[], the src memory and the
+ *  amount of bits to write.
+ * Return:  Zero (OK) on success.  Minus one will be returned on failure
+ *  with the errno value set appropriately.
+ */
+
+#define EFUSEIOC_WRITE_FIELD_BLOB _EFUSEIOC(0x0003)
+
+/* Command: EFUSEIOC_WRITE_FIELD_BIT
+ * Description: Write a bit to an efuse (burn it).
+ * Arguments:   A structure containing bit field.
+ * Return:  Zero (OK) on success.  Minus one will be returned on failure
+ *  with the errno value set appropriately.
+ */
+
+#define EFUSEIOC_WRITE_FIELD_BIT  _EFUSEIOC(0x0004)
+
+/* Command: EFUSEIOC_GET_FIELD_SIZE
+ * Description: Get the length of the field in bits.
+ * Arguments:   A structure containing the fields.
+ * Return:  Zero (OK) on success.  Minus one will be returned on failure
+ *  with the errno value set appropriately.
+ */
+
+#define EFUSEIOC_GET_FIELD_SIZE   _EFUSEIOC(0x0005)
+
+/* Command: EFUSEIOC_READ_REG
+ * Description: Read an efuse register.
+ * Arguments:   A structure containing the block number and the register to
+ *  be read.
+ * Return:  Zero (OK) on success.  Minus one will be returned on failure
+ *  with the errno value set appropriately.
+ */
+
+#define EFUSEIOC_READ_REG _EFUSEIOC(0x0006)
+
+/* Command: EFUSEIOC_WRITE_REG
+ * Description: Write an efuse register.
+ * Arguments:   A structure containing the block number, the register to
+ *  write and value to be written.
+ * Return:  Zero (OK) on success.  Minus one will be returned on failure
+ *  with the errno value set appropriately.
+ */
+
+#define EFUSEIOC_WRITE_REG_EFUSEIOC(0x0007)
+
+/* Command: EFUSEIOC_READ_BLOCK
+ * Description: Read a key from efuse's block.
+ * Arguments:   A structure containing the block number, the dst_key pointer,
+ *  the offset in bits and the amount of bits to read.
+ * Return:  Zero (OK) on success.  Minus one will be returned on failure
+ *  with the errno value set appropriately.
+ */
+
+#define EFUSEIOC_READ_BLOCK   _EFUSEIOC(0x0008)

Review comment:
   it's better to define a simple and clean interface first, then consider 
how to map the generic interface to 

[GitHub] [incubator-nuttx] acassis commented on a change in pull request #2628: Add generic efuse driver for NuttX

2021-01-04 Thread GitBox


acassis commented on a change in pull request #2628:
URL: https://github.com/apache/incubator-nuttx/pull/2628#discussion_r551315486



##
File path: include/nuttx/efuse/efuse.h
##
@@ -0,0 +1,294 @@
+/
+ * include/nuttx/efuse/efuse.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 __INCLUDE_NUTTX_EFUSE_EFUSE_H
+#define __INCLUDE_NUTTX_EFUSE_EFUSE_H
+
+/
+ * Included Files
+ /
+
+#include 
+#include 
+
+#include 
+#include 
+
+#ifdef CONFIG_EFUSE
+
+/
+ * Pre-processor Definitions
+ /
+
+/* Command: EFUSEIOC_READ_FIELD_BLOB
+ * Description: Read a blob of bits from an efuse field.
+ * Arguments:   A structure containing the field[], a dst pointer, and size
+ *  of bits to be read from efuses.
+ * Return:  Zero (OK) on success.  Minus one will be returned on failure
+ *  with the errno value set appropriately.
+ */
+
+#define EFUSEIOC_READ_FIELD_BLOB  _EFUSEIOC(0x0001)
+
+/* Command: EFUSEIOC_READ_FIELD_BIT
+ * Description: Read of state of an efuse bit.
+ * Arguments:   A structure containing the field to be read.
+ * Return:  Zero (OK) on success.  Minus one will be returned on failure
+ *  with the errno value set appropriately.
+ */
+
+#define EFUSEIOC_READ_FIELD_BIT   _EFUSEIOC(0x0002)
+
+/* Command: EFUSEIOC_WRITE_FIELD_BLOB
+ * Description: Write a blob of bits to an efuse's field
+ * Arguments:   A structure containing the field[], the src memory and the
+ *  amount of bits to write.
+ * Return:  Zero (OK) on success.  Minus one will be returned on failure
+ *  with the errno value set appropriately.
+ */
+
+#define EFUSEIOC_WRITE_FIELD_BLOB _EFUSEIOC(0x0003)
+
+/* Command: EFUSEIOC_WRITE_FIELD_BIT
+ * Description: Write a bit to an efuse (burn it).
+ * Arguments:   A structure containing bit field.
+ * Return:  Zero (OK) on success.  Minus one will be returned on failure
+ *  with the errno value set appropriately.
+ */
+
+#define EFUSEIOC_WRITE_FIELD_BIT  _EFUSEIOC(0x0004)
+
+/* Command: EFUSEIOC_GET_FIELD_SIZE
+ * Description: Get the length of the field in bits.
+ * Arguments:   A structure containing the fields.
+ * Return:  Zero (OK) on success.  Minus one will be returned on failure
+ *  with the errno value set appropriately.
+ */
+
+#define EFUSEIOC_GET_FIELD_SIZE   _EFUSEIOC(0x0005)
+
+/* Command: EFUSEIOC_READ_REG
+ * Description: Read an efuse register.
+ * Arguments:   A structure containing the block number and the register to
+ *  be read.
+ * Return:  Zero (OK) on success.  Minus one will be returned on failure
+ *  with the errno value set appropriately.
+ */
+
+#define EFUSEIOC_READ_REG _EFUSEIOC(0x0006)
+
+/* Command: EFUSEIOC_WRITE_REG
+ * Description: Write an efuse register.
+ * Arguments:   A structure containing the block number, the register to
+ *  write and value to be written.
+ * Return:  Zero (OK) on success.  Minus one will be returned on failure
+ *  with the errno value set appropriately.
+ */
+
+#define EFUSEIOC_WRITE_REG_EFUSEIOC(0x0007)
+
+/* Command: EFUSEIOC_READ_BLOCK
+ * Description: Read a key from efuse's block.
+ * Arguments:   A structure containing the block number, the dst_key pointer,
+ *  the offset in bits and the amount of bits to read.
+ * Return:  Zero (OK) on success.  Minus one will be returned on failure
+ *  with the errno value set appropriately.
+ */
+
+#define EFUSEIOC_READ_BLOCK   _EFUSEIOC(0x0008)
+
+/* Command: EFUSEIOC_WRITE_BLOCK
+ * Description: Write a key to efuse's block.
+ * Arguments:   A structure containing the block number, 

[GitHub] [incubator-nuttx] acassis commented on a change in pull request #2628: Add generic efuse driver for NuttX

2021-01-04 Thread GitBox


acassis commented on a change in pull request #2628:
URL: https://github.com/apache/incubator-nuttx/pull/2628#discussion_r551313793



##
File path: include/nuttx/efuse/efuse.h
##
@@ -0,0 +1,294 @@
+/
+ * include/nuttx/efuse/efuse.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 __INCLUDE_NUTTX_EFUSE_EFUSE_H
+#define __INCLUDE_NUTTX_EFUSE_EFUSE_H
+
+/
+ * Included Files
+ /
+
+#include 
+#include 
+
+#include 
+#include 
+
+#ifdef CONFIG_EFUSE
+
+/
+ * Pre-processor Definitions
+ /
+
+/* Command: EFUSEIOC_READ_FIELD_BLOB
+ * Description: Read a blob of bits from an efuse field.
+ * Arguments:   A structure containing the field[], a dst pointer, and size
+ *  of bits to be read from efuses.
+ * Return:  Zero (OK) on success.  Minus one will be returned on failure
+ *  with the errno value set appropriately.
+ */
+
+#define EFUSEIOC_READ_FIELD_BLOB  _EFUSEIOC(0x0001)
+
+/* Command: EFUSEIOC_READ_FIELD_BIT
+ * Description: Read of state of an efuse bit.
+ * Arguments:   A structure containing the field to be read.
+ * Return:  Zero (OK) on success.  Minus one will be returned on failure
+ *  with the errno value set appropriately.
+ */
+
+#define EFUSEIOC_READ_FIELD_BIT   _EFUSEIOC(0x0002)
+
+/* Command: EFUSEIOC_WRITE_FIELD_BLOB
+ * Description: Write a blob of bits to an efuse's field
+ * Arguments:   A structure containing the field[], the src memory and the
+ *  amount of bits to write.
+ * Return:  Zero (OK) on success.  Minus one will be returned on failure
+ *  with the errno value set appropriately.
+ */
+
+#define EFUSEIOC_WRITE_FIELD_BLOB _EFUSEIOC(0x0003)
+
+/* Command: EFUSEIOC_WRITE_FIELD_BIT
+ * Description: Write a bit to an efuse (burn it).
+ * Arguments:   A structure containing bit field.
+ * Return:  Zero (OK) on success.  Minus one will be returned on failure
+ *  with the errno value set appropriately.
+ */
+
+#define EFUSEIOC_WRITE_FIELD_BIT  _EFUSEIOC(0x0004)
+
+/* Command: EFUSEIOC_GET_FIELD_SIZE
+ * Description: Get the length of the field in bits.
+ * Arguments:   A structure containing the fields.
+ * Return:  Zero (OK) on success.  Minus one will be returned on failure
+ *  with the errno value set appropriately.
+ */
+
+#define EFUSEIOC_GET_FIELD_SIZE   _EFUSEIOC(0x0005)
+
+/* Command: EFUSEIOC_READ_REG
+ * Description: Read an efuse register.
+ * Arguments:   A structure containing the block number and the register to
+ *  be read.
+ * Return:  Zero (OK) on success.  Minus one will be returned on failure
+ *  with the errno value set appropriately.
+ */
+
+#define EFUSEIOC_READ_REG _EFUSEIOC(0x0006)
+
+/* Command: EFUSEIOC_WRITE_REG
+ * Description: Write an efuse register.
+ * Arguments:   A structure containing the block number, the register to
+ *  write and value to be written.
+ * Return:  Zero (OK) on success.  Minus one will be returned on failure
+ *  with the errno value set appropriately.
+ */
+
+#define EFUSEIOC_WRITE_REG_EFUSEIOC(0x0007)
+
+/* Command: EFUSEIOC_READ_BLOCK
+ * Description: Read a key from efuse's block.
+ * Arguments:   A structure containing the block number, the dst_key pointer,
+ *  the offset in bits and the amount of bits to read.
+ * Return:  Zero (OK) on success.  Minus one will be returned on failure
+ *  with the errno value set appropriately.
+ */
+
+#define EFUSEIOC_READ_BLOCK   _EFUSEIOC(0x0008)

Review comment:
   Hi @xiaoxiang781216 read/write a field bit will work with fields of a 
single bit (a single fuse itself), the operation 

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #2631: mqueue: simplify the mqueue reailize

2021-01-04 Thread GitBox


xiaoxiang781216 commented on a change in pull request #2631:
URL: https://github.com/apache/incubator-nuttx/pull/2631#discussion_r551271645



##
File path: fs/mqueue/mq_open.c
##
@@ -196,19 +241,18 @@ int nxmq_open(FAR const char *mq_name, int oflags, mode_t 
mode,
   goto errout_with_inode;
 }
 
-  /* Create a message queue descriptor for the TCB */
+  /* Associate the inode with a file structure */
 
-  *mqdes = nxmq_create_des(NULL, msgq, oflags);
-  if (!*mqdes)
+  *mqdes = files_allocate(inode, oflags, 0, 0);
+  if (*mqdes < 0)
 {
-  ret = -ENOMEM;
+  ret = -EMFILE;

Review comment:
   ret = *mqdes

##
File path: fs/mqueue/mq_open.c
##
@@ -147,14 +193,13 @@ int nxmq_open(FAR const char *mq_name, int oflags, mode_t 
mode,
   goto errout_with_inode;
 }
 
-  /* Create a message queue descriptor for the current thread */
+  /* Associate the inode with a file structure */
 
-  msgq  = inode->u.i_mqueue;
-  *mqdes = nxmq_create_des(NULL, msgq, oflags);
-  if (!*mqdes)
+  *mqdes = files_allocate(inode, oflags, 0, 0);
+  if (*mqdes < 0)
 {
-  ret = -ENOMEM;
-  goto errout_with_inode;
+  ret = -EMFILE;

Review comment:
   change to:
   ```
   ret = *mqdes
   ```
   see 
https://github.com/apache/incubator-nuttx/pull/2639/files#diff-5adc55f87002f2d706285b3f201b7616f0055e9da6de5066f2f8bdcdab19d88fR63

##
File path: fs/vfs/fs_unlink.c
##
@@ -129,7 +129,12 @@ int nx_unlink(FAR const char *pathname)
* release all resources because it is no longer accessible.
*/
 
+#ifdef CONFIG_DISABLE_MQUEUE
   if (INODE_IS_DRIVER(inode) && inode->u.i_ops->unlink)
+#else
+  if ((INODE_IS_DRIVER(inode) || INODE_IS_MQUEUE(inode))
+  && inode->u.i_ops->unlink)

Review comment:
   don't need





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.

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




[incubator-nuttx] branch master updated: Updated README.txt

2021-01-04 Thread xiaoxiang
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 4e6ce1f  Updated README.txt
4e6ce1f is described below

commit 4e6ce1f00b0eba506628555e1fc517fccb6c2742
Author: RB <60086336+rb-...@users.noreply.github.com>
AuthorDate: Mon Jan 4 13:16:24 2021 +0530

Updated README.txt
---
 boards/renesas/rx65n/rx65n-rsk2mb/README.txt | 5 -
 1 file changed, 5 deletions(-)

diff --git a/boards/renesas/rx65n/rx65n-rsk2mb/README.txt 
b/boards/renesas/rx65n/rx65n-rsk2mb/README.txt
index 74ff236..67875bd 100644
--- a/boards/renesas/rx65n/rx65n-rsk2mb/README.txt
+++ b/boards/renesas/rx65n/rx65n-rsk2mb/README.txt
@@ -390,8 +390,3 @@ endif
Select Motorola SREC format.
 4. Download Renesas flash programmer tool from 
https://www.renesas.com/in/en/products/software-tools/tools/programmer/renesas-flash-programmer-programming-gui.html#downloads
 5. Refer to the user manual document, for steps to flash NuttX binary using 
RFP tool.
-Changes Made in NuttX 8.2 Code
-
-1. In wd_start.c file, in function wd_expiration(), typecasting is done when 
the signal handler nxsig_timeout() is invoked.
-2. In rtc.c, (drivers/timers/rtc.c) file, in function rtc_periodic_callback(), 
alarminfo->active = false is commented.
-The reason being, periodic interrupt should not be disabled. Uncommenting the 
above mentioned line (alarminfo->active = false), will make the periodic 
interrupt come only once.



[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #2649: Updated README.txt for RSK2M

2021-01-04 Thread GitBox


xiaoxiang781216 merged pull request #2649:
URL: https://github.com/apache/incubator-nuttx/pull/2649


   



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.

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




[GitHub] [incubator-nuttx-apps] anchao opened a new pull request #552: wireless/wapi: add set country code support

2021-01-04 Thread GitBox


anchao opened a new pull request #552:
URL: https://github.com/apache/incubator-nuttx-apps/pull/552


   ## Summary
   
   wireless/wapi: add set country code support
   
   Signed-off-by: chao.an 
   
   ## Impact
   
   N/A
   
   ## Testing
   
   wapi wlan0 country CN



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.

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




[GitHub] [incubator-nuttx-apps] anchao opened a new pull request #551: make/archive: replace the dependency to preprequisite list

2021-01-04 Thread GitBox


anchao opened a new pull request #551:
URL: https://github.com/apache/incubator-nuttx-apps/pull/551


   
   ## Summary
   
   make/archive: replace the dependency to preprequisite list
   
   Change-Id: I3c3f9354cedb9f4f69c66698cd7556f1de95c660
   Signed-off-by: chao.an 
   
   ## Impact
   
   N/A
   
   ## Testing
   
   N/A



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.

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




[GitHub] [incubator-nuttx] anchao opened a new pull request #2651: make/archive: replace the dependency to preprequisite list

2021-01-04 Thread GitBox


anchao opened a new pull request #2651:
URL: https://github.com/apache/incubator-nuttx/pull/2651


   
   ## Summary
   
   make/archive: replace the dependency to preprequisite list 
   
   Signed-off-by: chao.an 
   
   ## Impact
   
   N/A
   
   ## Testing
   
   N/A



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.

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




[GitHub] [incubator-nuttx-apps] anchao opened a new pull request #550: system/readline: check the control ascii only to support multi-languages

2021-01-04 Thread GitBox


anchao opened a new pull request #550:
URL: https://github.com/apache/incubator-nuttx-apps/pull/550


   ## Summary
   
   system/readline: check the control ascii only to support multi-languages 
   
   ## Impact
   
   ## Testing
   
   ```
   nsh> echo hello world
   hello world
   nsh> echo こんにちは
   こんにちは
   nsh> echo 你好
   你好
   ```
   
   



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.

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




[GitHub] [incubator-nuttx] anchao opened a new pull request #2650: ctype/iscntrl: correct the control character function

2021-01-04 Thread GitBox


anchao opened a new pull request #2650:
URL: https://github.com/apache/incubator-nuttx/pull/2650


   
   
   ## Summary
   
   ctype/iscntrl: correct the control character function 
   
   all the characters placed before the space on the ASCII table
   and the 0x7F character (DEL) are control characters.
   
   Change-Id: Id187b39ce50b80e9ebee85a7242716eb017575d7
   Signed-off-by: chao.an 
   
   ## Impact
   
   ## Testing
   
   iscntrl(0x80)
   



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.

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




[GitHub] [incubator-nuttx] yamt commented on a change in pull request #2063: Fix libcxx for sim/macOS

2021-01-04 Thread GitBox


yamt commented on a change in pull request #2063:
URL: https://github.com/apache/incubator-nuttx/pull/2063#discussion_r551175295



##
File path: libs/libc/sched/task_startup.c
##
@@ -94,6 +94,11 @@ extern uintptr_t _etext;
 static void cxx_initialize(void)
 {
 #ifdef CONFIG_HAVE_CXXINITIALIZE
+#if defined(CONFIG_ARCH_SIM) && defined(CONFIG_HOST_MACOS)
+  extern void macho_call_saved_init_funcs(void);

Review comment:
   i can't think of a better place. neither up_initialize or 
board_initialize seem appropriate to me.
   
   i can introduce ARCH_HAVE_CXXINITIALIZE or something along the line if you 
prefer.
   





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.

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




[GitHub] [incubator-nuttx] yamt commented on a change in pull request #2063: Fix libcxx for sim/macOS

2021-01-04 Thread GitBox


yamt commented on a change in pull request #2063:
URL: https://github.com/apache/incubator-nuttx/pull/2063#discussion_r551175295



##
File path: libs/libc/sched/task_startup.c
##
@@ -94,6 +94,11 @@ extern uintptr_t _etext;
 static void cxx_initialize(void)
 {
 #ifdef CONFIG_HAVE_CXXINITIALIZE
+#if defined(CONFIG_ARCH_SIM) && defined(CONFIG_HOST_MACOS)
+  extern void macho_call_saved_init_funcs(void);

Review comment:
   i can't think of a better place. neither up_initialize or 
board_initialize doesn't seem appropriate to me.
   
   i can introduce ARCH_HAVE_CXXINITIALIZE or something along the line if you 
prefer.
   





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.

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




[GitHub] [incubator-nuttx] Ouss4 merged pull request #2647: xtensa/esp32: Fix ESP32 serial UART tx ready check error

2021-01-04 Thread GitBox


Ouss4 merged pull request #2647:
URL: https://github.com/apache/incubator-nuttx/pull/2647


   



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.

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




[incubator-nuttx] branch master updated: xtensa/esp32: Fix ESP32 serial UART tx ready check error

2021-01-04 Thread aguettouche
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new fadae0b  xtensa/esp32: Fix ESP32 serial UART tx ready check error
fadae0b is described below

commit fadae0bf393ce45416b6c75e5d3506f90cba88e9
Author: Dong Heng 
AuthorDate: Mon Jan 4 10:55:50 2021 +0800

xtensa/esp32: Fix ESP32 serial UART tx ready check error
---
 arch/xtensa/src/esp32/esp32_serial.c | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/xtensa/src/esp32/esp32_serial.c 
b/arch/xtensa/src/esp32/esp32_serial.c
index ddaa6ec..80b0acc 100644
--- a/arch/xtensa/src/esp32/esp32_serial.c
+++ b/arch/xtensa/src/esp32/esp32_serial.c
@@ -1154,10 +1154,13 @@ static void esp32_txint(struct uart_dev_s *dev, bool 
enable)
 
 static bool esp32_txready(struct uart_dev_s *dev)
 {
+  uint32_t txcnt;
   struct esp32_dev_s *priv = (struct esp32_dev_s *)dev->priv;
 
-  return ((esp32_serialin(priv, UART_STATUS_OFFSET) & UART_TXFIFO_CNT_M) <
-  0x7f);
+  txcnt = (esp32_serialin(priv, UART_STATUS_OFFSET) >> UART_TXFIFO_CNT_S) &
+  UART_TXFIFO_CNT_V;
+
+  return txcnt < 0x7f;
 }
 
 /



[GitHub] [incubator-nuttx-apps] xiaoxiang781216 opened a new pull request #549: Fix pty_test issue during testing

2021-01-04 Thread GitBox


xiaoxiang781216 opened a new pull request #549:
URL: https://github.com/apache/incubator-nuttx-apps/pull/549


   ## Summary
   examples/pty_test: Remove O_NONBLOCK from open
   nsh: Pass the correct command lines to nsh_consolemain
   
   ## Impact
   pts test can run sucesfully
   
   ## 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.

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