(mynewt-nimble) branch master updated: porting/nuttx: Remove not used wqueue.h

2024-09-19 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
 new caecb2c62 porting/nuttx: Remove not used wqueue.h
caecb2c62 is described below

commit caecb2c6283cc612551ef6a980ff1b5b9e51beb6
Author: Szymon Janc 
AuthorDate: Tue Sep 17 16:32:30 2024 +0200

porting/nuttx: Remove not used wqueue.h

This looks like copy-and-paste from Linux port.
---
 porting/npl/nuttx/src/wqueue.h | 104 -
 1 file changed, 104 deletions(-)

diff --git a/porting/npl/nuttx/src/wqueue.h b/porting/npl/nuttx/src/wqueue.h
deleted file mode 100644
index 7821eacda..0
--- a/porting/npl/nuttx/src/wqueue.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
-   wqueue.h
-   Worker thread queue based on the Standard C++ library list
-   template class.
-   --
-   Copyright (c) 2013 Vic Hargrave
-   Licensed 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.
-*/
-
-// 
https://vichargrave.github.io/articles/2013-01/multithreaded-work-queue-in-cpp
-// https://github.com/vichargrave/wqueue/blob/master/wqueue.h
-
-
-#ifndef __wqueue_h__
-#define __wqueue_h__
-
-#include 
-#include 
-#include 
-
-struct wqueue_s
-{
-dq_queue_s   m_queue;
-pthread_mutex_t  m_mutex;
-pthread_mutexattr_t  m_mutex_attr;
-pthread_cond_t   m_condv;
-};
-
-using namespace std;
-
-template  class wqueue
-{
-dq_queue_s   m_queue;
-pthread_mutex_t  m_mutex;
-pthread_mutexattr_t  m_mutex_attr;
-pthread_cond_t   m_condv;
-
-public:
-wqueue()
-{
-dq_init(m_queue);
-pthread_mutexattr_init(&m_mutex_attr);
-pthread_mutexattr_settype(&m_mutex_attr, PTHREAD_MUTEX_RECURSIVE);
-pthread_mutex_init(&m_mutex, &m_mutex_attr);
-pthread_cond_init(&m_condv, NULL);
-}
-
-~wqueue() {
-pthread_mutex_destroy(&m_mutex);
-pthread_cond_destroy(&m_condv);
-}
-
-void put(T item) {
-dq_entry_t* entry = malloc(sizeof(T));
-
-pthread_mutex_lock(&m_mutex);
-dq_addlast(entry, &m_queue);
-m_queue.push_back(item);
-pthread_cond_signal(&m_condv);
-pthread_mutex_unlock(&m_mutex);
-}
-
-T get(uint32_t tmo) {
-pthread_mutex_lock(&m_mutex);
-if (tmo) {
-while (m_queue.size() == 0) {
-pthread_cond_wait(&m_condv, &m_mutex);
-}
-}
-
-T item = NULL;
-
-if (m_queue.size() != 0) {
-item = m_queue.front();
-m_queue.pop_front();
-}
-
-pthread_mutex_unlock(&m_mutex);
-return item;
-}
-
-void remove(T item) {
-pthread_mutex_lock(&m_mutex);
-m_queue.remove(item);
-pthread_mutex_unlock(&m_mutex);
-}
-
-int size() {
-pthread_mutex_lock(&m_mutex);
-int size = m_queue.size();
-pthread_mutex_unlock(&m_mutex);
-return size;
-}
-};
-
-#endif



(mynewt-nimble) branch master updated: nimble/host/src/ble_gap.c - undefined SET_BIT before defining it. The STM32 port also has a SET_BIT.

2024-09-18 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
 new 1962ba172 nimble/host/src/ble_gap.c - undefined SET_BIT before 
defining it. The STM32 port also has a SET_BIT.
1962ba172 is described below

commit 1962ba172647002782b8879e6e10772efb79857c
Author: dmainz 
AuthorDate: Sat Sep 14 13:00:13 2024 -0500

nimble/host/src/ble_gap.c - undefined SET_BIT before defining it.
The STM32 port also has a SET_BIT.
---
 nimble/host/src/ble_gap.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/nimble/host/src/ble_gap.c b/nimble/host/src/ble_gap.c
index b0ce6ff47..5a161a276 100644
--- a/nimble/host/src/ble_gap.c
+++ b/nimble/host/src/ble_gap.c
@@ -41,6 +41,7 @@
 #define bssnz_t
 #endif
 
+#undef SET_BIT
 #define SET_BIT(t, n)  (t |= 1UL << (n))
 
 /**



(mynewt-newt) branch master updated: documentation/sphinx: Fix formatting errors in `.rst` files

2024-09-17 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newt.git


The following commit(s) were added to refs/heads/master by this push:
 new 0c237bff documentation/sphinx: Fix formatting errors in `.rst` files
0c237bff is described below

commit 0c237bff537bb49eac699a9c5eef3456a441a062
Author: Wojciech Pietraszewski 
AuthorDate: Mon Sep 16 17:39:00 2024 +0200

documentation/sphinx: Fix formatting errors in `.rst` files

Removes emojis from code snippets causing issues with LaTeX
output generated by Sphinx.
---
 docs/command_list/newt_complete.rst | 2 +-
 docs/install/newt_mac.rst   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/docs/command_list/newt_complete.rst 
b/docs/command_list/newt_complete.rst
index 205710d4..6b05cc5a 100644
--- a/docs/command_list/newt_complete.rst
+++ b/docs/command_list/newt_complete.rst
@@ -14,7 +14,7 @@ Install bash autocompletion
 Bash completion has been installed to:
   /usr/local/etc/bash_completion.d
 ==> Summary
-🍺  /usr/local/Cellar/bash-completion/1.3_1: 189 files, 607.8K
+/usr/local/Cellar/bash-completion/1.3_1: 189 files, 607.8K
 
 Enable autocompletion for newt
 ^^
diff --git a/docs/install/newt_mac.rst b/docs/install/newt_mac.rst
index d628c282..1593f70f 100644
--- a/docs/install/newt_mac.rst
+++ b/docs/install/newt_mac.rst
@@ -78,7 +78,7 @@ commands to upgrade to newt latest:
 ==> Downloading from 
https://raw.githubusercontent.com/juullabs-oss/binary-releases/master/mynewt-newt-tools_1.5.0/mynewt-newt-1.5.0.sierra.bottle.tar.gz
  
100.0%
 ==> Pouring mynewt-newt-1.5.0.sierra.bottle.tar.gz
-🍺  /usr/local/Cellar/mynewt-newt/1.5.0: 3 files, 8.1MB
+/usr/local/Cellar/mynewt-newt/1.5.0: 3 files, 8.1MB
 
 Installing the Latest Release Version of Newt
 ^^^
@@ -94,7 +94,7 @@ Run the following command to install the latest release 
version of newt:
 ==> Downloading from 
https://raw.githubusercontent.com/JuulLabs-OSS/binary-releases/master/mynewt-newt-tools_1.5.0/mynewt-newt-
  
100.0%
 ==> Pouring mynewt-newt-1.5.0.sierra.bottle.tar.gz
-🍺  /usr/local/Cellar/mynewt-newt/1.5.0: 3 files, 8.1MB
+/usr/local/Cellar/mynewt-newt/1.5.0: 3 files, 8.1MB
 
 **Notes:** Homebrew bottles for newt are available for macOS Sierra. If you 
are running an earlier version of macOS,
 the installation will install the latest version of Go and compile newt 
locally.



(mynewt-newtmgr) branch master updated: documentation/sphinx: Fix formatting errors in `.rst` files

2024-09-17 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newtmgr.git


The following commit(s) were added to refs/heads/master by this push:
 new acfc51c  documentation/sphinx: Fix formatting errors in `.rst` files
acfc51c is described below

commit acfc51c8c048bf2e3cea5b0264a46740288ca8a6
Author: Wojciech Pietraszewski 
AuthorDate: Mon Sep 16 17:49:06 2024 +0200

documentation/sphinx: Fix formatting errors in `.rst` files

Fixes broken references to other documents/sections.
Removes emojis from code snippets causing issues with LaTeX
output generated by Sphinx.
---
 docs/command_list/newtmgr_mpstats.rst   | 2 +-
 docs/command_list/newtmgr_stat.rst  | 2 +-
 docs/command_list/newtmgr_taskstats.rst | 2 +-
 docs/install/install_mac.rst| 4 ++--
 docs/install/install_windows.rst| 3 +--
 5 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/docs/command_list/newtmgr_mpstats.rst 
b/docs/command_list/newtmgr_mpstats.rst
index 58b84e2..1da7c9e 100644
--- a/docs/command_list/newtmgr_mpstats.rst
+++ b/docs/command_list/newtmgr_mpstats.rst
@@ -44,7 +44,7 @@ Examples
 
+---++
 
 Here is an example output for the ``myble`` application from the
-:doc:`Enabling Newt Manager in any app <../../os/tutorials/add_newtmgr>` 
tutiorial:
+:doc:`Enabling Newt Manager in any app <../../tutorials/devmgmt/add_newtmgr>` 
tutiorial:
 
 .. code-block:: console
 
diff --git a/docs/command_list/newtmgr_stat.rst 
b/docs/command_list/newtmgr_stat.rst
index 52e3acc..2b94605 100644
--- a/docs/command_list/newtmgr_stat.rst
+++ b/docs/command_list/newtmgr_stat.rst
@@ -49,7 +49,7 @@ Examples
 
+---++
 
 Here are some example outputs for the ``myble`` application from the
-:doc:`Enabling Newt Manager in any app <../../os/tutorials/add_newtmgr>` 
tutiorial:
+:doc:`Enabling Newt Manager in any app <../../tutorials/devmgmt/add_newtmgr>` 
tutiorial:
 
 The statistics for the ble_att Stats:
 
diff --git a/docs/command_list/newtmgr_taskstats.rst 
b/docs/command_list/newtmgr_taskstats.rst
index 41639e1..ea1942f 100644
--- a/docs/command_list/newtmgr_taskstats.rst
+++ b/docs/command_list/newtmgr_taskstats.rst
@@ -47,7 +47,7 @@ Examples
 
+---+-+
 
 Here is an example output for the ``myble`` application from the
-:doc:`Enabling Newt Manager in any app <../../os/tutorials/add_newtmgr>` 
tutorial:
+:doc:`Enabling Newt Manager in any app <../../tutorials/devmgmt/add_newtmgr>` 
tutorial:
 
 .. code-block:: console
 
diff --git a/docs/install/install_mac.rst b/docs/install/install_mac.rst
index 57a38d2..6080d9f 100644
--- a/docs/install/install_mac.rst
+++ b/docs/install/install_mac.rst
@@ -63,7 +63,7 @@ newtmgr:
 ==> Downloading from 
https://raw.githubusercontent.com/runtimeco/binary-releases/master/mynewt-newt-tools_1.4.1/mynewt-newtmgr-1.4.1.sierra.bottle.tar.gz
  
100.0%
 ==> Pouring mynewt-newtmgr-1.4.1.sierra.bottle.tar.gz
-🍺  /usr/local/Cellar/mynewt-newtmgr/1.4.1: 3 files, 17.3MB
+/usr/local/Cellar/mynewt-newtmgr/1.4.1: 3 files, 17.3MB
 
 **Notes:** Homebrew bottles for newtmgr 1.4.1 are available for Mac OS
 Sierra, El Captian. If you are running an earlier version of Mac OS, the
@@ -160,7 +160,7 @@ Install the latest unstable version of newtmgr from the 
master branch:
 ==> go get github.com/raff/goble
 ==> go get github.com/mgutz/logxi/v1
 ==> go install
-🍺  /usr/local/Cellar/mynewt-newtmgr/HEAD-2d5217f: 3 files, 17.3MB, built 
in 1 minute 10 seconds
+/usr/local/Cellar/mynewt-newtmgr/HEAD-2d5217f: 3 files, 17.3MB, built 
in 1 minute 10 seconds
 
 To switch back to the latest stable release version of newtmgr, you can
 run:
diff --git a/docs/install/install_windows.rst b/docs/install/install_windows.rst
index 549a309..018ce8e 100644
--- a/docs/install/install_windows.rst
+++ b/docs/install/install_windows.rst
@@ -55,8 +55,7 @@ tested on Windows 10 64 bit platform.
  
   tar -xzf /tmp/apache-mynewt-newtmgr-bin-windows-1.4.1.tgz -C /usr/bin
 
-4. Verify the installed version of newtmgr. See `Checking the Installed
-   Version <#check_newtmgr>`__.
+4. Verify the installed version of newtmgr. See :ref:`Checking the Installed 
Version`_.
 
 Installing the Latest Release of Newtmgr from Source
 



(mynewt-core) branch master updated: documentation/sphinx: Fix formatting errors in `.rst` files

2024-09-17 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
 new cb10a2fef documentation/sphinx: Fix formatting errors in `.rst` files
cb10a2fef is described below

commit cb10a2fef029178c4ba32eca6c2fe682db02bb54
Author: Wojciech Pietraszewski 
AuthorDate: Tue Sep 17 11:50:08 2024 +0200

documentation/sphinx: Fix formatting errors in `.rst` files

Fixes broken references to other documents/sections.
Moves remaining tutorials to the `mynewt-documentation` repository.
---
 docs/os/modules/baselibc.rst|   2 +-
 docs/os/modules/hal/hal_i2c/hal_i2c.rst |   3 +-
 docs/os/tutorials/STM32F303.rst | 186 
 docs/os/tutorials/pin-wheel-mods.rst| 106 --
 4 files changed, 2 insertions(+), 295 deletions(-)

diff --git a/docs/os/modules/baselibc.rst b/docs/os/modules/baselibc.rst
index 0f6ce1fbd..e165e163c 100644
--- a/docs/os/modules/baselibc.rst
+++ b/docs/os/modules/baselibc.rst
@@ -47,7 +47,7 @@ List of Functions
 
 Documentation for libc functions is available from multiple places. One
 example are the on-line manual pages at
-`https://www.freebsd.org/cgi/man.cgi <#https://www.freebsd.org/cgi/man.cgi>`__.
+`FreeBSD website <https://www.freebsd.org/cgi/man.cgi>`_.
 
 baselibc supports most libc functionality; malloc(), printf-family,
 string handling, and conversion routines.
diff --git a/docs/os/modules/hal/hal_i2c/hal_i2c.rst 
b/docs/os/modules/hal/hal_i2c/hal_i2c.rst
index d6c2e1b39..f9a1959e9 100644
--- a/docs/os/modules/hal/hal_i2c/hal_i2c.rst
+++ b/docs/os/modules/hal/hal_i2c/hal_i2c.rst
@@ -13,8 +13,7 @@ board and often peripherals devices located off the circuit 
board.
 I2C is often though of as a 2-wire protocol because it uses two wires
 (SDA, SCL) to send data between devices.
 
-For a detailed description of I2C, see the `I²C wikipedia
-page <https://en.wikipedia.org/wiki/I²C>`__
+For a detailed description of I²C, see the `wikipedia page 
<https://en.wikipedia.org/wiki/I2C>`_
 
 HAL\_I2C Theory Of Operation
 
diff --git a/docs/os/tutorials/STM32F303.rst b/docs/os/tutorials/STM32F303.rst
deleted file mode 100644
index 7ee46fac2..0
--- a/docs/os/tutorials/STM32F303.rst
+++ /dev/null
@@ -1,186 +0,0 @@
-Blinky, your "Hello World!", on STM32F303 Discovery

-
-Objective
-~
-
-Learn how to use packages from a default application repository of
-Mynewt to build your first *Hello World* application (Blinky) on a
-target board. Once built using the *newt* tool, this application will
-blink the LED lights on the target board.
-
-Create a project with a simple app that blinks an LED on the stmf303
-discovery board. In the process import some external libraries into your
-project. Download the application to the target and watch it blink!
-
-What you need
-~
-
--  Discovery kit with STM32F303VC MCU
--  Laptop running Mac OSX.
--  It is assumed you have already installed newt tool.
--  It is assumed you already installed native tools as described
-   `here <../get_started/native_tools.html>`__
-
-Also, we assume that you're familiar with UNIX shells. Let's gets
-started!
-
-Create a project
-
-
-Create a new project to hold your work. For a deeper understanding, you
-can read about project creation in `Get Started -- Creating Your First
-Project <../get_started/project_create.html>`__ or just follow the
-commands below.
-
-If you've already created a project from another tutorial, you can
-re-use that project.
-
-::
-
-$ mkdir ~/dev
-$ cd ~/dev
-$ newt new myproj
-Downloading project skeleton from apache/incubator-mynewt-blinky...
-Installing skeleton in myproj...
-Project myproj successfully created.
-
-$ cd myproj
-
-**Note:** Don't forget to change into the ``myproj`` directory.
-
-Install dependencies
-
-
-Now you can install this into the project using:
-
-::
-
-$ newt install -v 
-Downloading repository description for apache-mynewt-core... success!
-...
-apache-mynewt-core successfully installed version 0.7.9-none
-...
-Downloading repository description for mynewt_stm32f3... success!
-Downloading repository mynewt_stm32f3 
-...
-Resolving deltas: 100% (65/65), done.
-Checking connectivity... done.
-mynewt_stm32f3 successfully installed version 0.0.0-none
-
-Create targets
-~~
-
-Create two targets to build using the stmf3 board support package and
-the app blinky example from mynewt. The output of these commands are not
-shown here for brevity.
-
-The first target is the application image itself. The second target is
-the bootloader which allows y

(mynewt-documentation) branch master updated: documentation/sphinx: Prepare source and configuration files for PDF docs release

2024-09-17 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-documentation.git


The following commit(s) were added to refs/heads/master by this push:
 new 8ffe9da  documentation/sphinx: Prepare source and configuration files 
for PDF docs release
8ffe9da is described below

commit 8ffe9da4ec96e7a75c4512db967678d8d288995d
Author: Wojciech Pietraszewski 
AuthorDate: Tue Sep 17 15:00:09 2024 +0200

documentation/sphinx: Prepare source and configuration files for PDF docs 
release

Fixes broken references to other documents/sections/websites.
Moves misplaced tutorials from the `mynewt-core` repository.
Sets fixed width for some images that were too big for PDF output.
Removes incompatible emojis from code snippets.
Adjusts Sphinx config to:
 - ignore all `README` files,
 - add Mynewt logo on the first page.
---
 docs/_static/common.rst|   1 -
 docs/conf.py   |   3 +-
 docs/get_started/native_install/native_tools.rst   |   4 +-
 docs/get_started/serial_access.rst |   3 +
 docs/misc/go_env.rst   |   6 +-
 docs/mynewt_faq/syntax_faq.rst |   2 +-
 docs/mynewt_faq/troubleshoot_faq.rst   |   3 +-
 .../bleprph/bleprph-sections/bleprph-gap-event.rst |   3 +-
 .../bleprph/bleprph-sections/bleprph-svc-reg.rst   |   5 +-
 docs/tutorials/ble/bleprph/bleprph.rst |   2 +-
 docs/tutorials/ble/eddystone.rst   |   2 +-
 docs/tutorials/ble/ibeacon.rst |   2 +-
 docs/tutorials/blinky/arduino_zero.rst |  37 ++---
 docs/tutorials/blinky/blinky.rst   |   2 +
 docs/tutorials/blinky/blinky_STM32F303.rst | 183 +
 docs/tutorials/blinky/blinky_pin-wheel-mods.rst| 106 
 docs/tutorials/devmgmt/add_newtmgr.rst |   4 +-
 docs/tutorials/devmgmt/ota_upgrade_nrf52.rst   |   8 +-
 docs/tutorials/os_fundamentals/event_queue.rst |   2 +-
 docs/tutorials/os_fundamentals/tasks_lesson.rst|   2 +-
 docs/tutorials/other/unit_test.rst |   2 +-
 docs/tutorials/other/wi-fi_on_arduino.rst  |   4 +-
 docs/tutorials/sensors/air_quality_ble.rst |   3 +-
 docs/tutorials/sensors/nrf52_adc.rst   |  15 +-
 docs/tutorials/sensors/sensor_nrf52_bno055.rst |   4 +-
 docs/tutorials/sensors/sensor_nrf52_drv2605.rst|   4 +-
 docs/tutorials/slinky/project-slinky.rst   |   2 +-
 docs/tutorials/slinky/project-stm32-slinky.rst |   1 +
 28 files changed, 351 insertions(+), 64 deletions(-)

diff --git a/docs/_static/common.rst b/docs/_static/common.rst
deleted file mode 100644
index b4dd62c..000
--- a/docs/_static/common.rst
+++ /dev/null
@@ -1 +0,0 @@
-.. role:: red
diff --git a/docs/conf.py b/docs/conf.py
index 7440819..7229e5e 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -77,7 +77,7 @@ language = 'en'
 # List of patterns, relative to source directory, that match files and
 # directories to ignore when looking for source files.
 # This patterns also effect to html_static_path and html_extra_path
-exclude_patterns = ['_build', 'README.rst', 'Thumbs.db', '.DS_Store', 'themes']
+exclude_patterns = ['_build', '**README.rst', 'Thumbs.db', '.DS_Store', 
'themes']
 
 # The name of the Pygments (syntax highlighting) style to use.
 pygments_style = 'sphinx'
@@ -147,6 +147,7 @@ latex_documents = [
  u'The Apache Software Foundation', 'manual'),
 ]
 
+latex_logo = '_static/img/logo.png'
 
 # -- Options for manual page output ---
 
diff --git a/docs/get_started/native_install/native_tools.rst 
b/docs/get_started/native_install/native_tools.rst
index 0682722..ba9027d 100644
--- a/docs/get_started/native_install/native_tools.rst
+++ b/docs/get_started/native_install/native_tools.rst
@@ -33,7 +33,7 @@ install the other compiler. However, one can install gcc 
compiler with brew:
 ...
 ...
 ==> Pouring gcc-10.2.0_2.big_sur.bottle.tar.gz
-🍺  /usr/local/Cellar/gcc/10.2.0_2: 1,455 files, 338.1MB
+/usr/local/Cellar/gcc/10.2.0_2: 1,455 files, 338.1MB
 
 
 Check the GCC version you have installed (either using ``brew`` or
@@ -68,7 +68,7 @@ Installing GDB
 ...
 ...
 ==> Summary
-🍺  /usr/local/Cellar/gdb/7.10.1: XXX files,YYM
+/usr/local/Cellar/gdb/7.10.1: XXX files,YYM
 
 **NOTE:** When running a program with GDB, you may need to sign your ``gdb``
 executable. `This
diff --git a/docs/get_started/serial_access.rst 
b/docs/get_started/serial_access.rst
index 63c7f51..4cbc6da 100644
--- a/docs/get_started/serial_access.rst
+++ b/docs/get_started/serial_access

(mynewt-nimble) branch master updated: documentation/sphinx: Fix formatting errors in `.rst` files

2024-09-17 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
 new 67f7e979f documentation/sphinx: Fix formatting errors in `.rst` files
67f7e979f is described below

commit 67f7e979f09fc72e4a5cf2c307af694594ecfefd
Author: Wojciech Pietraszewski 
AuthorDate: Tue Sep 17 11:21:03 2024 +0200

documentation/sphinx: Fix formatting errors in `.rst` files

Fixes broken references to other documents/sections.
Adds `Host Identity` to the API reference.
---
 docs/README.rst  | 6 +++---
 docs/ble_hs/ble_hs_id.rst| 7 +++
 docs/ble_setup/ble_addr.rst  | 6 +++---
 docs/btshell/btshell_GAP.rst | 2 +-
 4 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/docs/README.rst b/docs/README.rst
index ef2871c63..a05534a57 100644
--- a/docs/README.rst
+++ b/docs/README.rst
@@ -1,5 +1,5 @@
 NimBLE Bluetooth Stack Documentation
-#
+
 
 This folder holds the documentation for the NimBLE Bluetooth stack from the
 `Apache Mynewt`_ project. It is  built using `Sphinx`_.
@@ -19,8 +19,8 @@ Previewing Changes
 ==
 
 In order to preview any changes you make you must first install a Sphinx
-toolchain as described at https://github.com/apache/mynewt-documentation#id3.
- Then:
+toolchain as described at https://github.com/apache/mynewt-documentation.
+Then:
 
 .. code-block:: bash
 
diff --git a/docs/ble_hs/ble_hs_id.rst b/docs/ble_hs/ble_hs_id.rst
index dbb47c941..6e257e10a 100644
--- a/docs/ble_hs/ble_hs_id.rst
+++ b/docs/ble_hs/ble_hs_id.rst
@@ -43,3 +43,10 @@ Header
 .. code-block:: cpp
 
 #include "host/ble_hs.h"
+
+API
+~~~
+
+.. doxygengroup:: bt_host_id
+   :content-only:
+   :members:
diff --git a/docs/ble_setup/ble_addr.rst b/docs/ble_setup/ble_addr.rst
index 0a67a5f77..bfd49923b 100644
--- a/docs/ble_setup/ble_addr.rst
+++ b/docs/ble_setup/ble_addr.rst
@@ -52,12 +52,12 @@ Method 3: Configure a random address at runtime
 Random addresses get configured through the NimBLE host. The following
 two functions are used in random address configuration:
 
--  :doc:`ble_hs_id_gen_rnd <../ble_hs/ble_hs_id/functions/ble_hs_id_gen_rnd>`:
+-  :c:func:`ble_hs_id_gen_rnd`:
Generates a new random address.
--  :doc:`ble_hs_id_set_rnd <../ble_hs/ble_hs_id/functions/ble_hs_id_set_rnd>`:
+-  :c:func:`ble_hs_id_set_rnd`:
Sets the device's random address.
 
-For an example of how this is done, see the 
:doc:`<../../../os/tutorials/ibeacon>`.
+For an example of how this is done, see the 
:doc:`../../../tutorials/ble/ibeacon`.
 
 *Note:* A NimBLE device can be configured with multiple addresses; at
 most one of each address type.
diff --git a/docs/btshell/btshell_GAP.rst b/docs/btshell/btshell_GAP.rst
index 738d146c5..2d52a16e1 100644
--- a/docs/btshell/btshell_GAP.rst
+++ b/docs/btshell/btshell_GAP.rst
@@ -411,7 +411,7 @@ Advertising with Extended Advertising enabled
 
+--+--++-+
 |  | scan\_req\_notif | [``0``-1]  
| Enable SCAN\_REQ notifications
  |
 
+--+--++-+
-| **advertise-set-addr**   |  |
| Configure *random* address for instance   
   |
+| **advertise-set-addr**   |  |
| Configure *random* address for instance   
  |
 
+--+--++-+
 |  | instance | [``0``-UINT8\_MAX] 
| Advertising instance  
  |
 
+--+--++-+



(mynewt-core) 01/02: Add note-c from blues wirless

2024-09-09 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 286c630795dd6441154362ec36bef9e9a64a93d7
Author: ujjval rathod 
AuthorDate: Tue Sep 3 17:36:40 2024 +0530

Add note-c from blues wirless
---
 net/cellular/blues/pkg.yml | 42 ++
 1 file changed, 42 insertions(+)

diff --git a/net/cellular/blues/pkg.yml b/net/cellular/blues/pkg.yml
new file mode 100644
index 0..ae3ec9ada
--- /dev/null
+++ b/net/cellular/blues/pkg.yml
@@ -0,0 +1,42 @@
+#
+# 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.
+#
+
+pkg.name: net/cellular/blues
+pkg.description: Blues Wireless Note-c API port
+pkg.author: "Apache Mynewt "
+pkg.homepage: "http://mynewt.apache.org/";
+pkg.type: sdk
+pkg.keywords:
+
+repository.blues-note-c:
+type: github
+vers: v2.2.1-commit
+branch: master
+user: blues
+repo: note-c
+
+
+pkg.include_dirs:
+- "@blues-note-c/."
+
+pkg.source_dirs:
+- "@blues-note-c/."
+
+pkg.ign_dirs:
+- "test"



(mynewt-core) 02/02: Add Blues example app

2024-09-09 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 506501763710dbbfd599604214dbbba3c0ec6986
Author: ujjval rathod 
AuthorDate: Tue Sep 3 17:37:50 2024 +0530

Add Blues example app
---
 apps/blues-wireless/pkg.yml|  36 +
 apps/blues-wireless/src/main.c | 125 +
 apps/blues-wireless/src/note_c_hooks.c | 140 +
 apps/blues-wireless/src/note_c_hooks.h |  38 +
 4 files changed, 339 insertions(+)

diff --git a/apps/blues-wireless/pkg.yml b/apps/blues-wireless/pkg.yml
new file mode 100644
index 0..0e681f3ae
--- /dev/null
+++ b/apps/blues-wireless/pkg.yml
@@ -0,0 +1,36 @@
+#
+# 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.
+#
+
+pkg.name: apps/blues-wireless
+pkg.type: app
+pkg.description: Basic example application for Blues Wireless notecard.
+pkg.author: "Apache Mynewt "
+pkg.homepage: "http://mynewt.apache.org/";
+pkg.keywords:
+
+pkg.deps:
+- "@apache-mynewt-core/kernel/os"
+- "@apache-mynewt-core/hw/hal"
+- "@apache-mynewt-core/sys/console/full"
+- "@apache-mynewt-core/sys/log/stub"
+- "@apache-mynewt-core/sys/shell"
+- "@apache-mynewt-core/sys/sysinit"
+- "@apache-mynewt-core/net/cellular/blues"
+
+
diff --git a/apps/blues-wireless/src/main.c b/apps/blues-wireless/src/main.c
new file mode 100755
index 0..ff3612499
--- /dev/null
+++ b/apps/blues-wireless/src/main.c
@@ -0,0 +1,125 @@
+/**
+ * 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.
+ */
+
+
+#include 
+#include 
+
+#include "sysinit/sysinit.h"
+#include "os/os.h"
+#include "bsp/bsp.h"
+#include "hal/hal_gpio.h"
+#include "hal/hal_i2c.h"
+#include "hal/hal_uart.h"
+#include 
+
+#include 
+#include "note_c_hooks.h"
+
+/*Product UUID from notehub*/
+
+#define PRODUCT_UID "UID"
+
+float lat, lon;
+
+/* For LED toggling */
+int g_led_pin;
+
+static void
+init_notecard(void)
+{
+NoteSetFnDefault(malloc, free, platform_delay, platform_millis);
+NoteSetFnDebugOutput(note_log_print);
+NoteSetFnI2C(NOTE_I2C_ADDR_DEFAULT, NOTE_I2C_MAX_DEFAULT, note_i2c_reset, 
note_i2c_transmit, note_i2c_receive);
+
+J *req = NoteNewRequest("hub.set");
+JAddStringToObject(req, "product", PRODUCT_UID);
+JAddStringToObject(req, "mode", "periodic");
+JAddBoolToObject(req, "sync", true);
+
+NoteRequestWithRetry(req, 5);
+
+J *req2 = NoteNewRequest("card.version");
+
+NoteRequestWithRetry(req2, 5);
+
+J *req3 = NoteNewRequest("card.location.mode");
+JAddStringToObject(req3, "mode","continuous");
+
+NoteRequestWithRetry(req3, 5);
+}
+
+static void
+update_location(void)
+{
+J *location = NoteRequestResponse(NoteNewRequest("card.location"));
+
+if (location != NULL) {
+lat = JGetNumber(location, "lat");
+lon = JGetNumber(location, "lon");
+}
+J *req = NoteNewRequest("note.add");
+JAddStringToObject(req, "file", "location.qo");
+JAddBoolToObject(req, "sync", true);
+
+J *

(mynewt-core) branch master updated: uncrustify: Update configuration

2024-09-09 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
 new 84f4b967d uncrustify: Update configuration
84f4b967d is described below

commit 84f4b967d8e5b54f489777807ce27e936850c38a
Author: Wojciech Pietraszewski 
AuthorDate: Fri Sep 6 16:20:14 2024 +0200

uncrustify: Update configuration

Changes Uncrustify configuration to align with the guidelines outlined in 
`CODING_STANDARDS.md`
---
 uncrustify.cfg | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/uncrustify.cfg b/uncrustify.cfg
index 2bdd2ac53..9bacd3c13 100644
--- a/uncrustify.cfg
+++ b/uncrustify.cfg
@@ -293,7 +293,7 @@ indent_cpp_lambda_body  = false# false/true
 
 # Add or remove space around arithmetic operator '+', '-', '/', '*', etc
 # also '>>>' '<<' '>>' '%' '|'
-sp_arith= ignore   # ignore/add/remove/force
+sp_arith= force   # ignore/add/remove/force
 
 # Add or remove space around assignment operator '=', '+=', etc
 sp_assign   = force# ignore/add/remove/force
@@ -486,7 +486,7 @@ sp_before_squares   = ignore   # 
ignore/add/remove/force
 sp_inside_square= ignore   # ignore/add/remove/force
 
 # Add or remove space after ','
-sp_after_comma  = ignore   # ignore/add/remove/force
+sp_after_comma  = force   # ignore/add/remove/force
 
 # Add or remove space before ','. Default=Remove
 sp_before_comma = remove   # ignore/add/remove/force
@@ -1072,10 +1072,10 @@ nl_start_of_file= remove   # 
ignore/add/remove/force
 nl_start_of_file_min= 0# number
 
 # Add or remove newline at the end of the file
-nl_end_of_file  = ignore   # ignore/add/remove/force
+nl_end_of_file  = force   # ignore/add/remove/force
 
 # The number of newlines at the end of the file (only used if nl_end_of_file 
is 'add' or 'force')
-nl_end_of_file_min  = 0# number
+nl_end_of_file_min  = 1# number
 
 # Add or remove newline between '=' and '{'
 nl_assign_brace = remove   # ignore/add/remove/force
@@ -1616,10 +1616,10 @@ nl_between_get_set  = 0# number
 nl_property_brace   = ignore   # ignore/add/remove/force
 
 # Whether to remove blank lines after '{'
-eat_blanks_after_open_brace = false# false/true
+eat_blanks_after_open_brace = true# false/true
 
 # Whether to remove blank lines before '}'
-eat_blanks_before_close_brace   = false# false/true
+eat_blanks_before_close_brace   = true# false/true
 
 # How aggressively to remove extra newlines not in preproc.
 # 0: No change
@@ -1889,7 +1889,7 @@ pp_define_at_level  = false# false/true
 
 # True:  indent_func_call_param will be used (default)
 # False: indent_func_call_param will NOT be used
-use_indent_func_call_param  = false# false/true
+use_indent_func_call_param  = true# false/true
 
 # The value of the indentation for a continuation line is calculate 
differently if the line is:
 #   a declaration :your case with QString fileName ...



(mynewt-nimble) branch master updated: nimble/host: Add support for ext adv param v2 HCI command

2024-09-09 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
 new 7af0b740a nimble/host: Add support for ext adv param v2 HCI command
7af0b740a is described below

commit 7af0b740abda96635939bb25a6f07d0b162674ea
Author: Rahul Tank 
AuthorDate: Wed Aug 14 15:05:37 2024 +0530

nimble/host: Add support for ext adv param v2 HCI command
---
 nimble/host/include/host/ble_gap.h |   6 ++
 nimble/host/src/ble_gap.c  | 152 +++--
 nimble/host/src/ble_hs_hci_priv.h  |   2 +-
 nimble/host/src/ble_hs_startup.c   |   5 +-
 nimble/include/nimble/hci_common.h |   8 ++
 5 files changed, 131 insertions(+), 42 deletions(-)

diff --git a/nimble/host/include/host/ble_gap.h 
b/nimble/host/include/host/ble_gap.h
index e842ae29a..33c56d76d 100644
--- a/nimble/host/include/host/ble_gap.h
+++ b/nimble/host/include/host/ble_gap.h
@@ -1582,6 +1582,12 @@ struct ble_gap_ext_adv_params {
 
 /** Advertising Set ID */
 uint8_t sid;
+
+/** Primary phy options */
+uint8_t pri_phy_opt;
+
+/** Secondary phy options */
+uint8_t sec_phy_opt;
 };
 
 /**
diff --git a/nimble/host/src/ble_gap.c b/nimble/host/src/ble_gap.c
index 38da71200..e0ddb8859 100644
--- a/nimble/host/src/ble_gap.c
+++ b/nimble/host/src/ble_gap.c
@@ -3124,45 +3124,38 @@ ble_gap_adv_active(void)
 
 #if MYNEWT_VAL(BLE_EXT_ADV)
 static int
-ble_gap_ext_adv_params_tx(uint8_t instance,
-  const struct ble_gap_ext_adv_params *params,
-  int8_t *selected_tx_power)
-
+ble_gap_set_ext_adv_params(struct ble_hci_le_set_ext_adv_params_cp *cmd,
+   uint8_t instance, const struct 
ble_gap_ext_adv_params *params,
+   int8_t *selected_tx_power)
 {
-struct ble_hci_le_set_ext_adv_params_cp cmd;
-struct ble_hci_le_set_ext_adv_params_rp rsp;
-int rc;
-
-memset(&cmd, 0, sizeof(cmd));
-
-cmd.adv_handle = instance;
+cmd->adv_handle = instance;
 
 if (params->connectable) {
-cmd.props |= BLE_HCI_LE_SET_EXT_ADV_PROP_CONNECTABLE;
+cmd->props |= BLE_HCI_LE_SET_EXT_ADV_PROP_CONNECTABLE;
 }
 if (params->scannable) {
-cmd.props |= BLE_HCI_LE_SET_EXT_ADV_PROP_SCANNABLE;
+cmd->props |= BLE_HCI_LE_SET_EXT_ADV_PROP_SCANNABLE;
 }
 if (params->directed) {
-cmd.props |= BLE_HCI_LE_SET_EXT_ADV_PROP_DIRECTED;
-cmd.peer_addr_type = params->peer.type;
-memcpy(cmd.peer_addr, params->peer.val, BLE_DEV_ADDR_LEN);
+cmd->props |= BLE_HCI_LE_SET_EXT_ADV_PROP_DIRECTED;
+cmd->peer_addr_type = params->peer.type;
+memcpy(cmd->peer_addr, params->peer.val, BLE_DEV_ADDR_LEN);
 }
 if (params->high_duty_directed) {
-cmd.props |= BLE_HCI_LE_SET_EXT_ADV_PROP_HD_DIRECTED;
+cmd->props |= BLE_HCI_LE_SET_EXT_ADV_PROP_HD_DIRECTED;
 }
 if (params->anonymous) {
-cmd.props |= BLE_HCI_LE_SET_EXT_ADV_PROP_ANON_ADV;
+cmd->props |= BLE_HCI_LE_SET_EXT_ADV_PROP_ANON_ADV;
 }
 if (params->include_tx_power) {
-cmd.props |= BLE_HCI_LE_SET_EXT_ADV_PROP_INC_TX_PWR;
+cmd->props |= BLE_HCI_LE_SET_EXT_ADV_PROP_INC_TX_PWR;
 }
 if (params->legacy_pdu) {
-cmd.props |= BLE_HCI_LE_SET_EXT_ADV_PROP_LEGACY;
+cmd->props |= BLE_HCI_LE_SET_EXT_ADV_PROP_LEGACY;
 
 /* check right away if the applied configuration is valid before 
handing
  * the command to the controller to improve error reporting */
-switch (cmd.props) {
+switch (cmd->props) {
 case BLE_HCI_LE_SET_EXT_ADV_PROP_LEGACY_IND:
 case BLE_HCI_LE_SET_EXT_ADV_PROP_LEGACY_LD_DIR:
 case BLE_HCI_LE_SET_EXT_ADV_PROP_LEGACY_HD_DIR:
@@ -3177,38 +3170,58 @@ ble_gap_ext_adv_params_tx(uint8_t instance,
 /* Fill optional fields if application did not specify them. */
 if (params->itvl_min == 0 && params->itvl_max == 0) {
 /* TODO for now limited to legacy values*/
-put_le24(cmd.pri_itvl_min, BLE_GAP_ADV_FAST_INTERVAL1_MIN);
-put_le24(cmd.pri_itvl_max, BLE_GAP_ADV_FAST_INTERVAL2_MAX);
+put_le24(cmd->pri_itvl_min, BLE_GAP_ADV_FAST_INTERVAL1_MIN);
+put_le24(cmd->pri_itvl_max, BLE_GAP_ADV_FAST_INTERVAL2_MAX);
 } else {
-put_le24(cmd.pri_itvl_min, params->itvl_min);
-put_le24(cmd.pri_itvl_max, params->itvl_max);
+put_le24(cmd->pri_itvl_min, params->itvl_min);
+put_le24(cmd->pri_itvl_max, params->itvl_max);
 }
 
 if (params->channel_map == 0) {
-cmd.pri_chan_map = BLE_GAP_ADV_DFLT_CHANNEL_MAP;
+cmd->pri_chan_map = BLE_GAP_ADV_DFLT_CHANNEL_MAP;
 } else {
-cmd.

(mynewt-nimble) branch master updated: porting/npl/linux: Handle EINTR from sem_timedwait

2024-09-06 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
 new 42e5a2816 porting/npl/linux: Handle EINTR from sem_timedwait
42e5a2816 is described below

commit 42e5a2816d0d3df397f69b63bf7420542e4cd7c2
Author: Deomid rojer Ryabkov 
AuthorDate: Mon Sep 2 22:42:41 2024 +0300

porting/npl/linux: Handle EINTR from sem_timedwait

It's been observed that `sem_timedwait()` can return `EINTR` even if 
`sigaction()` specified `SA_RESTART`.

Not sure what the deal with that is but handling it is simple enough.
---
 porting/npl/linux/src/os_sem.c | 11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/porting/npl/linux/src/os_sem.c b/porting/npl/linux/src/os_sem.c
index e3434af5a..be43c6499 100644
--- a/porting/npl/linux/src/os_sem.c
+++ b/porting/npl/linux/src/os_sem.c
@@ -71,9 +71,14 @@ ble_npl_sem_pend(struct ble_npl_sem *sem, uint32_t timeout)
 wait.tv_sec  += timeout / 1000;
 wait.tv_nsec += (timeout % 1000) * 100;
 
-err = sem_timedwait(&sem->lock, &wait);
-if (err && errno == ETIMEDOUT) {
-return BLE_NPL_TIMEOUT;
+while ((err = sem_timedwait(&sem->lock, &wait)) != 0) {
+switch (errno) {
+case EINTR:
+continue;
+case ETIMEDOUT:
+return BLE_NPL_TIMEOUT;
+}
+break;
 }
 }
 



(mynewt-core) branch master updated: ci: Fix style check

2024-09-05 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
 new 5862b407d ci: Fix style check
5862b407d is described below

commit 5862b407d941fd5e2dd00ff85c059922d4275c77
Author: Wojciech Pietraszewski 
AuthorDate: Thu Sep 5 15:04:13 2024 +0200

ci: Fix style check

Resets temporary file pointer to the beginning of a file
after writing the data.
In some cases it caused `uncrustify` to return empty list
instead of corrected output, because it had not any input to process.
---
 .github/check_style.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/check_style.py b/.github/check_style.py
index de5112cd0..c411fb218 100755
--- a/.github/check_style.py
+++ b/.github/check_style.py
@@ -59,7 +59,7 @@ def check_file(fname: str, commit: str, upstream: str) -> 
list[str]:
 lines = subprocess.check_output(f"git show {commit}:{fname}",
 shell=True)
 tmpf.write(lines)
-
+tmpf.seek(0)
 in_chunk = False
 
 for s in run_cmd(f"uncrustify -q -c uncrustify.cfg -f {tmpf.name} | "



(mynewt-nimble) 02/03: host: test: fix SM test case

2024-09-02 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git

commit 2ed13eb7f4de575c70357a855784db109e16b296
Author: Piotr Narajowski 
AuthorDate: Thu Aug 8 09:50:37 2024 +0200

host: test: fix SM test case

This test case should check if security request from peer sent after
pairing request was ignored.
---
 nimble/host/test/src/ble_sm_test.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/nimble/host/test/src/ble_sm_test.c 
b/nimble/host/test/src/ble_sm_test.c
index 2ba1678d7..7a2994be7 100644
--- a/nimble/host/test/src/ble_sm_test.c
+++ b/nimble/host/test/src/ble_sm_test.c
@@ -415,13 +415,14 @@ TEST_CASE_SELF(ble_sm_test_case_peer_sec_req_inval)
 fail.reason = BLE_SM_ERR_CMD_NOT_SUPP;
 ble_sm_test_util_verify_tx_pair_fail(&fail);
 
-/*** Pairing already in progress; ignore security request. */
+/*** Pairing already in progress; ignore security request before pairing
+ * response was received. */
 ble_hs_atomic_conn_set_flags(2, BLE_HS_CONN_F_MASTER, 1);
 rc = ble_sm_pair_initiate(2);
 TEST_ASSERT_FATAL(rc == 0);
 ble_hs_test_util_prev_tx_queue_clear();
 
-ble_sm_test_util_rx_sec_req(2, &sec_req, BLE_HS_EALREADY);
+ble_sm_test_util_rx_sec_req(2, &sec_req, 0);
 TEST_ASSERT(ble_hs_test_util_prev_tx_queue_sz() == 0);
 
 ble_hs_test_util_assert_mbufs_freed(NULL);



(mynewt-nimble) branch master updated (05cef9b1f -> baf2930d3)

2024-09-02 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


from 05cef9b1f apps/auracast: Make the code compile on native target
 new 22d5e0e04 host: sm: ignore security request
 new 2ed13eb7f host: test: fix SM test case
 new baf2930d3 host: tests: add SM test case

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:
 nimble/host/src/ble_sm.c|  8 
 nimble/host/test/src/ble_sm_test.c  | 36 +++--
 nimble/host/test/src/ble_sm_test_util.c |  2 +-
 nimble/host/test/src/ble_sm_test_util.h |  3 +++
 4 files changed, 46 insertions(+), 3 deletions(-)



(mynewt-nimble) 01/03: host: sm: ignore security request

2024-09-02 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git

commit 22d5e0e042cacce4e6bd7f4a1463637c307bed96
Author: Piotr Narajowski 
AuthorDate: Thu Aug 1 16:47:03 2024 +0200

host: sm: ignore security request

We should ignore second security request pairing has already started
---
 nimble/host/src/ble_sm.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/nimble/host/src/ble_sm.c b/nimble/host/src/ble_sm.c
index bb1dfe084..eed5e3638 100644
--- a/nimble/host/src/ble_sm.c
+++ b/nimble/host/src/ble_sm.c
@@ -2007,6 +2007,14 @@ ble_sm_sec_req_rx(uint16_t conn_handle, struct os_mbuf 
**om,
 ble_hs_lock();
 
 conn = ble_hs_conn_find_assert(conn_handle);
+
+/* Check if pairing procedure is already in progress */
+if (ble_sm_proc_find(conn_handle, BLE_SM_PROC_STATE_PAIR, 1, NULL)) {
+ble_hs_unlock();
+res->app_status = 0;
+return;
+}
+
 if (!(conn->bhc_flags & BLE_HS_CONN_F_MASTER)) {
 res->app_status = BLE_HS_SM_US_ERR(BLE_SM_ERR_CMD_NOT_SUPP);
 res->sm_err = BLE_SM_ERR_CMD_NOT_SUPP;



(mynewt-nimble) 03/03: host: tests: add SM test case

2024-09-02 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git

commit baf2930d32c21222b77086181d842301bff9721f
Author: Piotr Narajowski 
AuthorDate: Fri Aug 23 16:11:31 2024 +0200

host: tests: add SM test case

This covers the case where security request sent from peer should be 
rejected
after pairing response was received.
Move ble_sm_test_util_rx_pair_rsp() declaration.
---
 nimble/host/test/src/ble_sm_test.c  | 31 +++
 nimble/host/test/src/ble_sm_test_util.c |  2 +-
 nimble/host/test/src/ble_sm_test_util.h |  3 +++
 3 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/nimble/host/test/src/ble_sm_test.c 
b/nimble/host/test/src/ble_sm_test.c
index 7a2994be7..dcdbaf01e 100644
--- a/nimble/host/test/src/ble_sm_test.c
+++ b/nimble/host/test/src/ble_sm_test.c
@@ -428,6 +428,36 @@ TEST_CASE_SELF(ble_sm_test_case_peer_sec_req_inval)
 ble_hs_test_util_assert_mbufs_freed(NULL);
 }
 
+TEST_CASE_SELF(ble_sm_test_case_peer_sec_req_reject)
+{
+struct ble_sm_sec_req sec_req;
+int rc;
+
+struct ble_sm_pair_cmd pair_rsp = {0x04, 0, 0x0D, 10, 0x02, 0x02};
+
+ble_sm_test_util_init();
+
+ble_sm_dbg_set_next_pair_rand(((uint8_t[16]) {0}));
+
+ble_hs_test_util_create_conn(2, ((uint8_t[6]) {1,2,3,5,6,7}),
+ ble_sm_test_util_conn_cb,
+ NULL);
+
+/*** Pairing already in progress; reject security request after pairing
+ * response was received. */
+
+ble_hs_atomic_conn_set_flags(2, BLE_HS_CONN_F_MASTER, 1);
+rc = ble_sm_pair_initiate(2);
+TEST_ASSERT_FATAL(rc == 0);
+ble_hs_test_util_prev_tx_queue_clear();
+
+ble_sm_test_util_rx_pair_rsp(2, &pair_rsp, 0);
+ble_sm_test_util_rx_sec_req(2, &sec_req, BLE_HS_EALREADY);
+TEST_ASSERT(ble_hs_test_util_prev_tx_queue_sz() != 0);
+
+ble_hs_test_util_assert_mbufs_freed(NULL);
+}
+
 /*
  * $us   *
  */
@@ -509,5 +539,6 @@ TEST_SUITE(ble_sm_gen_test_suite)
 ble_sm_test_case_peer_bonding_bad();
 ble_sm_test_case_conn_broken();
 ble_sm_test_case_peer_sec_req_inval();
+ble_sm_test_case_peer_sec_req_reject();
 }
 #endif
diff --git a/nimble/host/test/src/ble_sm_test_util.c 
b/nimble/host/test/src/ble_sm_test_util.c
index e3becdf86..74d40e8b5 100644
--- a/nimble/host/test/src/ble_sm_test_util.c
+++ b/nimble/host/test/src/ble_sm_test_util.c
@@ -717,7 +717,7 @@ ble_sm_test_util_rx_pair_req(uint16_t conn_handle,
  req, rx_status);
 }
 
-static void
+void
 ble_sm_test_util_rx_pair_rsp(uint16_t conn_handle, struct ble_sm_pair_cmd *rsp,
  int rx_status)
 {
diff --git a/nimble/host/test/src/ble_sm_test_util.h 
b/nimble/host/test/src/ble_sm_test_util.h
index d9aa3805c..3ddc86c1f 100644
--- a/nimble/host/test/src/ble_sm_test_util.h
+++ b/nimble/host/test/src/ble_sm_test_util.h
@@ -96,6 +96,9 @@ void ble_sm_test_util_io_check_post(
 void ble_sm_test_util_rx_sec_req(uint16_t conn_handle,
  struct ble_sm_sec_req *cmd,
  int exp_status);
+void ble_sm_test_util_rx_pair_rsp(uint16_t conn_handle,
+  struct ble_sm_pair_cmd *rsp,
+  int rx_status);
 void ble_sm_test_util_verify_tx_pair_fail(struct ble_sm_pair_fail *exp_cmd);
 void ble_sm_test_util_us_lgcy_good(struct ble_sm_test_params *params);
 void ble_sm_test_util_peer_fail_inval(int we_are_master,



(mynewt-nimble) branch master updated: apps/auracast: Make the code compile on native target

2024-09-02 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
 new 05cef9b1f apps/auracast: Make the code compile on native target
05cef9b1f is described below

commit 05cef9b1fa166828666da9fafc3d32d41f6a18ee
Author: Mariusz Skamra 
AuthorDate: Fri Apr 26 15:25:23 2024 +0200

apps/auracast: Make the code compile on native target

This fixes auracast native build by disabling GPIO button functionality.
---
 apps/auracast/src/main.c | 15 +--
 apps/auracast/syscfg.yml |  5 +
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/apps/auracast/src/main.c b/apps/auracast/src/main.c
index 977d643cd..ec4c86700 100644
--- a/apps/auracast/src/main.c
+++ b/apps/auracast/src/main.c
@@ -60,12 +60,12 @@ static uint16_t 
bis_handles[MYNEWT_VAL(BROADCASTER_CHAN_NUM)];
 static struct os_callout audio_broadcast_callout;
 
 static int audio_data_offset;
+static uint8_t auracast_adv_instance;
+
+#if MYNEWT_VAL(BROADCASTER_STOP_BUTTON) >= 0
 static struct os_task auracast_interrupt_task_str;
 static struct os_eventq auracast_interrupt_eventq;
 static os_stack_t 
auracast_interrupt_task_stack[BROADCASTER_INTERRUPT_TASK_STACK_SZ];
-
-static uint8_t auracast_adv_instance;
-
 static void
 auracast_interrupt_task(void *arg)
 {
@@ -90,6 +90,7 @@ auracast_gpio_irq(void *arg)
 {
 os_eventq_put(&auracast_interrupt_eventq, &broadcast_stop_ev);
 }
+#endif /* MYNEWT_VAL(BROADCASTER_STOP_BUTTON) >= 0 */
 
 static void
 audio_broadcast_event_cb(struct os_event *ev)
@@ -373,6 +374,7 @@ mynewt_main(int argc, char **argv)
 /* Set sync callback */
 ble_hs_cfg.sync_cb = on_sync;
 
+#if MYNEWT_VAL(BROADCASTER_STOP_BUTTON) >= 0
 os_eventq_init(&auracast_interrupt_eventq);
 os_task_init(&auracast_interrupt_task_str, "auracast_interrupt_task",
  auracast_interrupt_task, NULL,
@@ -380,9 +382,10 @@ mynewt_main(int argc, char **argv)
  auracast_interrupt_task_stack,
  BROADCASTER_INTERRUPT_TASK_STACK_SZ);
 
-hal_gpio_irq_init(BUTTON_3, auracast_gpio_irq, NULL,
-  HAL_GPIO_TRIG_RISING, HAL_GPIO_PULL_UP);
-hal_gpio_irq_enable(BUTTON_3);
+hal_gpio_irq_init(MYNEWT_VAL(BROADCASTER_STOP_BUTTON), auracast_gpio_irq,
+  NULL, HAL_GPIO_TRIG_RISING, HAL_GPIO_PULL_UP);
+hal_gpio_irq_enable(MYNEWT_VAL(BROADCASTER_STOP_BUTTON));
+#endif /* MYNEWT_VAL(BROADCASTER_STOP_BUTTON) >= 0 */
 
 /* As the last thing, process events from default event queue */
 while (1) {
diff --git a/apps/auracast/syscfg.yml b/apps/auracast/syscfg.yml
index f22b92d0b..dc1b1a5b1 100644
--- a/apps/auracast/syscfg.yml
+++ b/apps/auracast/syscfg.yml
@@ -18,6 +18,11 @@
 syscfg.defs:
 BROADCASTER_CHAN_NUM: 2
 BROADCASTER_BROADCAST_NAME: '"NimBLE Auracast"'
+BROADCASTER_STOP_BUTTON:
+description: >
+Button number for Broadcast Stop action.
+Negative value if disabled.
+value: BUTTON_3
 
 syscfg.vals:
 CONSOLE_IMPLEMENTATION: full



(mynewt-nimble) branch master updated: nimble/audio/bass: Add data length check in BASS remote scan

2024-09-02 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
 new 6f5b33ca0 nimble/audio/bass: Add data length check in BASS remote scan
6f5b33ca0 is described below

commit 6f5b33ca0c33fd2c1421ffde61e096cff54c112e
Author: Szymon Czapracki 
AuthorDate: Thu Aug 8 15:39:06 2024 +0200

nimble/audio/bass: Add data length check in BASS remote scan

This commit adds data length checks to remote scan operations.
Now any data coming with remote scan start/stop will result
in instant ATT error.
---
 nimble/host/audio/services/bass/src/ble_audio_svc_bass.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/nimble/host/audio/services/bass/src/ble_audio_svc_bass.c 
b/nimble/host/audio/services/bass/src/ble_audio_svc_bass.c
index 87e4da211..dfad886bb 100644
--- a/nimble/host/audio/services/bass/src/ble_audio_svc_bass.c
+++ b/nimble/host/audio/services/bass/src/ble_audio_svc_bass.c
@@ -251,6 +251,10 @@ ble_svc_audio_bass_receive_state_free(struct 
ble_svc_audio_bass_rcv_state_entry
 static int
 ble_svc_audio_bass_remote_scan_stopped(uint8_t *data, uint16_t data_len, 
uint16_t conn_handle)
 {
+if (data_len > 1) {
+return BLE_ATT_ERR_WRITE_REQ_REJECTED;
+}
+
 struct ble_audio_event ev = {
 .type = BLE_AUDIO_EVENT_BASS_REMOTE_SCAN_STOPPED
 };
@@ -264,6 +268,10 @@ ble_svc_audio_bass_remote_scan_stopped(uint8_t *data, 
uint16_t data_len, uint16_
 static int
 ble_svc_audio_bass_remote_scan_started(uint8_t *data, uint16_t data_len, 
uint16_t conn_handle)
 {
+if (data_len > 1) {
+return BLE_ATT_ERR_WRITE_REQ_REJECTED;
+}
+
 struct ble_audio_event ev = {
 .type = BLE_AUDIO_EVENT_BASS_REMOTE_SCAN_STARTED
 };



(mynewt-nimble) branch master updated: nimble/audio/bass: Modify remove source operation

2024-09-02 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
 new dff71a288 nimble/audio/bass: Modify remove source operation
dff71a288 is described below

commit dff71a2888e4e46fef60c3e0c72cd95acdf4f7dd
Author: Szymon Czapracki 
AuthorDate: Fri Aug 9 11:53:29 2024 +0200

nimble/audio/bass: Modify remove source operation

Fix event type in ble_audio_event structure.
Add characteristic value in receive state.
Remove goto pointing to goto itself.
---
 nimble/host/audio/services/bass/src/ble_audio_svc_bass.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/nimble/host/audio/services/bass/src/ble_audio_svc_bass.c 
b/nimble/host/audio/services/bass/src/ble_audio_svc_bass.c
index 48a7a76b4..87e4da211 100644
--- a/nimble/host/audio/services/bass/src/ble_audio_svc_bass.c
+++ b/nimble/host/audio/services/bass/src/ble_audio_svc_bass.c
@@ -549,7 +549,7 @@ static int
 ble_svc_audio_bass_remove_source(uint8_t *data, uint16_t data_len, uint16_t 
conn_handle)
 {
 struct ble_audio_event ev = {
-.type = BLE_AUDIO_EVENT_BASS_BROADCAST_CODE_SET,
+.type = BLE_AUDIO_EVENT_BASS_OPERATION_STATUS,
 .bass_operation_status = {
 .op = BLE_AUDIO_EVENT_BASS_SOURCE_REMOVED,
 .status = 0
@@ -557,10 +557,12 @@ ble_svc_audio_bass_remove_source(uint8_t *data, uint16_t 
data_len, uint16_t conn
 };
 struct ble_svc_audio_bass_rcv_state_entry *rcv_state = NULL;
 struct ble_svc_audio_bass_operation operation;
+uint16_t chr_val;
 int rc = 0;
 int i;
 
 ev.bass_set_broadcast_code.source_id = data[0];
+operation.op = BLE_SVC_AUDIO_BASS_OPERATION_REMOVE_SOURCE;
 
 ble_svc_audio_bass_receive_state_find_by_source_id(&rcv_state,

ev.bass_operation_status.source_id);
@@ -587,12 +589,12 @@ ble_svc_audio_bass_remove_source(uint8_t *data, uint16_t 
data_len, uint16_t conn
 
 memset(rcv_state, 0, sizeof(*rcv_state));
 rcv_state->source_id = BLE_SVC_AUDIO_BASS_RECEIVE_STATE_SRC_ID_NONE;
+rcv_state->chr_val = chr_val;
 
 done:
 if (!rc) {
 rc = ble_svc_audio_bass_receive_state_notify(rcv_state);
 ev.bass_operation_status.status = rc;
-goto done;
 }
 
 ble_audio_event_listener_call(&ev);



(mynewt-documentation) 02/02: docs/conf: Fix broken `slack_url` reference and set document language

2024-08-23 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-documentation.git

commit 6872622d41f6ab3667a2a72ea735b60504d390e0
Author: Wojciech Pietraszewski 
AuthorDate: Thu Aug 22 16:13:12 2024 +0200

docs/conf: Fix broken `slack_url` reference and set document language

Fixes the broken `slack_url` reference that caused the Slack button
 in the footer to redirect to the home page.
Specifies the document language as `en` in the Sphinx configuration.
---
 docs/conf.py | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/docs/conf.py b/docs/conf.py
index 58bf1e1..7440819 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -72,7 +72,7 @@ release = u'latest'
 #
 # This is also used if you do content translation via gettext catalogs.
 # Usually you set "language" from the command line for these cases.
-language = None
+language = 'en'
 
 # List of patterns, relative to source directory, that match files and
 # directories to ignore when looking for source files.
@@ -186,4 +186,6 @@ edit_on_github_projects = {
 }
 edit_on_github_branch = 'master'
 
-slack_url = 
'https://join.slack.com/t/mynewt/shared_invite/enQtNjA1MTg0NzgyNzg3LTcyMmZiOGQzOGMxM2U4ODFmMTIwNjNmYTE5Y2UwYjQwZWIxNTE0MTUzY2JmMTEzOWFjYWZkNGM0YmM4MzAxNWQ'
+html_context = {
+'slack_url': 
'https://join.slack.com/t/mynewt/shared_invite/enQtNjA1MTg0NzgyNzg3LTcyMmZiOGQzOGMxM2U4ODFmMTIwNjNmYTE5Y2UwYjQwZWIxNTE0MTUzY2JmMTEzOWFjYWZkNGM0YmM4MzAxNWQ'
+}



(mynewt-documentation) branch master updated (2a9e84f -> 6872622)

2024-08-23 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-documentation.git


from 2a9e84f  docs/tutorials: Update `Air Quality Sensor` tutorial
 new b33b434  themes/mynewt: Update footer
 new 6872622  docs/conf: Fix broken `slack_url` reference and set document 
language

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:
 docs/_static/css/custom.css| 40 +++-
 docs/conf.py   |  6 --
 docs/themes/mynewt/footer.html | 40 +++-
 3 files changed, 74 insertions(+), 12 deletions(-)



(mynewt-site) branch master updated: custom-theme/custom: Update footer

2024-08-23 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-site.git


The following commit(s) were added to refs/heads/master by this push:
 new 452585c8d2 custom-theme/custom: Update footer
452585c8d2 is described below

commit 452585c8d2cbef0f0e8831e2613036ea283482a6
Author: Wojciech Pietraszewski 
AuthorDate: Wed Aug 14 15:56:15 2024 +0200

custom-theme/custom: Update footer

Fixes the footer's appearance on mobile devices.
Adjusts the spacing for better readability.
Ensures the footer is displayed at the bottom
 of the page, even when the main content area
 does not occupy the entire page.
---
 custom-theme/css/custom.css   |  28 ++--
 custom-theme/footer.html  |  48 +++-
 custom-theme/main.html| 103 +-
 custom-theme/quick-start.html |   1 +
 4 files changed, 102 insertions(+), 78 deletions(-)

diff --git a/custom-theme/css/custom.css b/custom-theme/css/custom.css
index a51d8ea3c3..37bd962630 100644
--- a/custom-theme/css/custom.css
+++ b/custom-theme/css/custom.css
@@ -65,6 +65,10 @@
 padding: 40px 0px 20px !important;
 }
 
+footer .logos {
+flex-direction: column;
+}
+
 }
 
 @media (max-width: 992px) {
@@ -192,10 +196,15 @@ footer .logos {
 footer .logos img {
 width: 200px;
 flex-shrink: 0; /* Safari needs this */
+margin: 10px 20px;
 }
 
 footer .logos .footnote {
-padding: 10px 40px;
+padding: 10px 0;
+}
+
+footer .logos p {
+margin-bottom: 12px;
 }
 
 .goal p {
@@ -386,10 +395,10 @@ ul.wy-breadcrumbs {
 
 .wy-breadcrumbs li a {
 display: inline-block;
-padding: 5 px
+padding: 5px
 }
 
-.wy-breadcrumbs li a: first-child {
+.wy-breadcrumbs li a:first-child {
 padding-left: 0
 }
 
@@ -400,7 +409,7 @@ ul.wy-breadcrumbs {
 display: inline-block;
 }
 
-@media screen and(max-width: 480 px) {
+@media screen and(max-width: 480px) {
 
 .wy-breadcrumbs-extra {
 display: none
@@ -485,6 +494,7 @@ code {
   text-decoration: none;
   display: inline-block;
   font-size: 12px;
+  margin-bottom: 4px;
 }
 
 .thumbnail-container {
@@ -510,3 +520,13 @@ code {
 background-size: contain;
 pointer-events: none;
 }
+
+#wrapper {
+display: flex;
+min-height: 100vh;
+flex-direction: column;
+}
+
+#main-content {
+flex-grow: 1;
+}
diff --git a/custom-theme/footer.html b/custom-theme/footer.html
index 3cce3798c0..3a77c1319e 100644
--- a/custom-theme/footer.html
+++ b/custom-theme/footer.html
@@ -1,25 +1,29 @@
-
-
-{% if config.copyright %}
-{{ config.copyright }}
-{% endif %}
-
-
-
-https://www.apache.org/";>
-
-
-
-Copyright © 2015-2024 The Apache Software Foundation.
-
-Apache Mynewt, Mynewt, Apache, the Apache feather logo, 
and the Apache Mynewt
-project logo are either registered trademarks or 
trademarks of the Apache
-Software Foundation in the United States and other 
countries.
-
-
-
-https://www.countit.com/images/add_to_slack.png"; 
alt="Slack Icon" title="Join our Slack Community" />
-
+
+
+
+
+{% if config.copyright %}
+{{ config.copyright }}
+{% endif %}
+
+
+
+https://www.apache.org/";>
+
+
+
+Copyright © 2015-2024 The Apache Software 
Foundation.
+
+Apache Mynewt, Mynewt, Apache, the Apache feather 
logo, and the Apache Mynewt
+project logo are either registered trademarks or 
trademarks of the Apache
+Software Foundation in the United States and other 
countries.
+
+
+
+
+
+
+
 
 
 https://www.apache.org/licenses/";>
diff --git a/custom-theme/main.html b/custom-theme/main.html
index ae6e8a1d95..61eab0658c 100644
--- a/custom-theme/main.html
+++ b/custom-theme/main.html
@@ -57,64 +57,63 @@ ga("send", "pageview");
 {% else %}
 
 {% endif %}
+
+{% include 'main-banner.html' %}
 
-{% include 'main-banner.html' %}
+{% include "nav.html" %}
 
-{% include "nav.html" %}
-
-{% set full_width_page_titles = [None, 'Home', 'Quick Start', 'About', 
'Talk

(mynewt-documentation) 01/02: themes/mynewt: Update footer

2024-08-23 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-documentation.git

commit b33b434c46968c6bb4d40e34cfc4367b7c17b8c8
Author: Wojciech Pietraszewski 
AuthorDate: Tue Aug 20 18:06:26 2024 +0200

themes/mynewt: Update footer

Adjusts the footer's layout to match
the one in mynewt-site
---
 docs/_static/css/custom.css| 40 +++-
 docs/themes/mynewt/footer.html | 40 +++-
 2 files changed, 70 insertions(+), 10 deletions(-)

diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css
index e035c8b..2d07a54 100644
--- a/docs/_static/css/custom.css
+++ b/docs/_static/css/custom.css
@@ -63,6 +63,10 @@
.sidebar-top {
padding: 40px 0px 20px !important;
}
+
+   footer .logos {
+   flex-direction: column;
+   }
 }
 
 @media (max-width: 992px) {
@@ -163,12 +167,13 @@ div.col-md-2 {
padding-left: 0;
 }
 
-footer div.container div.row {
+footer {
background-color: #f7f8fa;
text-align: center;
padding-top: 10px;
padding-bottom: 10px;
border-top: double #42567e;
+   color: #333;
 }
 
 footer .copyright {
@@ -189,10 +194,12 @@ footer .logos {
 footer .logos img {
width: 200px;
flex-shrink: 0; /* Safari needs this */
+   margin: 10px 20px;
+   max-width: none;
 }
 
 footer .logos .footnote {
-   padding: 10px 40px;
+   padding: 10px 0;
 }
 
 .goal p {
@@ -383,10 +390,10 @@ ul.wy-breadcrumbs {
 
 .wy-breadcrumbs li a {
display: inline-block;
-   padding: 5 px;
+   padding: 5px;
 }
 
-.wy-breadcrumbs: first-child {
+.wy-breadcrumbs:first-child {
padding-left: 0;
 }
 
@@ -397,7 +404,7 @@ ul.wy-breadcrumbs {
display: inline-block;
 }
 
-@media screen and(max-width: 480 px) {
+@media screen and(max-width: 480px) {
.wy-breadcrumbs-extra {
display: none;
}
@@ -466,3 +473,26 @@ div.section > div.breathe-sectiondef.container {
width: auto;
padding: 0;
 }
+
+.button-footer-asf {
+   background-color: transparent;
+   border-radius: 5px;
+   border: 1px solid grey;
+   color: black;
+   padding: 2px 20px;
+   text-align: center;
+   text-decoration: none;
+   display: inline-block;
+   font-size: 12px;
+   margin-bottom: 4px;
+}
+
+#wrapper {
+   display: flex;
+   min-height: 100vh;
+   flex-direction: column;
+}
+
+#main-content {
+   flex-grow: 1;
+}
diff --git a/docs/themes/mynewt/footer.html b/docs/themes/mynewt/footer.html
index 94d26af..d0a7efc 100644
--- a/docs/themes/mynewt/footer.html
+++ b/docs/themes/mynewt/footer.html
@@ -8,11 +8,16 @@
   
   
   
-  
-  
-Apache Mynewt, Mynewt, Apache, the Apache feather logo, and 
the Apache Mynewt project logo are either
-registered trademarks or trademarks of the Apache Software 
Foundation in the United States and other countries.
-  
+  https://www.apache.org";>
+  
+  
+  
+  Copyright © 2015-2024 The Apache Software Foundation.
+  
+Apache Mynewt, Mynewt, Apache, the Apache feather logo, 
and the Apache Mynewt project logo are either
+registered trademarks or trademarks of the Apache Software 
Foundation in the United States and other countries.
+ 
+  
   
 
   
@@ -20,4 +25,29 @@
   
 
   
+https://www.apache.org/licenses/";>
+
+License
+
+
+https://www.apache.org/foundation/sponsorship.html";>
+
+Sponsorship
+
+
+https://www.apache.org/foundation/thanks.html";>
+
+Thanks
+
+
+https://www.apache.org/security/";>
+
+Security
+
+
+https://apache.org/events/current-event";>
+
+ASF Events
+
+
 



(mynewt-nimble) branch master updated: ci: Update `Check ports syscfg update` workflow

2024-08-21 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
 new cc1ddb64 ci: Update `Check ports syscfg update` workflow
cc1ddb64 is described below

commit cc1ddb64d2e483f04d7b486e8fe3cf6b43c2fb2e
Author: Wojciech Pietraszewski 
AuthorDate: Mon Aug 12 11:37:49 2024 +0200

ci: Update `Check ports syscfg update` workflow

Changes the author of commits to bot account.
---
 .github/workflows/ports_syscfg_check.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.github/workflows/ports_syscfg_check.yml 
b/.github/workflows/ports_syscfg_check.yml
index 0b8c6aa6..5755a490 100644
--- a/.github/workflows/ports_syscfg_check.yml
+++ b/.github/workflows/ports_syscfg_check.yml
@@ -92,6 +92,7 @@ jobs:
   - name: Create Pull Request
 uses: peter-evans/create-pull-request@v6
 with:
+  author: Mynewt Bot 
   token: ${{ secrets.GITHUB_TOKEN }}
   commit-message: |
 porting: Update ports syscfg



(mynewt-site) branch master updated: ci: Update permissions for `Deploy Site` workflow

2024-08-19 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-site.git


The following commit(s) were added to refs/heads/master by this push:
 new 752bdf98d5 ci: Update permissions for `Deploy Site` workflow
752bdf98d5 is described below

commit 752bdf98d588c2761b88d1c7dde8902bf51073c4
Author: Wojciech Pietraszewski 
AuthorDate: Mon Aug 19 13:59:15 2024 +0200

ci: Update permissions for `Deploy Site` workflow

Adds explicit write permissions for creating PRs.
---
 .github/workflows/deploy-site.yml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.github/workflows/deploy-site.yml 
b/.github/workflows/deploy-site.yml
index 13402789cc..e95b14fe99 100644
--- a/.github/workflows/deploy-site.yml
+++ b/.github/workflows/deploy-site.yml
@@ -27,6 +27,9 @@ jobs:
   deploy:
 name: Deploy Site
 runs-on: ubuntu-20.04
+permissions:
+  contents: write
+  pull-requests: write
 if: github.event.repository.fork == false
 steps:
   - uses: actions/checkout@v3



(mynewt-site) branch master updated: documentation: add `master` as a selectable version

2024-08-19 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-site.git


The following commit(s) were added to refs/heads/master by this push:
 new d8e383dc50 documentation: add `master` as a selectable version
d8e383dc50 is described below

commit d8e383dc5096c904320961f5b3ab8c85a3a557ab
Author: Wojciech Pietraszewski 
AuthorDate: Wed Aug 14 20:17:47 2024 +0200

documentation: add `master` as a selectable version

Adds the master branch documentation as an option to choose
from the drop-down list in the `Documentation` section.
---
 custom-theme/choose_doc_version.html | 6 +-
 docs/documentation.md| 4 ++--
 mkdocs.yml   | 2 +-
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/custom-theme/choose_doc_version.html 
b/custom-theme/choose_doc_version.html
index 1b5fc0f9fc..424824b94a 100644
--- a/custom-theme/choose_doc_version.html
+++ b/custom-theme/choose_doc_version.html
@@ -1,8 +1,12 @@
 
   
+Version: latest
+  
+
+  
 Version: master
   
-  
+
 Version: 1.12.0
   
   
diff --git a/docs/documentation.md b/docs/documentation.md
index ca090a86b6..32f5e38456 100644
--- a/docs/documentation.md
+++ b/docs/documentation.md
@@ -1,9 +1,9 @@
 # Apache Mynewt Documentation
 
 -   Latest version:
--   [latest](/latest/)
+-   [1.12.0](/latest/)
+-   [master (development)](/master/)
 -   Earlier versions:
--   [1.12.0](/v1_12_0/)
 -   [1.11.0](/v1_11_0/)
 -   [1.10.0](/v1_10_0/)
 -   [1.9.0](/v1_9_0/)
diff --git a/mkdocs.yml b/mkdocs.yml
index 84f82a3653..dc7864cceb 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -31,7 +31,7 @@ markdown_extensions:
   pygments_style: xcode
 
 extra:
-version: "master"
+version: "1.12.0"
 versions:
 - label: "master"
   sha: "master"



(mynewt-documentation) branch master updated: docs/tutorials: Update `Air Quality Sensor` tutorial

2024-08-19 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-documentation.git


The following commit(s) were added to refs/heads/master by this push:
 new 2a9e84f  docs/tutorials: Update `Air Quality Sensor` tutorial
2a9e84f is described below

commit 2a9e84f5bd38eb93a955ef4643c96fbd0d7df627
Author: Wojciech Pietraszewski 
AuthorDate: Tue Aug 13 17:48:27 2024 +0200

docs/tutorials: Update `Air Quality Sensor` tutorial

Updates the article to reflect the latest Mynewt release.
---
 docs/tutorials/sensors/air_quality_sensor.rst | 192 +-
 1 file changed, 125 insertions(+), 67 deletions(-)

diff --git a/docs/tutorials/sensors/air_quality_sensor.rst 
b/docs/tutorials/sensors/air_quality_sensor.rst
index c09fea2..ef4e7bb 100644
--- a/docs/tutorials/sensors/air_quality_sensor.rst
+++ b/docs/tutorials/sensors/air_quality_sensor.rst
@@ -22,15 +22,20 @@ To start, create a new project under which you will do 
development for this appl
 $ mkdir $HOME/src
 $ cd $HOME/src
 $ newt new air_quality
+$ cd air_quality
 
-If you are using a different development board, you will need to know the 
board support package for that hardware. You can look up its location, add it 
your project, and fetch that along with the core OS components. Since the 
nRF52DK is supported in the Mynewt Core, we don't need to do much here.
-
-Your project.yml file should look like this:
+If you are using a different development board, you will need to know the 
board support package
+for that hardware. You can look up its location, add it to your project, and 
fetch that along with
+the core OS components. Since the nRF52DK is supported in the Mynewt Core, we 
don't need to do much here.
 
 .. code-block:: console
 
-[user@IsMyLaptop:~/src/air_quality]$ emacs project.yml &
 [user@IsMyLaptop:~/src/air_quality]$ cat project.yml
+
+Your ``project.yml`` file should look like this:
+
+.. code-block:: yaml
+
 project.name: "air_quality"
 
 project.repositories:
@@ -41,17 +46,22 @@ Your project.yml file should look like this:
 #
 repository.apache-mynewt-core:
 type: github
-vers: 0-latest
+vers: 1.12.0
 user: apache
 repo: mynewt-core
 
+After updating ``vers`` to the latest release of Mynewt (see *Latest News* at 
the top of the page),
+it's time to fetch needed repositories:
+
+.. code-block:: console
+
 [user@IsMyLaptop:~/src/air_quality]$ newt upgrade
 Downloading repository mynewt-core (commit: master) ...
 Downloading repository mynewt-nimble (commit: master) ...
-apache-mynewt-core successfully upgraded to version 0.0.0
-apache-mynewt-nimble successfully upgraded to version 0.0.0
-[user@IsMyLaptop:~/src/air_quality]$ ls repos/
-apache-mynewt-core
+
+Once the command finishes (which may take a while), there should be *repos* 
folder in your
+project's root directory. You can find there Mynewt Core components, NimBLE 
stack and other
+dependencies.
 
 Next, create a target for the nRF52DK bootloader: 
 
@@ -59,20 +69,16 @@ Next, create a target for the nRF52DK bootloader:
 
 [user@IsMyLaptop:~/src/air_quality]$ newt target create boot_nrf52dk
 Target targets/boot_nrf52dk successfully created
-[user@IsMyLaptop:~/src/air_quality]$ newt target set boot_nrf52dk 
bsp=@apache-mynewt-core/hw/bsp/nrf52dk
-Target targets/boot_nrf52dk successfully set target.bsp to 
@apache-mynewt-core/hw/bsp/nrf52dk
+[user@IsMyLaptop:~/src/air_quality]$ newt target set boot_nrf52dk 
bsp=@apache-mynewt-core/hw/bsp/nordic_pca10040
+Target targets/boot_nrf52dk successfully set target.bsp to 
@apache-mynewt-core/hw/bsp/nordic_pca10040
 [user@IsMyLaptop:~/src/air_quality]$ newt target set boot_nrf52dk 
app=@mcuboot/boot/mynewt
 Target targets/boot_nrf52dk successfully set target.app to 
@mcuboot/boot/mynewt
 [user@IsMyLaptop:~/src/air_quality]$ newt target set boot_nrf52dk 
build_profile=optimized
 Target targets/boot_nrf52dk successfully set target.build_profile to 
optimized
 [user@IsMyLaptop:~/src/air_quality]$ newt target show
-@apache-mynewt-core/targets/unittest
-bsp=hw/bsp/native
-build_profile=debug
-compiler=compiler/sim
 targets/boot_nrf52dk
 app=@mcuboot/boot/mynewt
-bsp=@apache-mynewt-core/hw/bsp/nrf52dk
+bsp=@apache-mynewt-core/hw/bsp/nordic_pca10040
 build_profile=optimized
 targets/my_blinky_sim
 app=apps/blinky
@@ -83,12 +89,14 @@ Build the bootloader target and load it onto the board:
 
 .. code-block:: console
 
-newt build boot_nrf52dk
-
-Linking boot.elf
-App successfully built: 
/Users/user/src/air_quality/bin/boot_nrf52dk/boot/mynewt/mynewt.elf
-

(mynewt-documentation) branch master updated: documentation: add `master` as a selectable version

2024-08-19 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-documentation.git


The following commit(s) were added to refs/heads/master by this push:
 new 983a6bf  documentation: add `master` as a selectable version
983a6bf is described below

commit 983a6bf4f815632bee6be9d87bdded94ef71a3c9
Author: Wojciech Pietraszewski 
AuthorDate: Wed Aug 14 20:18:17 2024 +0200

documentation: add `master` as a selectable version

Adds the master branch documentation as an option to choose
from the drop-down list in the `Documentation` section.
---
 docs/themes/mynewt/layout.html   | 12 +++-
 docs/themes/mynewt/versions.html |  5 -
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/docs/themes/mynewt/layout.html b/docs/themes/mynewt/layout.html
index 73c2ad9..8d9c50b 100644
--- a/docs/themes/mynewt/layout.html
+++ b/docs/themes/mynewt/layout.html
@@ -115,7 +115,17 @@ ga("send", "pageview");
 {% include "sidebar.html" %}
 
 
-  {% if cur_version != latest_version %}
+
+  {% if cur_version == "master" %}
+
+  
+Version {{ cur_version }} is the development version of the
+Apache Mynewt documentation. Click here to
+read the latest released version.
+  
+
+
+  {% elif cur_version != latest_version %}
 
   
 Version {{ cur_version }} is not the most recent version 
of the
diff --git a/docs/themes/mynewt/versions.html b/docs/themes/mynewt/versions.html
index fcc7eaf..ca4016e 100644
--- a/docs/themes/mynewt/versions.html
+++ b/docs/themes/mynewt/versions.html
@@ -3,7 +3,10 @@
   
 Version: latest
   
-  
+  
+Version: master
+  
+ 
 Version: 1.12.0
   
   



(mynewt-nimble) branch master updated: porting: Update ports syscfg

2024-08-19 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
 new 14c049fd porting: Update ports syscfg
14c049fd is described below

commit 14c049fd9afa49937092da0ebda054da21294cf2
Author: rymanluk <2675599+ryman...@users.noreply.github.com>
AuthorDate: Mon Aug 19 06:57:01 2024 +

porting: Update ports syscfg
---
 porting/examples/linux/include/syscfg/syscfg.h | 6 +-
 porting/examples/linux_blemesh/include/syscfg/syscfg.h | 6 +-
 porting/examples/nuttx/include/syscfg/syscfg.h | 6 +-
 porting/nimble/include/syscfg/syscfg.h | 6 +-
 porting/npl/riot/include/syscfg/syscfg.h   | 6 +-
 5 files changed, 5 insertions(+), 25 deletions(-)

diff --git a/porting/examples/linux/include/syscfg/syscfg.h 
b/porting/examples/linux/include/syscfg/syscfg.h
index 9c3680da..25dcac47 100644
--- a/porting/examples/linux/include/syscfg/syscfg.h
+++ b/porting/examples/linux/include/syscfg/syscfg.h
@@ -1184,11 +1184,7 @@
 #define MYNEWT_VAL_BLE_TRANSPORT_LL (1)
 #endif
 
-#ifndef MYNEWT_VAL_BLE_TRANSPORT_RX_PRIO
-#define MYNEWT_VAL_BLE_TRANSPORT_RX_PRIO (126)
-#endif
-
-#undef MYNEWT_VAL_BLE_TRANSPORT_RX_STACK_SIZE
+#undef MYNEWT_VAL_BLE_TRANSPORT_RX_TASK_STACK_SIZE
 
 #ifndef MYNEWT_VAL_BLE_SOCK_CLI_SYSINIT_STAGE
 #define MYNEWT_VAL_BLE_SOCK_CLI_SYSINIT_STAGE (500)
diff --git a/porting/examples/linux_blemesh/include/syscfg/syscfg.h 
b/porting/examples/linux_blemesh/include/syscfg/syscfg.h
index 1bd9f427..ac89b3ba 100644
--- a/porting/examples/linux_blemesh/include/syscfg/syscfg.h
+++ b/porting/examples/linux_blemesh/include/syscfg/syscfg.h
@@ -1732,11 +1732,7 @@
 #define MYNEWT_VAL_BLE_TRANSPORT_LL (1)
 #endif
 
-#ifndef MYNEWT_VAL_BLE_TRANSPORT_RX_PRIO
-#define MYNEWT_VAL_BLE_TRANSPORT_RX_PRIO (126)
-#endif
-
-#undef MYNEWT_VAL_BLE_TRANSPORT_RX_STACK_SIZE
+#undef MYNEWT_VAL_BLE_TRANSPORT_RX_TASK_STACK_SIZE
 
 #ifndef MYNEWT_VAL_BLE_SOCK_CLI_SYSINIT_STAGE
 #define MYNEWT_VAL_BLE_SOCK_CLI_SYSINIT_STAGE (500)
diff --git a/porting/examples/nuttx/include/syscfg/syscfg.h 
b/porting/examples/nuttx/include/syscfg/syscfg.h
index f9a75854..d751e856 100644
--- a/porting/examples/nuttx/include/syscfg/syscfg.h
+++ b/porting/examples/nuttx/include/syscfg/syscfg.h
@@ -1184,11 +1184,7 @@
 #define MYNEWT_VAL_BLE_TRANSPORT_LL (1)
 #endif
 
-#ifndef MYNEWT_VAL_BLE_TRANSPORT_RX_PRIO
-#define MYNEWT_VAL_BLE_TRANSPORT_RX_PRIO (126)
-#endif
-
-#undef MYNEWT_VAL_BLE_TRANSPORT_RX_STACK_SIZE
+#undef MYNEWT_VAL_BLE_TRANSPORT_RX_TASK_STACK_SIZE
 
 #ifndef MYNEWT_VAL_BLE_SOCK_CLI_SYSINIT_STAGE
 #define MYNEWT_VAL_BLE_SOCK_CLI_SYSINIT_STAGE (500)
diff --git a/porting/nimble/include/syscfg/syscfg.h 
b/porting/nimble/include/syscfg/syscfg.h
index 4b32ec55..35d18efe 100644
--- a/porting/nimble/include/syscfg/syscfg.h
+++ b/porting/nimble/include/syscfg/syscfg.h
@@ -1184,11 +1184,7 @@
 #define MYNEWT_VAL_BLE_TRANSPORT_LL (1)
 #endif
 
-#ifndef MYNEWT_VAL_BLE_TRANSPORT_RX_PRIO
-#define MYNEWT_VAL_BLE_TRANSPORT_RX_PRIO (126)
-#endif
-
-#undef MYNEWT_VAL_BLE_TRANSPORT_RX_STACK_SIZE
+#undef MYNEWT_VAL_BLE_TRANSPORT_RX_TASK_STACK_SIZE
 
 #ifndef MYNEWT_VAL_BLE_SOCK_CLI_SYSINIT_STAGE
 #define MYNEWT_VAL_BLE_SOCK_CLI_SYSINIT_STAGE (500)
diff --git a/porting/npl/riot/include/syscfg/syscfg.h 
b/porting/npl/riot/include/syscfg/syscfg.h
index de90aae2..c6d948e6 100644
--- a/porting/npl/riot/include/syscfg/syscfg.h
+++ b/porting/npl/riot/include/syscfg/syscfg.h
@@ -2212,11 +2212,7 @@
 #define MYNEWT_VAL_BLE_TRANSPORT_LL (1)
 #endif
 
-#ifndef MYNEWT_VAL_BLE_TRANSPORT_RX_PRIO
-#define MYNEWT_VAL_BLE_TRANSPORT_RX_PRIO (126)
-#endif
-
-#undef MYNEWT_VAL_BLE_TRANSPORT_RX_STACK_SIZE
+#undef MYNEWT_VAL_BLE_TRANSPORT_RX_TASK_STACK_SIZE
 
 #ifndef MYNEWT_VAL_BOOTUTIL_BOOTSTRAP
 #define MYNEWT_VAL_BOOTUTIL_BOOTSTRAP (0)



(mynewt-nimble) branch master updated: porting: Update ports syscfg

2024-08-09 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
 new c5881fa5 porting: Update ports syscfg
c5881fa5 is described below

commit c5881fa5783adad9fcaabc10c74bfae42aa954b3
Author: andrzej-kaczmarek <9692685+andrzej-kaczma...@users.noreply.github.com>
AuthorDate: Fri Aug 9 10:28:40 2024 +

porting: Update ports syscfg
---
 porting/examples/linux/include/syscfg/syscfg.h | 6 ++
 porting/examples/linux_blemesh/include/syscfg/syscfg.h | 6 ++
 porting/examples/nuttx/include/syscfg/syscfg.h | 6 ++
 porting/nimble/include/syscfg/syscfg.h | 6 ++
 porting/npl/riot/include/syscfg/syscfg.h   | 6 ++
 5 files changed, 30 insertions(+)

diff --git a/porting/examples/linux/include/syscfg/syscfg.h 
b/porting/examples/linux/include/syscfg/syscfg.h
index 07d3945c..9c3680da 100644
--- a/porting/examples/linux/include/syscfg/syscfg.h
+++ b/porting/examples/linux/include/syscfg/syscfg.h
@@ -1184,6 +1184,12 @@
 #define MYNEWT_VAL_BLE_TRANSPORT_LL (1)
 #endif
 
+#ifndef MYNEWT_VAL_BLE_TRANSPORT_RX_PRIO
+#define MYNEWT_VAL_BLE_TRANSPORT_RX_PRIO (126)
+#endif
+
+#undef MYNEWT_VAL_BLE_TRANSPORT_RX_STACK_SIZE
+
 #ifndef MYNEWT_VAL_BLE_SOCK_CLI_SYSINIT_STAGE
 #define MYNEWT_VAL_BLE_SOCK_CLI_SYSINIT_STAGE (500)
 #endif
diff --git a/porting/examples/linux_blemesh/include/syscfg/syscfg.h 
b/porting/examples/linux_blemesh/include/syscfg/syscfg.h
index a476d889..1bd9f427 100644
--- a/porting/examples/linux_blemesh/include/syscfg/syscfg.h
+++ b/porting/examples/linux_blemesh/include/syscfg/syscfg.h
@@ -1732,6 +1732,12 @@
 #define MYNEWT_VAL_BLE_TRANSPORT_LL (1)
 #endif
 
+#ifndef MYNEWT_VAL_BLE_TRANSPORT_RX_PRIO
+#define MYNEWT_VAL_BLE_TRANSPORT_RX_PRIO (126)
+#endif
+
+#undef MYNEWT_VAL_BLE_TRANSPORT_RX_STACK_SIZE
+
 #ifndef MYNEWT_VAL_BLE_SOCK_CLI_SYSINIT_STAGE
 #define MYNEWT_VAL_BLE_SOCK_CLI_SYSINIT_STAGE (500)
 #endif
diff --git a/porting/examples/nuttx/include/syscfg/syscfg.h 
b/porting/examples/nuttx/include/syscfg/syscfg.h
index c116f586..f9a75854 100644
--- a/porting/examples/nuttx/include/syscfg/syscfg.h
+++ b/porting/examples/nuttx/include/syscfg/syscfg.h
@@ -1184,6 +1184,12 @@
 #define MYNEWT_VAL_BLE_TRANSPORT_LL (1)
 #endif
 
+#ifndef MYNEWT_VAL_BLE_TRANSPORT_RX_PRIO
+#define MYNEWT_VAL_BLE_TRANSPORT_RX_PRIO (126)
+#endif
+
+#undef MYNEWT_VAL_BLE_TRANSPORT_RX_STACK_SIZE
+
 #ifndef MYNEWT_VAL_BLE_SOCK_CLI_SYSINIT_STAGE
 #define MYNEWT_VAL_BLE_SOCK_CLI_SYSINIT_STAGE (500)
 #endif
diff --git a/porting/nimble/include/syscfg/syscfg.h 
b/porting/nimble/include/syscfg/syscfg.h
index 926b7756..4b32ec55 100644
--- a/porting/nimble/include/syscfg/syscfg.h
+++ b/porting/nimble/include/syscfg/syscfg.h
@@ -1184,6 +1184,12 @@
 #define MYNEWT_VAL_BLE_TRANSPORT_LL (1)
 #endif
 
+#ifndef MYNEWT_VAL_BLE_TRANSPORT_RX_PRIO
+#define MYNEWT_VAL_BLE_TRANSPORT_RX_PRIO (126)
+#endif
+
+#undef MYNEWT_VAL_BLE_TRANSPORT_RX_STACK_SIZE
+
 #ifndef MYNEWT_VAL_BLE_SOCK_CLI_SYSINIT_STAGE
 #define MYNEWT_VAL_BLE_SOCK_CLI_SYSINIT_STAGE (500)
 #endif
diff --git a/porting/npl/riot/include/syscfg/syscfg.h 
b/porting/npl/riot/include/syscfg/syscfg.h
index 68203ad4..de90aae2 100644
--- a/porting/npl/riot/include/syscfg/syscfg.h
+++ b/porting/npl/riot/include/syscfg/syscfg.h
@@ -2212,6 +2212,12 @@
 #define MYNEWT_VAL_BLE_TRANSPORT_LL (1)
 #endif
 
+#ifndef MYNEWT_VAL_BLE_TRANSPORT_RX_PRIO
+#define MYNEWT_VAL_BLE_TRANSPORT_RX_PRIO (126)
+#endif
+
+#undef MYNEWT_VAL_BLE_TRANSPORT_RX_STACK_SIZE
+
 #ifndef MYNEWT_VAL_BOOTUTIL_BOOTSTRAP
 #define MYNEWT_VAL_BOOTUTIL_BOOTSTRAP (0)
 #endif



(mynewt-nimble) branch master updated: porting: Update ports syscfg

2024-08-08 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
 new 4150a609 porting: Update ports syscfg
4150a609 is described below

commit 4150a609400dbf11fe83348395d6ce930d581eb7
Author: rymanluk <2675599+ryman...@users.noreply.github.com>
AuthorDate: Thu Aug 8 17:45:25 2024 +

porting: Update ports syscfg
---
 porting/npl/riot/include/syscfg/syscfg.h | 4 
 1 file changed, 4 insertions(+)

diff --git a/porting/npl/riot/include/syscfg/syscfg.h 
b/porting/npl/riot/include/syscfg/syscfg.h
index 06080e27..68203ad4 100644
--- a/porting/npl/riot/include/syscfg/syscfg.h
+++ b/porting/npl/riot/include/syscfg/syscfg.h
@@ -1421,6 +1421,10 @@
 #define MYNEWT_VAL_BLE_LL_ISO (0)
 #endif
 
+#ifndef MYNEWT_VAL_BLE_LL_ISOAL_MUX_PREFILL
+#define MYNEWT_VAL_BLE_LL_ISOAL_MUX_PREFILL (0)
+#endif
+
 #ifndef MYNEWT_VAL_BLE_LL_ISO_BROADCASTER
 #define MYNEWT_VAL_BLE_LL_ISO_BROADCASTER (0)
 #endif



(mynewt-core) branch master updated (1430ea6ab -> 251f82e6d)

2024-08-06 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


from 1430ea6ab Add initial asf.yaml configuration
 new 95ca335a8 ci: Add `Doxygen Check` job to the compliance workflow
 new 251f82e6d ci: Add `Doxyfile` to RAT exclude list

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:
 .github/check_doxygen.py   | 106 +
 .github/workflows/check_compliance.yml |  17 ++
 .rat-excludes  |   1 +
 Doxyfile   |   7 +++
 4 files changed, 131 insertions(+)
 create mode 100755 .github/check_doxygen.py
 create mode 100644 Doxyfile



(mynewt-core) 01/02: ci: Add `Doxygen Check` job to the compliance workflow

2024-08-06 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 95ca335a8a28d3b99a1d72dec549cefa836979d4
Author: Wojciech Pietraszewski 
AuthorDate: Mon Jun 24 14:46:51 2024 +0200

ci: Add `Doxygen Check` job to the compliance workflow

This pull request adds a new check to the CI pipeline
 to ensure documentation integrity.
The script verifies if the Doxygen output contains any
 warnings.
---
 .github/check_doxygen.py   | 106 +
 .github/workflows/check_compliance.yml |  17 ++
 Doxyfile   |   7 +++
 3 files changed, 130 insertions(+)

diff --git a/.github/check_doxygen.py b/.github/check_doxygen.py
new file mode 100755
index 0..24872e4f5
--- /dev/null
+++ b/.github/check_doxygen.py
@@ -0,0 +1,106 @@
+#!/usr/bin/env python3
+
+#
+# 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.
+#
+
+import os
+import re
+import subprocess
+import sys
+from pathlib import Path
+
+TMP_FOLDER = "/tmp/doxygen_check"
+WARN_FILE_NAME = "warnings.log"
+allowed_files = []
+
+
+def run_cmd(cmd: str) -> list[str]:
+out = subprocess.check_output(cmd, text=True, shell=True)
+return out.splitlines()
+
+
+def run_cmd_no_check(cmd: str) -> list[str]:
+out = subprocess.run(cmd, text=True, shell=True, stdout=subprocess.PIPE,
+ stderr=subprocess.DEVNULL).stdout
+return out.splitlines()
+
+
+def is_ignored(filename: str, allowed: list[str]) -> bool:
+if Path(filename).suffix != ".h" or "priv" in filename or "arch" in 
filename:
+return True
+if filename in allowed:
+return False
+if re.search(r"kernel/os/include/os/.*", filename):
+return False
+
+return True
+
+
+def main() -> bool:
+commit = "HEAD"
+upstream = "origin/master"
+mb = run_cmd(f"git merge-base {upstream} {commit}")
+upstream = mb[0]
+
+results_ok = []
+results_fail = []
+results_ign = []
+
+os.makedirs(Path(TMP_FOLDER, WARN_FILE_NAME).parent, mode=0o755,
+exist_ok=True)
+
+files = run_cmd(f"git diff --diff-filter=AM --name-only {upstream} 
{commit}")
+for fname in files:
+if is_ignored(fname, allowed_files):
+results_ign.append(fname)
+continue
+
+os.environ['DOXYGEN_INPUT'] = fname
+try:
+run_cmd_no_check("doxygen")
+
+except subprocess.CalledProcessError as e:
+print(f"\033[31m[FAIL] {e.returncode}\033[0m")
+return False
+
+with open(os.path.join(TMP_FOLDER, WARN_FILE_NAME)) as warn_log:
+warnings = warn_log.read()
+if len(warnings) == 0:
+results_ok.append(fname)
+else:
+results_fail.append((fname, warnings))
+
+for fname in results_ign:
+print(f"\033[90m[ NA ] {fname}\033[0m")
+for fname in results_ok:
+print(f"\033[32m[ OK ] {fname}\033[0m")
+for fname, warnings in results_fail:
+print(f"\033[31m[FAIL] {fname}\033[0m")
+print(warnings)
+
+if len(results_fail) > 0:
+print(f"\033[31mYour code has documentation style problems, see the 
logs "
+  f"for details.\033[0m")
+
+return len(results_fail) == 0
+
+
+if __name__ == "__main__":
+if not main():
+sys.exit(1)
diff --git a/.github/workflows/check_compliance.yml 
b/.github/workflows/check_compliance.yml
index a3c3752f5..886c300a9 100644
--- a/.github/workflows/check_compliance.yml
+++ b/.github/workflows/check_compliance.yml
@@ -52,3 +52,20 @@ jobs:
   - name: check licensing
 run: |
  .github/check_license.py
+
+  doxygen_check:
+name: Doxygen Check
+runs-on: ubuntu-latest
+steps:
+  - uses: actions/checkout@v3
+with:
+  fetch-depth: 0
+  - name: Install Dependencies
+shell: bash
+run:

(mynewt-core) 02/02: ci: Add `Doxyfile` to RAT exclude list

2024-08-06 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 251f82e6db8d66e3b1e5d0517e886f7da89fd8fd
Author: Wojciech Pietraszewski 
AuthorDate: Fri Jun 28 11:02:24 2024 +0200

ci: Add `Doxyfile` to RAT exclude list

Ignores Doxygen configuration file in licensing check.
---
 .rat-excludes | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.rat-excludes b/.rat-excludes
index 38733a9d7..7d11f1775 100644
--- a/.rat-excludes
+++ b/.rat-excludes
@@ -15,6 +15,7 @@ uncrustify.cfg
 README.md
 .mailmap
 .style_ignored_dirs
+Doxyfile
 
 # unit tests executables
 bin



(mynewt-site) branch master updated: mkdocs: Disable `google_analytics` in site config

2024-08-06 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-site.git


The following commit(s) were added to refs/heads/master by this push:
 new 0d0e59bf6d mkdocs: Disable `google_analytics` in site config
0d0e59bf6d is described below

commit 0d0e59bf6d18e9c71ccf54d5b7c271e2e6b94d79
Author: Wojciech Pietraszewski 
AuthorDate: Mon Aug 5 13:51:51 2024 +0200

mkdocs: Disable `google_analytics` in site config

Removes Google Analytics from the site to align
 with ASF Data Privacy Policy.
---
 mkdocs.yml | 2 --
 1 file changed, 2 deletions(-)

diff --git a/mkdocs.yml b/mkdocs.yml
index bf9453d45c..84f82a3653 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -110,5 +110,3 @@ extra:
 slack_url: 
"https://join.slack.com/t/mynewt/shared_invite/enQtNjA1MTg0NzgyNzg3LTcyMmZiOGQzOGMxM2U4ODFmMTIwNjNmYTE5Y2UwYjQwZWIxNTE0MTUzY2JmMTEzOWFjYWZkNGM0YmM4MzAxNWQ";
 
 copyright: "Apache Mynewt is available under Apache License, version 2.0."
-
-google_analytics: ["UA-72162311-1", "auto"]



(mynewt-documentation) branch master updated: docs/conf: Disable `google_analytics` in Sphinx config

2024-08-06 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-documentation.git


The following commit(s) were added to refs/heads/master by this push:
 new 0e7a8d9  docs/conf: Disable `google_analytics` in Sphinx config
0e7a8d9 is described below

commit 0e7a8d96b696c51822765ac7aa76c816697ec6f0
Author: Wojciech Pietraszewski 
AuthorDate: Tue Aug 6 11:27:56 2024 +0200

docs/conf: Disable `google_analytics` in Sphinx config

Removes Google Analytics from the documentation site
 to align with ASF Data Privacy Policy.
---
 docs/conf.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/conf.py b/docs/conf.py
index 5a5b29f..58bf1e1 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -102,7 +102,7 @@ html_theme_path = ['./themes']
 # documentation.
 #
 html_theme_options = {
-'google_analytics': ('UA-72162311-1', 'auto')
+'google_analytics': False
 }
 
 # Add any paths that contain custom static files (such as style sheets) here,



(mynewt-site) branch master updated: ci: Update automated deployment job

2024-08-05 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-site.git


The following commit(s) were added to refs/heads/master by this push:
 new 0d2022c4b3 ci: Update automated deployment job
0d2022c4b3 is described below

commit 0d2022c4b37386080bfecaba6a98496788176cda
Author: Wojciech Pietraszewski 
AuthorDate: Mon Aug 5 12:28:18 2024 +0200

ci: Update automated deployment job

Disables automated website deployment on forks.
---
 .github/workflows/deploy-site.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.github/workflows/deploy-site.yml 
b/.github/workflows/deploy-site.yml
index 6591b213b0..13402789cc 100644
--- a/.github/workflows/deploy-site.yml
+++ b/.github/workflows/deploy-site.yml
@@ -27,6 +27,7 @@ jobs:
   deploy:
 name: Deploy Site
 runs-on: ubuntu-20.04
+if: github.event.repository.fork == false
 steps:
   - uses: actions/checkout@v3
 with:



(mynewt-site) branch master updated: custom-theme/talks: Replace iframe elements with thumbnails

2024-08-05 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-site.git


The following commit(s) were added to refs/heads/master by this push:
 new 7a42ae6b72 custom-theme/talks: Replace iframe elements with thumbnails
7a42ae6b72 is described below

commit 7a42ae6b7282a07363cd6d5b3850d7545178388c
Author: Wojciech Pietraszewski 
AuthorDate: Fri Aug 2 16:08:41 2024 +0200

custom-theme/talks: Replace iframe elements with thumbnails

Due to Content Security Policy (CSP) restrictions
 that block embedded videos, this commit replaces
  elements with hyperlinked thumbnails.
---
 custom-theme/css/custom.css | 24 
 custom-theme/talks.html | 25 +
 2 files changed, 33 insertions(+), 16 deletions(-)

diff --git a/custom-theme/css/custom.css b/custom-theme/css/custom.css
index 4d6f8bd697..a51d8ea3c3 100644
--- a/custom-theme/css/custom.css
+++ b/custom-theme/css/custom.css
@@ -486,3 +486,27 @@ code {
   display: inline-block;
   font-size: 12px;
 }
+
+.thumbnail-container {
+position: relative;
+display: block;
+width: 560px;
+height: 314px;
+overflow: hidden;
+background-size: cover;
+background-position: center center;
+margin-top: 20px;
+margin-bottom: 20px;
+}
+
+.thumbnail-container .play-button {
+position: absolute;
+top: 50%;
+left: 50%;
+transform: translate(-50%, -50%);
+width: 70px;
+height: 70px;
+background: 
url('https://upload.wikimedia.org/wikipedia/commons/b/b8/YouTube_play_button_icon_%282013%E2%80%932017%29.svg')
 no-repeat center center;
+background-size: contain;
+pointer-events: none;
+}
diff --git a/custom-theme/talks.html b/custom-theme/talks.html
index aab0f3..7b8d9c087e 100644
--- a/custom-theme/talks.html
+++ b/custom-theme/talks.html
@@ -8,11 +8,9 @@
 
 
   
-
-https://www.youtube.com/embed/4xRbGMDcMu8?si=SZbkHO08iLHDJF_N";
-title="Apache Mynewt Overview" frameborder="0"
-allow="accelerometer; autoplay; clipboard-write; encrypted-media; 
gyroscope; picture-in-picture; web-share" 
referrerpolicy="strict-origin-when-cross-origin" allowfullscreen 
style="padding-top: 20px;">
+https://youtu.be/4xRbGMDcMu8"; target="_blank" 
class="thumbnail-container" style="background-image: 
url('https://img.youtube.com/vi/4xRbGMDcMu8/0.jpg');">
+  
+
   
 
   
@@ -40,21 +38,16 @@
 This presentation helps developers up and down the stack understand the 
requirements and challenges of embedded development environments – whether they 
are using common maker environments like Arduino or mature product-oriented 
tools. It covers the salient goals and features of Mynewt, the open source OS 
for MCUs.
 
   
-
-  
-https://www.youtube.com/embed/5KhnjE7zYx4?si=2eEdqrV6e3Rq3Tjf";
-title="LAS16-104: MyNewt technical Overview" frameborder="0"
-allow="accelerometer; autoplay; clipboard-write; encrypted-media; 
gyroscope; picture-in-picture; web-share" 
referrerpolicy="strict-origin-when-cross-origin" allowfullscreen 
style="padding-top: 20px; padding-bottom: 20px;">
-  
+https://youtu.be/5KhnjE7zYx4"; target="_blank" 
class="thumbnail-container" style="background-image: 
url('https://img.youtube.com/vi/5KhnjE7zYx4/0.jpg');">
+  
+
 
 
 
-
   
-https://www.youtube.com/embed/RsDqH5FZ-bo?si=WSg1FfcxwejL-Qqm";
-title="Apache Mynewt: The Next Great Open Source OS for 32 Bit 
MCUs Coming to a RISC-V" frameborder="0" allow="accelerometer; autoplay; 
clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" 
referrerpolicy="strict-origin-when-cross-origin" allowfullscreen 
style="padding-top: 20px; padding-bottom: 20px;">
+https://youtu.be/RsDqH5FZ-bo"; target="_blank" 
class="thumbnail-container" style="background-image: 
url('https://img.youtube.com/vi/RsDqH5FZ-bo/0.jpg');">
+  
+
   
 
   



(mynewt-nimble) branch master updated: nimble/mesh: Fix syscfg restrictions for BLE_MESH_PROXY_MSG_LEN

2024-08-01 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
 new fdb4eda2 nimble/mesh: Fix syscfg restrictions for 
BLE_MESH_PROXY_MSG_LEN
fdb4eda2 is described below

commit fdb4eda254215bf183874bab930b0ca88eba2392
Author: Szymon Janc 
AuthorDate: Thu Aug 1 12:03:45 2024 +0200

nimble/mesh: Fix syscfg restrictions for BLE_MESH_PROXY_MSG_LEN

Make sure BLE_MESH_PROXY_MSG_LEN is properly set when both
BLE_MESH_PB_GATT and BLE_MESH_GATT_PROXY are set.
---
 nimble/host/mesh/syscfg.yml | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/nimble/host/mesh/syscfg.yml b/nimble/host/mesh/syscfg.yml
index c75828d2..73bef03a 100644
--- a/nimble/host/mesh/syscfg.yml
+++ b/nimble/host/mesh/syscfg.yml
@@ -977,11 +977,10 @@ syscfg.vals.BLE_MESH_GATT_PROXY:
 syscfg.vals.BLE_MESH_PB_GATT:
 BLE_MESH_PROXY: 1
 BLE_MESH_PROV: 1
+BLE_MESH_PROXY_MSG_LEN: 66
 
 syscfg.vals.BLE_MESH_PB_ADV:
 BLE_MESH_PROV: 1
 
-syscfg.vals.'BLE_MESH_PB_GATT':
-BLE_MESH_PROXY_MSG_LEN: 66
-syscfg.vals.'BLE_MESH_GATT_PROXY':
+syscfg.vals.'BLE_MESH_GATT_PROXY && !BLE_MESH_PB_GATT':
 BLE_MESH_PROXY_MSG_LEN: 33



(mynewt-site) branch site-update deleted (was 93bbf4403f)

2024-08-01 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a change to branch site-update
in repository https://gitbox.apache.org/repos/asf/mynewt-site.git


 was 93bbf4403f asf-site update

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



(mynewt-site) branch master updated: ci: Add automated deployment job

2024-08-01 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-site.git


The following commit(s) were added to refs/heads/master by this push:
 new ecad57c420 ci: Add automated deployment job
ecad57c420 is described below

commit ecad57c4206850216d0b11b811f71470577df74b
Author: Wojciech Pietraszewski 
AuthorDate: Wed Jul 31 18:38:22 2024 +0200

ci: Add automated deployment job

Enable automated website deployment whenever a pull request is merged.
---
 .github/workflows/deploy-site.yml | 74 +++
 1 file changed, 74 insertions(+)

diff --git a/.github/workflows/deploy-site.yml 
b/.github/workflows/deploy-site.yml
new file mode 100644
index 00..6591b213b0
--- /dev/null
+++ b/.github/workflows/deploy-site.yml
@@ -0,0 +1,74 @@
+#
+# 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.
+#
+
+name: Deploy Site
+on:
+  push:
+branches:
+  - 'master'
+
+jobs:
+  deploy:
+name: Deploy Site
+runs-on: ubuntu-20.04
+steps:
+  - uses: actions/checkout@v3
+with:
+  ref: master
+
+  - name: Install Dependencies
+run: |
+  sudo apt-get update
+  sudo apt-get install -y doxygen tzdata
+  python -m pip install --upgrade pip
+  pip install -r requirements.txt 
+
+  - name: Setup Project
+run: |
+  cd ..
+  git clone https://github.com/apache/mynewt-documentation
+  git clone https://github.com/apache/mynewt-core
+  git clone https://github.com/apache/mynewt-nimble
+  git clone https://github.com/apache/mynewt-newt
+  git clone https://github.com/apache/mynewt-newtmgr
+
+  - name: Build Site
+run: ./build.py
+
+  - name: Fetch Deployment Branch
+run: git fetch origin asf-site:asf-site
+
+  - name: Deploy Site
+run: ./deploy.sh build
+
+  - name: Create Pull Request
+uses: peter-evans/create-pull-request@v6
+with:
+  token: ${{ secrets.GITHUB_TOKEN }}
+  commit-message: asf-site update
+  base: asf-site
+  branch: site-update
+  title: "Deploy site"
+  body: |
+Deploy site: 
+- Builds the Mynewt site from `master` branch
+- Pushes the changes to `asf-site`
+- Auto-generated by [create-pull-request][1]
+
+[1]: https://github.com/peter-evans/create-pull-request



(mynewt-core) branch master updated: Add initial asf.yaml configuration

2024-07-31 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
 new 1430ea6ab Add initial asf.yaml configuration
1430ea6ab is described below

commit 1430ea6ab57448cb6d6a32ce864fe4536b59a533
Author: Szymon Janc 
AuthorDate: Mon Jul 22 17:34:59 2024 +0200

Add initial asf.yaml configuration

This sets ininitial configuration for email notifications.
---
 .asf.yaml | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/.asf.yaml b/.asf.yaml
new file mode 100644
index 0..c43fe91b7
--- /dev/null
+++ b/.asf.yaml
@@ -0,0 +1,23 @@
+#
+# 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.
+#
+
+notifications:
+  commits: commits@mynewt.apache.org
+  issues: notificati...@mynewt.apache.org
+  pullrequests: notificati...@mynewt.apache.org



(mynewt-newtmgr) branch master updated: Add initial asf.yaml configuration

2024-07-31 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newtmgr.git


The following commit(s) were added to refs/heads/master by this push:
 new 3b82e1d  Add initial asf.yaml configuration
3b82e1d is described below

commit 3b82e1db45de9e77d123cb069cf00d771a237d45
Author: Szymon Janc 
AuthorDate: Tue Jul 30 08:58:28 2024 +0200

Add initial asf.yaml configuration

This sets ininitial configuration for email notifications.
---
 .asf.yaml | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/.asf.yaml b/.asf.yaml
new file mode 100644
index 000..c43fe91
--- /dev/null
+++ b/.asf.yaml
@@ -0,0 +1,23 @@
+#
+# 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.
+#
+
+notifications:
+  commits: commits@mynewt.apache.org
+  issues: notificati...@mynewt.apache.org
+  pullrequests: notificati...@mynewt.apache.org



(mynewt-newt) branch master updated: Add initial asf.yaml configuration

2024-07-31 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newt.git


The following commit(s) were added to refs/heads/master by this push:
 new f4cd7f21 Add initial asf.yaml configuration
f4cd7f21 is described below

commit f4cd7f211939915b373babdbca012262def27077
Author: Szymon Janc 
AuthorDate: Tue Jul 30 08:58:24 2024 +0200

Add initial asf.yaml configuration

This sets ininitial configuration for email notifications.
---
 .asf.yaml | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/.asf.yaml b/.asf.yaml
new file mode 100644
index ..c43fe91b
--- /dev/null
+++ b/.asf.yaml
@@ -0,0 +1,23 @@
+#
+# 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.
+#
+
+notifications:
+  commits: commits@mynewt.apache.org
+  issues: notificati...@mynewt.apache.org
+  pullrequests: notificati...@mynewt.apache.org



(mynewt-site) branch master updated: Add initial asf.yaml configuration

2024-07-31 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-site.git


The following commit(s) were added to refs/heads/master by this push:
 new d12b84335c Add initial asf.yaml configuration
d12b84335c is described below

commit d12b84335c91692abb3fb7b2ea167163819f5c7a
Author: Szymon Janc 
AuthorDate: Tue Jul 30 08:58:32 2024 +0200

Add initial asf.yaml configuration

This sets ininitial configuration for email notifications.
---
 .asf.yaml | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/.asf.yaml b/.asf.yaml
new file mode 100644
index 00..c43fe91b7f
--- /dev/null
+++ b/.asf.yaml
@@ -0,0 +1,23 @@
+#
+# 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.
+#
+
+notifications:
+  commits: commits@mynewt.apache.org
+  issues: notificati...@mynewt.apache.org
+  pullrequests: notificati...@mynewt.apache.org



(mynewt-artifact) branch master updated: Add initial asf.yaml configuration

2024-07-31 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-artifact.git


The following commit(s) were added to refs/heads/master by this push:
 new e55cc86  Add initial asf.yaml configuration
e55cc86 is described below

commit e55cc86a115e26a47a54fae41680ba01f290334a
Author: Szymon Janc 
AuthorDate: Tue Jul 30 08:58:43 2024 +0200

Add initial asf.yaml configuration

This sets ininitial configuration for email notifications.
---
 .asf.yaml | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/.asf.yaml b/.asf.yaml
new file mode 100644
index 000..c43fe91
--- /dev/null
+++ b/.asf.yaml
@@ -0,0 +1,23 @@
+#
+# 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.
+#
+
+notifications:
+  commits: commits@mynewt.apache.org
+  issues: notificati...@mynewt.apache.org
+  pullrequests: notificati...@mynewt.apache.org



(mynewt-blinky) branch master updated: Add initial asf.yaml configuration

2024-07-31 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-blinky.git


The following commit(s) were added to refs/heads/master by this push:
 new a8aae59  Add initial asf.yaml configuration
a8aae59 is described below

commit a8aae599838ef1ada9e23464c4d9090cd6105c10
Author: Szymon Janc 
AuthorDate: Tue Jul 30 08:58:39 2024 +0200

Add initial asf.yaml configuration

This sets ininitial configuration for email notifications.
---
 .asf.yaml | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/.asf.yaml b/.asf.yaml
new file mode 100644
index 000..c43fe91
--- /dev/null
+++ b/.asf.yaml
@@ -0,0 +1,23 @@
+#
+# 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.
+#
+
+notifications:
+  commits: commits@mynewt.apache.org
+  issues: notificati...@mynewt.apache.org
+  pullrequests: notificati...@mynewt.apache.org



(mynewt-nimble) branch master updated: Add initial asf.yaml configuration

2024-07-31 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
 new 609f6a2e Add initial asf.yaml configuration
609f6a2e is described below

commit 609f6a2ece8728664a6cdf45514957c431d04ee3
Author: Szymon Janc 
AuthorDate: Tue Jul 30 08:58:09 2024 +0200

Add initial asf.yaml configuration

This sets ininitial configuration for email notifications.
---
 .asf.yaml | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/.asf.yaml b/.asf.yaml
new file mode 100644
index ..c43fe91b
--- /dev/null
+++ b/.asf.yaml
@@ -0,0 +1,23 @@
+#
+# 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.
+#
+
+notifications:
+  commits: commits@mynewt.apache.org
+  issues: notificati...@mynewt.apache.org
+  pullrequests: notificati...@mynewt.apache.org



(mynewt-mcumgr) branch master updated: Add initial asf.yaml configuration

2024-07-31 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-mcumgr.git


The following commit(s) were added to refs/heads/master by this push:
 new 911e538  Add initial asf.yaml configuration
911e538 is described below

commit 911e538756b9f4c863c65f1514e1aaca0484c1c3
Author: Szymon Janc 
AuthorDate: Tue Jul 30 08:58:20 2024 +0200

Add initial asf.yaml configuration

This sets ininitial configuration for email notifications.
---
 .asf.yaml | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/.asf.yaml b/.asf.yaml
new file mode 100644
index 000..c43fe91
--- /dev/null
+++ b/.asf.yaml
@@ -0,0 +1,23 @@
+#
+# 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.
+#
+
+notifications:
+  commits: commits@mynewt.apache.org
+  issues: notificati...@mynewt.apache.org
+  pullrequests: notificati...@mynewt.apache.org



(mynewt-nffs) branch master updated: Add initial asf.yaml configuration

2024-07-31 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nffs.git


The following commit(s) were added to refs/heads/master by this push:
 new fef52b4  Add initial asf.yaml configuration
fef52b4 is described below

commit fef52b4c33b260451c6563c090869372b11c8f9a
Author: Szymon Janc 
AuthorDate: Tue Jul 30 08:58:48 2024 +0200

Add initial asf.yaml configuration

This sets ininitial configuration for email notifications.
---
 .asf.yaml | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/.asf.yaml b/.asf.yaml
new file mode 100644
index 000..c43fe91
--- /dev/null
+++ b/.asf.yaml
@@ -0,0 +1,23 @@
+#
+# 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.
+#
+
+notifications:
+  commits: commits@mynewt.apache.org
+  issues: notificati...@mynewt.apache.org
+  pullrequests: notificati...@mynewt.apache.org



(mynewt-documentation) branch master updated: Add initial asf.yaml configuration

2024-07-31 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-documentation.git


The following commit(s) were added to refs/heads/master by this push:
 new 942ab28  Add initial asf.yaml configuration
942ab28 is described below

commit 942ab288ca80c8563579afdb4957661a960454fc
Author: Szymon Janc 
AuthorDate: Tue Jul 30 08:58:36 2024 +0200

Add initial asf.yaml configuration

This sets ininitial configuration for email notifications.
---
 .asf.yaml | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/.asf.yaml b/.asf.yaml
new file mode 100644
index 000..c43fe91
--- /dev/null
+++ b/.asf.yaml
@@ -0,0 +1,23 @@
+#
+# 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.
+#
+
+notifications:
+  commits: commits@mynewt.apache.org
+  issues: notificati...@mynewt.apache.org
+  pullrequests: notificati...@mynewt.apache.org



(mynewt-nimble) branch master updated: ci: Upgrade PR labeler

2024-07-30 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
 new 97651a1a ci: Upgrade PR labeler
97651a1a is described below

commit 97651a1ac477ed920332f93c0ff1dd0096e68c8e
Author: Wojciech Pietraszewski 
AuthorDate: Mon Jul 22 16:26:07 2024 +0200

ci: Upgrade PR labeler

Adds a new label's category for Pull Request size.
The labels are based on the number of altered lines.
---
 .github/labeler_cfg.yml   | 4 
 .github/workflows/labeler.yml | 9 -
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/.github/labeler_cfg.yml b/.github/labeler_cfg.yml
index cc4f6abb..45e245cf 100644
--- a/.github/labeler_cfg.yml
+++ b/.github/labeler_cfg.yml
@@ -24,3 +24,7 @@ host:
 controller:
   - changed-files:
   - any-glob-to-any-file: nimble/controller/**
+
+CI:
+  - changed-files:
+  - any-glob-to-any-file: .github/workflows/**
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
index 7c2d296d..c084f29d 100644
--- a/.github/workflows/labeler.yml
+++ b/.github/workflows/labeler.yml
@@ -19,13 +19,14 @@
 
 name: "Pull Request Labeler"
 on:
-  - pull_request
+  - pull_request_target
 
 jobs:
   labeler:
 permissions:
   contents: read
   pull-requests: write
+  issues: write
 runs-on: ubuntu-latest
 steps:
   - name: Checkout repository
@@ -36,3 +37,9 @@ jobs:
 with:
   sync-labels: true
   configuration-path: .github/labeler_cfg.yml
+
+  - name: Assign labels based on the PR's size
+uses: codelytv/pr-size-labeler@v1.10.0
+with:
+  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+  ignore_file_deletions: true



(mynewt-nimble) branch master updated: nimble/host: Modify Advertising Tx power levels

2024-07-30 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
 new 1f187b8e nimble/host: Modify Advertising Tx power levels
1f187b8e is described below

commit 1f187b8ec595d59e31bdd434c48957dc9d673a24
Author: Rahul Tank 
AuthorDate: Tue Jul 30 17:41:14 2024 +0530

nimble/host: Modify Advertising Tx power levels

Spec ver 5.4 , Vol 4, Part E, section 7.8.6 mentions the range value for
Tx power level.

Different BLE spec version have modified the range values that Tx Power 
level
can have. Update the min / max macros to reflect the same
---
 nimble/include/nimble/hci_common.h | 13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/nimble/include/nimble/hci_common.h 
b/nimble/include/nimble/hci_common.h
index 80c4f2b3..b1f62612 100644
--- a/nimble/include/nimble/hci_common.h
+++ b/nimble/include/nimble/hci_common.h
@@ -1428,8 +1428,17 @@ struct ble_hci_vs_set_local_irk_cp {
 #define BLE_HCI_ADV_PEER_ADDR_MAX   (1)
 
 /* --- LE advertising channel tx power (OCF 0x0007) */
-#define BLE_HCI_ADV_CHAN_TXPWR_MIN (-20)
-#define BLE_HCI_ADV_CHAN_TXPWR_MAX (10)
+#if MYNEWT_VAL(BLE_VERSION) == 50
+#define BLE_HCI_ADV_CHAN_TXPWR_MIN  (-20)
+#define BLE_HCI_ADV_CHAN_TXPWR_MAX  (10)
+#elif MYNEWT_VAL(BLE_VERSION) == 51
+#define BLE_HCI_ADV_CHAN_TXPWR_MIN  (-20)
+#define BLE_HCI_ADV_CHAN_TXPWR_MAX  (20)
+#elif MYNEWT_VAL(BLE_VERSION) >= 52
+#define BLE_HCI_ADV_CHAN_TXPWR_MIN  (-127)
+#define BLE_HCI_ADV_CHAN_TXPWR_MAX  (20)
+#endif
+
 
 /* --- LE set scan enable (OCF 0x000c) */
 



(mynewt-nimble) branch master updated: porting: Update ports syscfg

2024-07-30 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
 new e4af6212 porting: Update ports syscfg
e4af6212 is described below

commit e4af62122fe07f8d4bbee3d412cb026807900efb
Author: sjanc <10303625+sj...@users.noreply.github.com>
AuthorDate: Tue Jul 30 21:45:21 2024 +

porting: Update ports syscfg
---
 porting/examples/linux_blemesh/include/syscfg/syscfg.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/porting/examples/linux_blemesh/include/syscfg/syscfg.h 
b/porting/examples/linux_blemesh/include/syscfg/syscfg.h
index a5ab87a6..a476d889 100644
--- a/porting/examples/linux_blemesh/include/syscfg/syscfg.h
+++ b/porting/examples/linux_blemesh/include/syscfg/syscfg.h
@@ -1302,7 +1302,7 @@
 #endif
 
 #ifndef MYNEWT_VAL_BLE_MESH_PROXY_MSG_LEN
-#define MYNEWT_VAL_BLE_MESH_PROXY_MSG_LEN (33)
+#define MYNEWT_VAL_BLE_MESH_PROXY_MSG_LEN (66)
 #endif
 
 #ifndef MYNEWT_VAL_BLE_MESH_PROXY_USE_DEVICE_NAME



(mynewt-core) branch master updated: ci: Add PR labeler

2024-07-24 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
 new f36cfea71 ci: Add PR labeler
f36cfea71 is described below

commit f36cfea71f0f48f028ef4d25ede1d1986b0d6503
Author: Wojciech Pietraszewski 
AuthorDate: Tue Jul 23 13:54:34 2024 +0200

ci: Add PR labeler

Adds a new workflow for adding labels to Pull Requests.
The labels are based on the paths of changed files and
the number of altered lines.
---
 .github/labeler_cfg.yml   | 42 
 .github/workflows/labeler.yml | 45 +++
 2 files changed, 87 insertions(+)

diff --git a/.github/labeler_cfg.yml b/.github/labeler_cfg.yml
new file mode 100644
index 0..62dfea970
--- /dev/null
+++ b/.github/labeler_cfg.yml
@@ -0,0 +1,42 @@
+#
+# 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.
+#
+
+BSP:
+  - changed-files:
+  - any-glob-to-any-file: hw/bsp/**
+
+CI:
+  - changed-files:
+  - any-glob-to-any-file: .github/workflows/**
+
+Dialog:
+  - changed-files:
+  - any-glob-to-any-file: ['hw/mcu/dialog/**, hw/bsp/dialog*/**']
+
+Nordic:
+  - changed-files:
+  - any-glob-to-any-file: ['hw/mcu/nordic/**', 'hw/bsp/nordic*/**']
+
+STM:
+  - changed-files:
+  - any-glob-to-any-file: ['hw/mcu/stm/**', 'hw/bsp/stm*/**', 
'hw/bsp/nucleo*/**']
+
+USB:
+  - changed-files:
+  - any-glob-to-any-file: hw/usb/**
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
new file mode 100644
index 0..c084f29d8
--- /dev/null
+++ b/.github/workflows/labeler.yml
@@ -0,0 +1,45 @@
+#
+# 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.
+#
+
+name: "Pull Request Labeler"
+on:
+  - pull_request_target
+
+jobs:
+  labeler:
+permissions:
+  contents: read
+  pull-requests: write
+  issues: write
+runs-on: ubuntu-latest
+steps:
+  - name: Checkout repository
+uses: actions/checkout@v3
+
+  - name: Assign labels based on paths
+uses: actions/labeler@v5
+with:
+  sync-labels: true
+  configuration-path: .github/labeler_cfg.yml
+
+  - name: Assign labels based on the PR's size
+uses: codelytv/pr-size-labeler@v1.10.0
+with:
+  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+  ignore_file_deletions: true



(mynewt-nimble) branch master updated: ci: Fix `Check ports syscfg update` workflow

2024-07-24 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
 new a9400d70 ci: Fix `Check ports syscfg update` workflow
a9400d70 is described below

commit a9400d707b04c3cc8ae5d526d8b9f76c57c9408b
Author: Wojciech Pietraszewski 
AuthorDate: Mon Jul 22 17:29:56 2024 +0200

ci: Fix `Check ports syscfg update` workflow

Amends incorrect relative path to the LICENSE_TEMPLATE file.
---
 porting/update_generated_files.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/porting/update_generated_files.sh 
b/porting/update_generated_files.sh
index 94f1808a..e5104b63 100755
--- a/porting/update_generated_files.sh
+++ b/porting/update_generated_files.sh
@@ -42,5 +42,5 @@ for target in "${!targets[@]}"; do
 find "${targets[$target]}/include" -type f -name 'syscfg.h' -exec sed -i 
'/MYNEWT_VAL_REPO_*/,/#endif/d' {} \;
 find "${targets[$target]}/include" -type f -name 'syscfg.h' -exec sed -i 
-E ':a;N;$!ba;s:/\*([^*]|(\*+([^*/])))*\*+/::g' {} \;
 find "${targets[$target]}/include" -type f -name 'syscfg.h' -exec sed -i 
'$!N;/^\n$/{$q;D;};P;D;' {} \;
-find "${targets[$target]}/include" -type f -name 'syscfg.h' -exec sh -c 
'cat "$0" "$1" > "$1.tmp" && mv "$1.tmp" "$1"' "../.github/LICENSE_TEMPLATE" {} 
\;
+find "${targets[$target]}/include" -type f -name 'syscfg.h' -exec sh -c 
'cat "$0" "$1" > "$1.tmp" && mv "$1.tmp" "$1"' 
"repos/apache-mynewt-nimble/.github/LICENSE_TEMPLATE" {} \;
 done



(mynewt-nimble) branch master updated: porting: Update ports syscfg

2024-07-22 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
 new 9b8368b5 porting: Update ports syscfg
9b8368b5 is described below

commit 9b8368b5807b8101b1380c1605f77d6e56832381
Author: sjanc <10303625+sj...@users.noreply.github.com>
AuthorDate: Mon Jul 22 14:10:55 2024 +

porting: Update ports syscfg
---
 porting/examples/linux/include/syscfg/syscfg.h |  82 +--
 .../examples/linux_blemesh/include/syscfg/syscfg.h | 109 +---
 porting/examples/nuttx/include/syscfg/syscfg.h |  84 +---
 porting/nimble/include/syscfg/syscfg.h |  79 +--
 porting/npl/riot/include/syscfg/syscfg.h   | 554 -
 5 files changed, 522 insertions(+), 386 deletions(-)

diff --git a/porting/examples/linux/include/syscfg/syscfg.h 
b/porting/examples/linux/include/syscfg/syscfg.h
index 3c62cc3c..07d3945c 100644
--- a/porting/examples/linux/include/syscfg/syscfg.h
+++ b/porting/examples/linux/include/syscfg/syscfg.h
@@ -1,21 +1,28 @@
-/**
- * This file was generated by Apache newt version: 1.12.0
+/*
+ * 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 H_MYNEWT_SYSCFG_
 #define H_MYNEWT_SYSCFG_
 
-/**
- * This macro exists to ensure code includes this header when needed.  If code
- * checks the existence of a setting directly via ifdef without including this
- * header, the setting macro will silently evaluate to 0.  In contrast, an
- * attempt to use these macros without including this header will result in a
- * compiler error.
- */
 #define MYNEWT_VAL(_name)   MYNEWT_VAL_ ## _name
 #define MYNEWT_VAL_CHOICE(_name, _val)  MYNEWT_VAL_ ## _name ## __ ## 
_val
 
-/*** @apache-mynewt-core/crypto/tinycrypt */
 #ifndef MYNEWT_VAL_TINYCRYPT_SYSINIT_STAGE
 #define MYNEWT_VAL_TINYCRYPT_SYSINIT_STAGE (200)
 #endif
@@ -28,12 +35,10 @@
 #define MYNEWT_VAL_TINYCRYPT_UECC_RNG_USE_TRNG (0)
 #endif
 
-/*** @apache-mynewt-core/hw/bsp/native */
 #ifndef MYNEWT_VAL_BSP_SIMULATED
 #define MYNEWT_VAL_BSP_SIMULATED (1)
 #endif
 
-/*** @apache-mynewt-core/hw/hal */
 #ifndef MYNEWT_VAL_HAL_ENABLE_SOFTWARE_BREAKPOINTS
 #define MYNEWT_VAL_HAL_ENABLE_SOFTWARE_BREAKPOINTS (1)
 #endif
@@ -62,7 +67,6 @@
 #define MYNEWT_VAL_HAL_SYSTEM_RESET_CB (0)
 #endif
 
-/*** @apache-mynewt-core/hw/mcu/native */
 #ifndef MYNEWT_VAL_I2C_0
 #define MYNEWT_VAL_I2C_0 (0)
 #endif
@@ -95,7 +99,6 @@
 #define MYNEWT_VAL_MCU_UART_POLLER_PRIO (1)
 #endif
 
-/*** @apache-mynewt-core/kernel/os */
 #ifndef MYNEWT_VAL_FLOAT_USER
 #define MYNEWT_VAL_FLOAT_USER (0)
 #endif
@@ -152,7 +155,6 @@
 #define MYNEWT_VAL_OS_CPUTIME_TIMER_NUM (0)
 #endif
 
-/* Overridden by @apache-mynewt-core/hw/bsp/native (defined by 
@apache-mynewt-core/kernel/os) */
 #ifndef MYNEWT_VAL_OS_CRASH_FILE_LINE
 #define MYNEWT_VAL_OS_CRASH_FILE_LINE (1)
 #endif
@@ -197,7 +199,6 @@
 #define MYNEWT_VAL_OS_IDLE_TICKLESS_MS_MAX (60)
 #endif
 
-/* Overridden by @apache-mynewt-core/hw/bsp/native (defined by 
@apache-mynewt-core/kernel/os) */
 #ifndef MYNEWT_VAL_OS_IDLE_TICKLESS_MS_MIN
 #define MYNEWT_VAL_OS_IDLE_TICKLESS_MS_MIN (1)
 #endif
@@ -266,7 +267,6 @@
 #define MYNEWT_VAL_OS_TASK_RUN_TIME_CPUTIME (0)
 #endif
 
-/* Overridden by @apache-mynewt-core/hw/mcu/native (defined by 
@apache-mynewt-core/kernel/os) */
 #ifndef MYNEWT_VAL_OS_TICKS_PER_SEC
 #define MYNEWT_VAL_OS_TICKS_PER_SEC (100)
 #endif
@@ -287,7 +287,6 @@
 #define MYNEWT_VAL_WATCHDOG_INTERVAL (3)
 #endif
 
-/*** @apache-mynewt-core/net/ip/native_sockets */
 #ifndef MYNEWT_VAL_NATIVE_SOCKETS_MAX
 #define MYNEWT_VAL_NATIVE_SOCKETS_MAX (8)
 #endif
@@ -314,7 +313,6 @@
 #define MYNEWT_VAL_NATIVE_SOCKETS_SYSINIT_STAGE (200)
 #endif
 
-/*** @apache-mynewt-core/sys/console/stub */
 #ifndef MYNEWT_VAL_CONSOLE_UART_BAUD
 #define MYNEWT_VAL_CONSOLE_UART_BAUD (115200)
 #endif
@@ -327,7 +325,6 @@
 #define MYNEWT_VAL_CONSOLE_UART_FLOW_CONTROL (UART_FLOW_CTL_NONE)
 #endif
 
-/*** @apache-mynewt-core/sys/flash_map */
 #ifndef MYNEWT_VAL_FLASH_MAP_MAX_AREAS
 #define MYNEWT_VAL_FLASH_MAP_MAX_AREAS (10)
 #endif
@@

(mynewt-nimble) branch update-ports-syscfg deleted (was d4f3a9a1)

2024-07-22 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a change to branch update-ports-syscfg
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


 was d4f3a9a1 porting: Update ports syscfg

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



(mynewt-nimble) branch master updated: ci: Add PR labeler

2024-07-22 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
 new 85610441 ci: Add PR labeler
85610441 is described below

commit 8561044141fcbfcf56375c3c2f5aa25a9c9ad47a
Author: Wojciech Pietraszewski 
AuthorDate: Thu Jul 4 15:06:52 2024 +0200

ci: Add PR labeler

Adds a new workflow for adding labels to Pull Requests.
The labels are based on the paths of changed files.
---
 .github/labeler_cfg.yml   | 26 ++
 .github/workflows/labeler.yml | 38 ++
 2 files changed, 64 insertions(+)

diff --git a/.github/labeler_cfg.yml b/.github/labeler_cfg.yml
new file mode 100644
index ..cc4f6abb
--- /dev/null
+++ b/.github/labeler_cfg.yml
@@ -0,0 +1,26 @@
+#
+# 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.
+#
+
+host:
+  - changed-files:
+  - any-glob-to-any-file: nimble/host/**
+
+controller:
+  - changed-files:
+  - any-glob-to-any-file: nimble/controller/**
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
new file mode 100644
index ..7c2d296d
--- /dev/null
+++ b/.github/workflows/labeler.yml
@@ -0,0 +1,38 @@
+#
+# 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.
+#
+
+name: "Pull Request Labeler"
+on:
+  - pull_request
+
+jobs:
+  labeler:
+permissions:
+  contents: read
+  pull-requests: write
+runs-on: ubuntu-latest
+steps:
+  - name: Checkout repository
+uses: actions/checkout@v3
+
+  - name: Assign labels based on paths
+uses: actions/labeler@v5
+with:
+  sync-labels: true
+  configuration-path: .github/labeler_cfg.yml



(mynewt-core) branch master updated: kernel/os_time: Update doxygen comments in the header file

2024-07-10 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
 new 416ee1e8b kernel/os_time: Update doxygen comments in the header file
416ee1e8b is described below

commit 416ee1e8b64c88c785af86f59cbbc39c0ed2f961
Author: Wojciech Pietraszewski 
AuthorDate: Mon Jul 1 18:12:06 2024 +0200

kernel/os_time: Update doxygen comments in the header file

Amends/adds the documentation for macros, functions and structures.
Adjusts the formatting for better readability.
---
 kernel/os/include/os/os_time.h | 150 +
 1 file changed, 122 insertions(+), 28 deletions(-)

diff --git a/kernel/os/include/os/os_time.h b/kernel/os/include/os/os_time.h
index 8d425234c..0e557cb7e 100644
--- a/kernel/os/include/os/os_time.h
+++ b/kernel/os/include/os/os_time.h
@@ -70,10 +70,12 @@ extern "C" {
 #endif
 
 #ifndef UINT32_MAX
+/** Maximum value of 32-bit unsigned integer. */
 #define UINT32_MAX  0xU
 #endif
 
 #ifndef INT32_MAX
+/** Maximum value of 32-bit signed integer. */
 #define INT32_MAX   0x7FFF
 #endif
 
@@ -87,26 +89,33 @@ extern "C" {
 #endif
 #endif
 
-typedef uint32_t os_time_t;
+/** Signed 32-bit system time type definition. */
 typedef int32_t os_stime_t;
+
+/** Unsigned 32-bit system time type definition. */
+typedef uint32_t os_time_t;
+
+/** Maximum value for os_time_t. */
 #define OS_TIME_MAX UINT32_MAX
+
+/** Maximum value for os_stime_t. */
 #define OS_STIME_MAX INT32_MAX
 
-/* Used to wait forever for events and mutexs */
+/** Used to wait forever for events and mutexs */
 #define OS_TIMEOUT_NEVER(OS_TIME_MAX)
 
 
 /**
  * Get the current OS time in ticks
  *
- * @return OS time in ticks
+ * @return  OS time in ticks
  */
 os_time_t os_time_get(void);
 
 /**
  * Move OS time forward ticks.
  *
- * @param ticks The number of ticks to move time forward.
+ * @param ticks The number of ticks to move time forward.
  */
 void os_time_advance(int ticks);
 
@@ -114,35 +123,111 @@ void os_time_advance(int ticks);
  * Puts the current task to sleep for the specified number of os ticks. There
  * is no delay if ticks is 0.
  *
- * @param osticks Number of ticks to delay (0 means no delay).
+ * @param osticks   Number of ticks to delay (0 means no delay).
  */
 void os_time_delay(os_time_t osticks);
 
+/**
+ * @defgroup OSTime_cmp_macros Helper macros for time comparisons
+ * @{
+ */
+
+/**
+ * Checks if time tick __t1 is less than time tick __t2.
+ *
+ * @param __t1  The first time tick to compare.
+ * @param __t2  The second time tick to compare.
+ *
+ * @return  True if __t1 is less than __t2;
+ *  false otherwise.
+ */
 #define OS_TIME_TICK_LT(__t1, __t2) ((os_stime_t) ((__t1) - (__t2)) < 0)
+
+/**
+ * Checks if time tick __t1 is greater than time tick __t2.
+ *
+ * @param __t1  The first time tick to compare.
+ * @param __t2  The second time tick to compare.
+ *
+ * @return  True if __t1 is greater than __t2;
+ *  false otherwise.
+ */
 #define OS_TIME_TICK_GT(__t1, __t2) ((os_stime_t) ((__t1) - (__t2)) > 0)
+
+/**
+ * Checks if time tick __t1 is greater than or equal to time tick __t2.
+ *
+ * @param __t1  The first time tick to compare.
+ * @param __t2  The second time tick to compare.
+ *
+ * @return  True if __t1 is greater than or equal to __t2;
+ *  false otherwise.
+ */
 #define OS_TIME_TICK_GEQ(__t1, __t2) ((os_stime_t) ((__t1) - (__t2)) >= 0)
 
+/**
+ * Checks if timeval __t1 is less than timeval __t2.
+ *
+ * @param __t1  The first timeval to compare.
+ * @param __t2  The second timeval to compare.
+ *
+ * @return  True if __t1 is less than __t2;
+ *  false otherwise.
+ */
 #define OS_TIMEVAL_LT(__t1, __t2) \
 (((__t1).tv_sec < (__t2).tv_sec) || \
  (((__t1).tv_sec == (__t2).tv_sec) && ((__t1).tv_usec < (__t2).tv_usec)))
+
+/**
+ * Checks if timeval __t1 is less than or equal to timeval __t2.
+ *
+ * @param __t1  The first timeval to compare.
+ * @param __t2  The second timeval to compare.
+ *
+ * @return  True if __t1 is less than or equal to __t2;
+ *  false otherwise.
+ */
 #define OS_TIMEVAL_LEQ(__t1, __t2) \
 (((__t1).tv_sec < (__t2).tv_sec) || \
  (((__t1).tv_sec == (__t2).tv_sec) && ((__t1).tv_usec <= (__t2).tv_usec)))
+
+/**
+ * Checks if timeval __t1 is greater than timeval __t2.
+ *
+ * @param __t1  The first timeva

(mynewt-core) 03/03: kernel/os_sanity: Remove doxygen comments from the source file

2024-07-05 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 9c19ed2233ee77c17f0e793fab9e4d20666af2e4
Author: Wojciech Pietraszewski 
AuthorDate: Mon Jul 1 11:33:29 2024 +0200

kernel/os_sanity: Remove doxygen comments from the source file

Moves documentation entries to the header file.
---
 kernel/os/include/os/os_sanity.h | 7 +++
 kernel/os/src/os_sanity.c| 6 --
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/kernel/os/include/os/os_sanity.h b/kernel/os/include/os/os_sanity.h
index 70dee04ad..71b18622c 100644
--- a/kernel/os/include/os/os_sanity.h
+++ b/kernel/os/include/os/os_sanity.h
@@ -75,6 +75,13 @@ struct os_sanity_check {
 
 /** @cond INTERNAL_HIDDEN */
 int os_sanity_init(void);
+
+/**
+ * Called from the IDLE task context, every MYNEWT_VAL(SANITY_INTERVAL) msecs.
+ *
+ * Goes through the sanity check list, and performs sanity checks.  If any of
+ * these checks failed, or tasks have not checked in, it resets the processor.
+ */
 void os_sanity_run(void);
 /** @endcond */
 
diff --git a/kernel/os/src/os_sanity.c b/kernel/os/src/os_sanity.c
index 1bec7ff8d..6a2003208 100644
--- a/kernel/os/src/os_sanity.c
+++ b/kernel/os/src/os_sanity.c
@@ -147,12 +147,6 @@ err:
 return (rc);
 }
 
-/*
- * Called from the IDLE task context, every MYNEWT_VAL(SANITY_INTERVAL) msecs.
- *
- * Goes through the sanity check list, and performs sanity checks.  If any of
- * these checks failed, or tasks have not checked in, it resets the processor.
- */
 void
 os_sanity_run(void)
 {



(mynewt-core) branch master updated (7adb4ad6e -> 9c19ed223)

2024-07-05 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


from 7adb4ad6e kernel/os_mempool: Update doxygen comments in the header file
 new e7565f450 kernel/os_sanity: Add parameter names
 new 72d6f62da kernel/os_sanity: Update doxygen comments in the header file
 new 9c19ed223 kernel/os_sanity: Remove doxygen comments from the source 
file

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:
 kernel/os/include/os/os_sanity.h | 58 
 kernel/os/src/os_sanity.c|  6 -
 2 files changed, 41 insertions(+), 23 deletions(-)



(mynewt-core) 01/03: kernel/os_sanity: Add parameter names

2024-07-05 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit e7565f4504b39fd700f2212f515014e199d42d29
Author: Wojciech Pietraszewski 
AuthorDate: Mon Jul 1 11:20:31 2024 +0200

kernel/os_sanity: Add parameter names

Adds missing parameter names to function declarations
---
 kernel/os/include/os/os_sanity.h | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/kernel/os/include/os/os_sanity.h b/kernel/os/include/os/os_sanity.h
index 1dd248564..928ea0127 100644
--- a/kernel/os/include/os/os_sanity.h
+++ b/kernel/os/include/os/os_sanity.h
@@ -38,7 +38,7 @@ extern "C" {
 #endif
 
 struct os_sanity_check;
-typedef int (*os_sanity_check_func_t)(struct os_sanity_check *, void *);
+typedef int (*os_sanity_check_func_t)(struct os_sanity_check *osc, void *arg);
 
 struct os_sanity_check {
 /** Time this check last ran successfully. */
@@ -73,7 +73,7 @@ struct os_task;
  *
  * @return 0 on success, error code on failure
  */
-int os_sanity_task_checkin(struct os_task *);
+int os_sanity_task_checkin(struct os_task *t);
 
 /**
  * Initialize a sanity check
@@ -82,7 +82,7 @@ int os_sanity_task_checkin(struct os_task *);
  *
  * @return 0 on success, error code on failure.
  */
-int os_sanity_check_init(struct os_sanity_check *);
+int os_sanity_check_init(struct os_sanity_check *sc);
 
 /**
  * Register a sanity check
@@ -91,7 +91,7 @@ int os_sanity_check_init(struct os_sanity_check *);
  *
  * @return 0 on success, error code on failure
  */
-int os_sanity_check_register(struct os_sanity_check *);
+int os_sanity_check_register(struct os_sanity_check *sc);
 
 /**
  * Reset the os sanity check, so that it doesn't trip up the
@@ -101,7 +101,7 @@ int os_sanity_check_register(struct os_sanity_check *);
  *
  * @return 0 on success, error code on failure
  */
-int os_sanity_check_reset(struct os_sanity_check *);
+int os_sanity_check_reset(struct os_sanity_check *sc);
 
 #ifdef __cplusplus
 }



(mynewt-core) 02/03: kernel/os_sanity: Update doxygen comments in the header file

2024-07-05 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 72d6f62dab73698927b5322dcd64fcc118639060
Author: Wojciech Pietraszewski 
AuthorDate: Mon Jul 1 11:28:07 2024 +0200

kernel/os_sanity: Update doxygen comments in the header file

Amends the documentation for functions and structures.
Adjusts the formatting for better readability.
---
 kernel/os/include/os/os_sanity.h | 41 
 1 file changed, 29 insertions(+), 12 deletions(-)

diff --git a/kernel/os/include/os/os_sanity.h b/kernel/os/include/os/os_sanity.h
index 928ea0127..70dee04ad 100644
--- a/kernel/os/include/os/os_sanity.h
+++ b/kernel/os/include/os/os_sanity.h
@@ -40,6 +40,18 @@ extern "C" {
 struct os_sanity_check;
 typedef int (*os_sanity_check_func_t)(struct os_sanity_check *osc, void *arg);
 
+/**
+ * Sanity check callback function.
+ *
+ * @param osc   Pointer to the sanity check structure.
+ * @param arg   Argument passed to the callback.
+ *
+ * @return  0 on success;
+ *  non-zero error code on failure
+ */
+typedef int (*os_sanity_check_func_t)(struct os_sanity_check *osc, void *arg);
+
+/** Structure representing a sanity check. */
 struct os_sanity_check {
 /** Time this check last ran successfully. */
 os_time_t sc_checkin_last;
@@ -50,10 +62,12 @@ struct os_sanity_check {
 /** Argument to pass to sanity check */
 void *sc_arg;
 
+/** Next sanity check in the list. */
 SLIST_ENTRY(os_sanity_check) sc_next;
 
 };
 
+/** Set the function, argument, and checkin interval for a sanity check. */
 #define OS_SANITY_CHECK_SETFUNC(__sc, __f, __arg, __itvl)  \
 (__sc)->sc_func = (__f);   \
 (__sc)->sc_arg = (__arg);  \
@@ -69,37 +83,40 @@ struct os_task;
 /**
  * Provide a "task checkin" for the sanity task.
  *
- * @param t The task to check in
+ * @param t The task to check in
  *
- * @return 0 on success, error code on failure
+ * @return  0 on success;
+ *  non-zero error code on failure
  */
 int os_sanity_task_checkin(struct os_task *t);
 
 /**
- * Initialize a sanity check
+ * Initialize a sanity check.
  *
- * @param sc The sanity check to initialize
+ * @param scThe sanity check to initialize
  *
- * @return 0 on success, error code on failure.
+ * @return  0 on success;
+ *  non-zero error code on failure
  */
 int os_sanity_check_init(struct os_sanity_check *sc);
 
 /**
- * Register a sanity check
+ * Register a sanity check.
  *
- * @param sc The sanity check to register
+ * @param scThe sanity check to register
  *
- * @return 0 on success, error code on failure
+ * @return  0 on success;
+ *  non-zero error code on failure
  */
 int os_sanity_check_register(struct os_sanity_check *sc);
 
 /**
- * Reset the os sanity check, so that it doesn't trip up the
- * sanity timer.
+ * Reset the os sanity check, so that it doesn't trip up the sanity timer.
  *
- * @param sc The sanity check to reset
+ * @param scThe sanity check to reset
  *
- * @return 0 on success, error code on failure
+ * @return  0 on success;
+ *  non-zero error code on failure
  */
 int os_sanity_check_reset(struct os_sanity_check *sc);
 



(mynewt-core) 01/02: kernel/os_mempool: Add parameter names

2024-07-05 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit fa2b45d76acd1a6d129aaece8eac1aa134e73efa
Author: Wojciech Pietraszewski 
AuthorDate: Fri Jun 28 13:57:00 2024 +0200

kernel/os_mempool: Add parameter names

Adds missing parameter names to function declarations
---
 kernel/os/include/os/os_mempool.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/os/include/os/os_mempool.h 
b/kernel/os/include/os/os_mempool.h
index d5cf018de..71aa41877 100644
--- a/kernel/os/include/os/os_mempool.h
+++ b/kernel/os/include/os/os_mempool.h
@@ -139,8 +139,8 @@ struct os_mempool_info {
  * @return The next memory pool in the list to get information about, or NULL
  * when at the last memory pool.
  */
-struct os_mempool *os_mempool_info_get_next(struct os_mempool *,
-struct os_mempool_info *);
+struct os_mempool *os_mempool_info_get_next(struct os_mempool *mp,
+struct os_mempool_info *omi);
 
 /**
  * Get information system memory pool by name.



(mynewt-core) branch master updated (869218ffd -> 7adb4ad6e)

2024-07-05 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


from 869218ffd flash_test: Add flash area access support
 new fa2b45d76 kernel/os_mempool: Add parameter names
 new 7adb4ad6e kernel/os_mempool: Update doxygen comments in the header file

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:
 kernel/os/include/os/os_mempool.h | 92 +++
 1 file changed, 55 insertions(+), 37 deletions(-)



(mynewt-core) 02/02: kernel/os_mempool: Update doxygen comments in the header file

2024-07-05 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 7adb4ad6e6fbfdebd7a0543497363ce5e79e4fa3
Author: Wojciech Pietraszewski 
AuthorDate: Fri Jun 28 16:07:11 2024 +0200

kernel/os_mempool: Update doxygen comments in the header file

Amends the documentation for functions and structures.
Adjusts the formatting for better readability.
---
 kernel/os/include/os/os_mempool.h | 90 +++
 1 file changed, 54 insertions(+), 36 deletions(-)

diff --git a/kernel/os/include/os/os_mempool.h 
b/kernel/os/include/os/os_mempool.h
index 71aa41877..d4c3313a3 100644
--- a/kernel/os/include/os/os_mempool.h
+++ b/kernel/os/include/os/os_mempool.h
@@ -43,6 +43,7 @@ extern "C" {
  * caller.
  */
 struct os_memblock {
+/** Next memory block in the list. */
 SLIST_ENTRY(os_memblock) mb_next;
 };
 
@@ -67,7 +68,9 @@ struct os_mempool {
 uint8_t mp_flags;
 /** Address of memory buffer used by pool */
 uintptr_t mp_membuf_addr;
+/** Next memory pool in the list. */
 STAILQ_ENTRY(os_mempool) mp_list;
+/** Head of the list of memory blocks. */
 SLIST_HEAD(,os_memblock);
 /** Name for memory block */
 char *name;
@@ -102,14 +105,19 @@ struct os_mempool_ext;
 typedef os_error_t os_mempool_put_fn(struct os_mempool_ext *ome, void *data,
  void *arg);
 
+/** Extended memory pool. */
 struct os_mempool_ext {
+/** Standard memory pool. */
 struct os_mempool mpe_mp;
 
-/* Callback that is executed immediately when a block is freed. */
+/** Callback that is executed immediately when a block is freed. */
 os_mempool_put_fn *mpe_put_cb;
+
+/** Optional argument passed to the callback function. */
 void *mpe_put_arg;
 };
 
+/** Length of the name of memory pool */
 #define OS_MEMPOOL_INFO_NAME_LEN (32)
 
 /**
@@ -132,24 +140,27 @@ struct os_mempool_info {
 /**
  * Get information about the next system memory pool.
  *
- * @param mempool The current memory pool, or NULL if starting iteration.
- * @param infoA pointer to the structure to return memory pool information
- *into.
+ * @param mpThe current memory pool, or NULL if starting
+ *  iteration.
+ * @param omi   A pointer to the structure to return memory 
pool
+ *  information into.
  *
- * @return The next memory pool in the list to get information about, or NULL
- * when at the last memory pool.
+ * @return  The next memory pool in the list to get
+ *  information about;
+ *  NULL when at the last memory pool.
  */
 struct os_mempool *os_mempool_info_get_next(struct os_mempool *mp,
-struct os_mempool_info *omi);
+struct os_mempool_info *omi);
 
 /**
  * Get information system memory pool by name.
  *
- * @param mempool_name The name of mempool.
- * @param info A pointer to the structure to return memory pool 
information
- * into, can be NULL.
+ * @param mempool_name  The name of mempool.
+ * @param info  A pointer to the structure to return memory 
pool
+ *  information into, can be NULL.
  *
- * @return The memory pool found, or NULL when there is no such memory pool.
+ * @return  The memory pool found;
+ *  NULL when there is no such memory pool.
  */
 struct os_mempool *os_mempool_get(const char *mempool_name,
   struct os_mempool_info *info);
@@ -160,11 +171,10 @@ struct os_mempool *os_mempool_get(const char 
*mempool_name,
  * the memory pool.
  */
 #if MYNEWT_VAL(OS_MEMPOOL_GUARD)
-/*
- * Leave extra 4 bytes of guard area at the end.
- */
+/** Leave extra 4 bytes of guard area at the end. */
 #define OS_MEMPOOL_BLOCK_SZ(sz) ((sz) + sizeof(os_membuf_t))
 #else
+/** Size of a memory pool block. */
 #define OS_MEMPOOL_BLOCK_SZ(sz) (sz)
 #endif
 #if (OS_ALIGNMENT == 4)
@@ -176,6 +186,8 @@ typedef __uint128_t os_membuf_t;
 #else
 #error "Unhandled `OS_ALIGNMENT` for `os_membuf_t`"
 #endif /* OS_ALIGNMENT == * */
+
+/** The total size of a memory pool, including alignment. */
 #define OS_MEMPOOL_SIZE(n,blksize)  (((OS_MEMPOOL_BLOCK_SZ(blksize) + 
((OS_ALIGNMENT)-1)) / (OS_ALIGNMENT)) * (n))
 
 /** Calculates the number of bytes required to initialize a memory pool. */
@@ -185,13 +197,14 @@ typedef __uint128_t os_membuf_t;
 /**
  * Initialize a memory pool.
  *
- * @param mpPointer to a pointer to a mempool
- * @param blocksThe number of blocks in the pool
- * @param blocks_size   The size of the block, in bytes.
- * @param membufPointer 

(mynewt-core) branch master updated (6c6be194b -> 9bd0f022f)

2024-07-03 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


from 6c6be194b kernel/os_cfg: Remove unused header file
 add edefdeb2f kernel/os_task: Add parameter names
 add 9bd0f022f kernel/os_task: Update doxygen comments in the header file

No new revisions were added by this update.

Summary of changes:
 kernel/os/include/os/os_task.h | 103 -
 1 file changed, 70 insertions(+), 33 deletions(-)



(mynewt-core) branch master updated: kernel/os_cfg: Remove unused header file

2024-07-03 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
 new 6c6be194b kernel/os_cfg: Remove unused header file
6c6be194b is described below

commit 6c6be194b444fb11c74887de69be92da9804fa77
Author: Wojciech Pietraszewski 
AuthorDate: Wed Jul 3 13:16:52 2024 +0200

kernel/os_cfg: Remove unused header file

Removes `os_cfg.h` as it does not contain any actual code or configuration 
settings.
---
 kernel/os/include/os/os.h |  1 -
 kernel/os/include/os/os_cfg.h | 33 -
 2 files changed, 34 deletions(-)

diff --git a/kernel/os/include/os/os.h b/kernel/os/include/os/os.h
index b55888643..79c8fd798 100644
--- a/kernel/os/include/os/os.h
+++ b/kernel/os/include/os/os.h
@@ -121,7 +121,6 @@ void os_system_reset(void);
 
 #include "os/endian.h"
 #include "os/os_callout.h"
-#include "os/os_cfg.h"
 #include "os/os_cputime.h"
 #include "os/os_dev.h"
 #include "os/os_error.h"
diff --git a/kernel/os/include/os/os_cfg.h b/kernel/os/include/os/os_cfg.h
deleted file mode 100644
index 15f43d541..0
--- a/kernel/os/include/os/os_cfg.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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 _OS_CFG_H_
-#define _OS_CFG_H_ 
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _OS_CFG_H_ */



(mynewt-core) branch master updated (0b2a79cb3 -> d9d679b37)

2024-06-28 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


from 0b2a79cb3 kernel/os_callout: Remove doxygen comments from the source 
file
 new 000e4acc0 kernel/os_dev: Add parameter names
 new d9d679b37 kernel/os_dev: Update doxygen comments in the header file

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:
 kernel/os/include/os/os_dev.h | 170 --
 kernel/os/src/os_dev.c|   3 +-
 2 files changed, 118 insertions(+), 55 deletions(-)



(mynewt-core) 01/02: kernel/os_dev: Add parameter names

2024-06-28 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 000e4acc0ff139dcad77900f3527168133ca34e2
Author: Wojciech Pietraszewski 
AuthorDate: Wed Jun 26 13:29:24 2024 +0200

kernel/os_dev: Add parameter names

Adds missing parameter names to function declarations
---
 kernel/os/include/os/os_dev.h | 19 ++-
 kernel/os/src/os_dev.c|  3 ++-
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/kernel/os/include/os/os_dev.h b/kernel/os/include/os/os_dev.h
index 3abc44f14..18689a24d 100644
--- a/kernel/os/include/os/os_dev.h
+++ b/kernel/os/include/os/os_dev.h
@@ -80,13 +80,13 @@ struct os_dev;
  *
  * @return 0 on success, non-zero error code on failure.
  */
-typedef int (*os_dev_init_func_t)(struct os_dev *, void *);
+typedef int (*os_dev_init_func_t)(struct os_dev *dev, void *arg);
 
-typedef int (*os_dev_open_func_t)(struct os_dev *, uint32_t,
-void *);
-typedef int (*os_dev_suspend_func_t)(struct os_dev *, os_time_t, int);
-typedef int (*os_dev_resume_func_t)(struct os_dev *);
-typedef int (*os_dev_close_func_t)(struct os_dev *);
+typedef int (*os_dev_open_func_t)(struct os_dev *dev, uint32_t timo, void 
*arg);
+typedef int (*os_dev_suspend_func_t)(struct os_dev *dev, os_time_t suspend_t,
+ int force);
+typedef int (*os_dev_resume_func_t)(struct os_dev *dev);
+typedef int (*os_dev_close_func_t)(struct os_dev *dev);
 
 /**
  * Device handlers, implementers of device drivers should fill these
@@ -204,7 +204,7 @@ struct os_dev *os_dev_lookup(const char *name);
  *
  * @return 0 on success, non-zero on failure.
  */
-int os_dev_initialize_all(uint8_t);
+int os_dev_initialize_all(uint8_t stage);
 
 
 /**
@@ -216,7 +216,7 @@ int os_dev_initialize_all(uint8_t);
  * @return 0 on success, or a non-zero error code if one of the devices
  *   returned it.
  */
-int os_dev_suspend_all(os_time_t, uint8_t);
+int os_dev_suspend_all(os_time_t suspend_t, uint8_t force);
 
 /**
  * Resume all the devices that were suspended.
@@ -259,7 +259,8 @@ void os_dev_reset(void);
  * @param walk_func Function to call
  * @aparm arg   Argument to pass to walk_func
  */
-void os_dev_walk(int (*walk_func)(struct os_dev *, void *), void *arg);
+void os_dev_walk(int (*walk_func)(struct os_dev *walk_func_dev,
+ void *walk_func_arg), void *arg);
 
 #ifdef __cplusplus
 }
diff --git a/kernel/os/src/os_dev.c b/kernel/os/src/os_dev.c
index 3260d63fd..017c7773d 100644
--- a/kernel/os/src/os_dev.c
+++ b/kernel/os/src/os_dev.c
@@ -332,7 +332,8 @@ os_dev_reset(void)
 }
 
 void
-os_dev_walk(int (*walk_func)(struct os_dev *, void *), void *arg)
+os_dev_walk(int (*walk_func)(struct os_dev *walk_func_dev, void 
*walk_func_arg),
+void *arg)
 {
 struct os_dev *dev;
 



(mynewt-core) 02/02: kernel/os_dev: Update doxygen comments in the header file

2024-06-28 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit d9d679b376b4beb5de6823c248727d681c71f55a
Author: Wojciech Pietraszewski 
AuthorDate: Wed Jun 26 15:57:17 2024 +0200

kernel/os_dev: Update doxygen comments in the header file

Adds missing documentation for functions and callbacks.
Adjusts the formatting for better readability.
---
 kernel/os/include/os/os_dev.h | 151 +-
 1 file changed, 106 insertions(+), 45 deletions(-)

diff --git a/kernel/os/include/os/os_dev.h b/kernel/os/include/os/os_dev.h
index 18689a24d..2d35ba11f 100644
--- a/kernel/os/include/os/os_dev.h
+++ b/kernel/os/include/os/os_dev.h
@@ -37,12 +37,13 @@ extern "C" {
 
 struct os_dev;
 
-/*
- * Initialization order, defines when a device should be initialized
- * by the Mynewt kernel.
- *
+/**
+ * @defgroup OSDevice_init_order Initialization order
+ * Defines when a device should be initialized by the Mynewt kernel.
+ * @{
  */
-/* Primary is initialized during OS init, after the initialization
+
+/** Primary is initialized during OS init, after the initialization
  * of OS memory and architecture specific functions, but before the
  * OS gets started.
  */
@@ -58,8 +59,16 @@ struct os_dev;
  */
 #define OS_DEV_INIT_F_CRITICAL (1 << 0)
 
+/** Default priority for device initialization. */
 #define OS_DEV_INIT_PRIO_DEFAULT (0xff)
 
+/** @} */
+
+/**
+ * @defgroup OSDevice_status_flags Status flags
+ * @{
+ */
+
 /** Device is initialized, and ready to be accessed. */
 #define OS_DEV_F_STATUS_READY (1 << 0)
 /** Device is open */
@@ -72,20 +81,63 @@ struct os_dev;
  */
 #define OS_DEV_F_INIT_CRITICAL(1 << 3)
 
+/** @} */
+
 /**
  * Initialize a device.
  *
- * @param dev The device to initialize.
- * @param arg User defined argument to pass to the device initalization
+ * @param dev   The device to initialize.
+ * @param arg   User defined argument to pass to the device
+ *  initialization.
  *
- * @return 0 on success, non-zero error code on failure.
+ * @return  0 on success;
+ *  non-zero error code on failure.
  */
 typedef int (*os_dev_init_func_t)(struct os_dev *dev, void *arg);
 
+/**
+ * Open a device.
+ *
+ * @param dev   The device to open.
+ * @param timo  The timeout to open the device.
+ * @param arg   User defined argument to pass to the device
+ *  open callback.
+ *
+ * @return  0 on success;
+ *  non-zero error code on failure.
+ */
 typedef int (*os_dev_open_func_t)(struct os_dev *dev, uint32_t timo, void 
*arg);
+
+/**
+ * Suspend a device.
+ *
+ * @param dev   The device to suspend.
+ * @param suspend_t Specifies when the device should be suspended.
+ * @param force Whether to force the suspend operation.
+ *
+ * @return  0 on success;
+ *  non-zero error code on failure.
+ */
 typedef int (*os_dev_suspend_func_t)(struct os_dev *dev, os_time_t suspend_t,
  int force);
+/**
+ * Resume a device.
+ *
+ * @param dev   The device to resume.
+ *
+ * @return  0 on success;
+ *  non-zero error code on failure.
+ */
 typedef int (*os_dev_resume_func_t)(struct os_dev *dev);
+
+/**
+ * Close a device.
+ *
+ * @param dev   The device to close.
+ *
+ * @return  0 on success;
+ *  non-zero error code on failure.
+ */
 typedef int (*os_dev_close_func_t)(struct os_dev *dev);
 
 /**
@@ -116,9 +168,7 @@ struct os_dev_handlers {
 os_dev_close_func_t od_close;
 };
 
-/*
- * Device structure.
- */
+/** Device structure. */
 struct os_dev {
 /** Device handlers.  Implementation of base device functions. */
 struct os_dev_handlers od_handlers;
@@ -139,9 +189,11 @@ struct os_dev {
 uint8_t od_flags;
 /** Device name */
 const char *od_name;
+/** Next device in the list. */
 STAILQ_ENTRY(os_dev) od_next;
 };
 
+/** Set the open and close handlers for a device. */
 #define OS_DEV_SETHANDLERS(__dev, __open, __close)  \
 (__dev)->od_handlers.od_open = (__open);\
 (__dev)->od_handlers.od_close = (__close);
@@ -150,37 +202,40 @@ struct os_dev {
 /**
  * Suspend the operation of the device.
  *
- * @param dev The device to suspend.
- * @param suspend_t When the device should be suspended.
- * @param force Whether not the suspend operation can be overridden by the
- *device handler.
+ * @param dev   The device to suspend.
+ * @param suspend_t W

(mynewt-nimble) branch master updated: ci: Update `Check ports syscfg update` workflow

2024-06-28 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
 new cbe729b0 ci: Update `Check ports syscfg update` workflow
cbe729b0 is described below

commit cbe729b00a1913020ae4cbe6700046ee1813f91d
Author: Wojciech Pietraszewski 
AuthorDate: Thu Jun 27 15:18:05 2024 +0200

ci: Update `Check ports syscfg update` workflow

Updates run conditions, so that the action will not be triggered on forks.
Changes cron schedule to avoid conflicts with other jobs.
---
 .github/workflows/ports_syscfg_check.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/ports_syscfg_check.yml 
b/.github/workflows/ports_syscfg_check.yml
index e49dedc3..0b8c6aa6 100644
--- a/.github/workflows/ports_syscfg_check.yml
+++ b/.github/workflows/ports_syscfg_check.yml
@@ -24,7 +24,7 @@ on:
 branches:
   - 'master'
   schedule:
-- cron: '0 0 * * *'
+- cron: '37 21 * * *'
 
 jobs:
   targets:
@@ -33,6 +33,7 @@ jobs:
 permissions:
   contents: write
   pull-requests: write
+if: github.event.repository.fork == false
 steps:
   - uses: actions/checkout@v3
   - uses: actions/setup-go@v3



(mynewt-core) 03/03: kernel/os_callout: Remove doxygen comments from the source file

2024-06-28 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 0b2a79cb35f30530123ce054c25a4ca019bbef94
Author: Wojciech Pietraszewski 
AuthorDate: Thu Jun 27 16:20:30 2024 +0200

kernel/os_callout: Remove doxygen comments from the source file

Moves documentation entries to the header file.
---
 kernel/os/include/os/os_callout.h | 15 +++
 kernel/os/src/os_callout.c| 14 --
 2 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/kernel/os/include/os/os_callout.h 
b/kernel/os/include/os/os_callout.h
index 2002de734..cd65a75ff 100644
--- a/kernel/os/include/os/os_callout.h
+++ b/kernel/os/include/os/os_callout.h
@@ -128,7 +128,22 @@ os_callout_queued(struct os_callout *c)
  * @cond INTERNAL_HIDDEN
  */
 
+/**
+ * This function is called by the OS in the time tick. It searches the list
+ * of callouts, and sees if any of them are ready to run. If they are ready
+ * to run, it posts an event for each callout that's ready to run,
+ * to the event queue provided to os_callout_init().
+ */
 void os_callout_tick(void);
+
+/**
+ * Returns the number of ticks to the first pending callout. If there are no
+ * pending callouts then return OS_TIMEOUT_NEVER instead.
+ *
+ * @param now   The time now
+ *
+ * @return  Number of ticks to first pending callout
+ */
 os_time_t os_callout_wakeup_ticks(os_time_t now);
 
 /**
diff --git a/kernel/os/src/os_callout.c b/kernel/os/src/os_callout.c
index 0526a4c91..18d4db6f7 100644
--- a/kernel/os/src/os_callout.c
+++ b/kernel/os/src/os_callout.c
@@ -114,12 +114,6 @@ err:
 }
 
 
-/**
- * This function is called by the OS in the time tick.  It searches the list
- * of callouts, and sees if any of them are ready to run.  If they are ready
- * to run, it posts an event for each callout that's ready to run,
- * to the event queue provided to os_callout_init().
- */
 void
 os_callout_tick(void)
 {
@@ -158,14 +152,6 @@ os_callout_tick(void)
 os_trace_api_ret(OS_TRACE_ID_CALLOUT_TICK);
 }
 
-/*
- * Returns the number of ticks to the first pending callout. If there are no
- * pending callouts then return OS_TIMEOUT_NEVER instead.
- *
- * @param now The time now
- *
- * @return Number of ticks to first pending callout
- */
 os_time_t
 os_callout_wakeup_ticks(os_time_t now)
 {



(mynewt-core) branch master updated (c102ed4a0 -> 0b2a79cb3)

2024-06-28 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


from c102ed4a0 kernel/os_cputime: Remove doxygen comments from the source 
file
 new 09d893657 kernel/os_callout: Add parameter names
 new 09519726c kernel/os_callout: Update doxygen comments in the header file
 new 0b2a79cb3 kernel/os_callout: Remove doxygen comments from the source 
file

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:
 kernel/os/include/os/os_callout.h | 59 +--
 kernel/os/src/os_callout.c| 14 --
 2 files changed, 38 insertions(+), 35 deletions(-)



(mynewt-core) 02/03: kernel/os_callout: Update doxygen comments in the header file

2024-06-28 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 09519726c09e62f2026cf19c21e4af9785eedd41
Author: Wojciech Pietraszewski 
AuthorDate: Thu Jun 27 16:18:12 2024 +0200

kernel/os_callout: Update doxygen comments in the header file

Amends the documentation for functions and structures.
Adjusts the formatting for better readability.
---
 kernel/os/include/os/os_callout.h | 36 +++-
 1 file changed, 19 insertions(+), 17 deletions(-)

diff --git a/kernel/os/include/os/os_callout.h 
b/kernel/os/include/os/os_callout.h
index 946dcfba4..2002de734 100644
--- a/kernel/os/include/os/os_callout.h
+++ b/kernel/os/include/os/os_callout.h
@@ -46,7 +46,7 @@ struct os_callout {
 /** Number of ticks in the future to expire the callout */
 os_time_t c_ticks;
 
-
+/** Next callout in the list */
 TAILQ_ENTRY(os_callout) c_next;
 };
 
@@ -69,13 +69,13 @@ TAILQ_HEAD(os_callout_list, os_callout);
  * queue specified in os_callout_init().  The event argument given here
  * is posted in the ev_arg field of that event.
  *
- * @param c The callout to initialize
- * @param evq The event queue to post an OS_EVENT_T_TIMER event to
- * @param timo_func The function to call on this callout for the host task
- *  used to provide multiple timer events to a task
- *  (this can be NULL.)
- * @param ev_arg The argument to provide to the event when posting the
- *   timer.
+ * @param c The callout to initialize
+ * @param evq   The event queue to post an OS_EVENT_T_TIMER event 
to
+ * @param ev_cb The function to call on this callout for the host
+ *  task used to provide multiple timer events to
+ *  a task (this can be NULL).
+ * @param ev_argThe argument to provide to the event when posting
+ *  the timer.
  */
 void os_callout_init(struct os_callout *c, struct os_eventq *evq,
  os_event_fn *ev_cb, void *ev_arg);
@@ -84,7 +84,7 @@ void os_callout_init(struct os_callout *c, struct os_eventq 
*evq,
 /**
  * Stop the callout from firing off, any pending events will be cleared.
  *
- * @param c The callout to stop
+ * @param c The callout to stop
  */
 void os_callout_stop(struct os_callout *c);
 
@@ -92,29 +92,31 @@ void os_callout_stop(struct os_callout *c);
 /**
  * Reset the callout to fire off in 'ticks' ticks.
  *
- * @param c The callout to reset
- * @param ticks The number of ticks to wait before posting an event
+ * @param c The callout to reset
+ * @param ticks The number of ticks to wait before posting an event
  *
- * @return 0 on success, non-zero on failure
+ * @return  0 on success;
+ *  non-zero on failure
  */
 int os_callout_reset(struct os_callout *c, os_time_t ticks);
 
 /**
  * Returns the number of ticks which remains to callout.
  *
- * @param c The callout to check
- * @param now The current time in OS ticks
+ * @param c The callout to check
+ * @param now   The current time in OS ticks
  *
- * @return Number of ticks to first pending callout
+ * @return  Number of ticks to first pending callout
  */
 os_time_t os_callout_remaining_ticks(struct os_callout *c, os_time_t now);
 
 /**
  * Returns whether the callout is pending or not.
  *
- * @param c The callout to check
+ * @param c The callout to check
  *
- * @return 1 if queued, 0 if not queued.
+ * @return  1 if queued;
+ *  0 if not queued.
  */
 static inline int
 os_callout_queued(struct os_callout *c)



(mynewt-core) 01/03: kernel/os_callout: Add parameter names

2024-06-28 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 09d893657dff3036f47b2f42e6248df9aeaed223
Author: Wojciech Pietraszewski 
AuthorDate: Thu Jun 27 15:48:17 2024 +0200

kernel/os_callout: Add parameter names

Adds missing parameter names to function declarations
---
 kernel/os/include/os/os_callout.h | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/os/include/os/os_callout.h 
b/kernel/os/include/os/os_callout.h
index b407f3f44..946dcfba4 100644
--- a/kernel/os/include/os/os_callout.h
+++ b/kernel/os/include/os/os_callout.h
@@ -77,7 +77,7 @@ TAILQ_HEAD(os_callout_list, os_callout);
  * @param ev_arg The argument to provide to the event when posting the
  *   timer.
  */
-void os_callout_init(struct os_callout *cf, struct os_eventq *evq,
+void os_callout_init(struct os_callout *c, struct os_eventq *evq,
  os_event_fn *ev_cb, void *ev_arg);
 
 
@@ -86,7 +86,7 @@ void os_callout_init(struct os_callout *cf, struct os_eventq 
*evq,
  *
  * @param c The callout to stop
  */
-void os_callout_stop(struct os_callout *);
+void os_callout_stop(struct os_callout *c);
 
 
 /**
@@ -97,7 +97,7 @@ void os_callout_stop(struct os_callout *);
  *
  * @return 0 on success, non-zero on failure
  */
-int os_callout_reset(struct os_callout *, os_time_t);
+int os_callout_reset(struct os_callout *c, os_time_t ticks);
 
 /**
  * Returns the number of ticks which remains to callout.
@@ -107,7 +107,7 @@ int os_callout_reset(struct os_callout *, os_time_t);
  *
  * @return Number of ticks to first pending callout
  */
-os_time_t os_callout_remaining_ticks(struct os_callout *, os_time_t);
+os_time_t os_callout_remaining_ticks(struct os_callout *c, os_time_t now);
 
 /**
  * Returns whether the callout is pending or not.



(mynewt-core) 01/02: kernel/os_cputime: Update doxygen comments in the header file

2024-06-27 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 3eba334c645f4630aa672c154c89868d95a1e6f1
Author: Wojciech Pietraszewski 
AuthorDate: Thu Jun 27 13:12:35 2024 +0200

kernel/os_cputime: Update doxygen comments in the header file

Amends the documentation for functions and structures.
Adjusts the formatting for better readability.
---
 kernel/os/include/os/os_cputime.h | 75 +++
 1 file changed, 44 insertions(+), 31 deletions(-)

diff --git a/kernel/os/include/os/os_cputime.h 
b/kernel/os/include/os/os_cputime.h
index a6565e766..947ef77aa 100644
--- a/kernel/os/include/os/os_cputime.h
+++ b/kernel/os/include/os/os_cputime.h
@@ -81,15 +81,20 @@ extern "C" {
 #endif
 
 #if defined(OS_CPUTIME_FREQ_HIGH)
-/* CPUTIME data. */
+/** CPUTIME data. */
 struct os_cputime_data
 {
-uint32_t ticks_per_usec;/* number of ticks per usec */
+/** Number of ticks per usec */
+uint32_t ticks_per_usec;
 };
+/** Global instance of CPUTIME data. */
 extern struct os_cputime_data g_os_cputime;
 #endif
 
-/* Helpful macros to compare cputimes */
+/**
+ * @defgroup OSCPUTime_cmp_macros Helper macros to compare cputimes
+ * @{
+ */
 /** evaluates to true if t1 is before t2 in time */
 #define CPUTIME_LT(__t1, __t2) ((int32_t)   ((__t1) - (__t2)) < 0)
 /** evaluates to true if t1 is after t2 in time */
@@ -99,21 +104,24 @@ extern struct os_cputime_data g_os_cputime;
 /** evaluates to true if t1 is on or before t2 in time */
 #define CPUTIME_LEQ(__t1, __t2) ((int32_t)  ((__t1) - (__t2)) <= 0)
 
+/** @} */
+
 /**
  * Initialize the cputime module. This must be called after os_init is called
  * and before any other timer API are used. This should be called only once
  * and should be called before the hardware timer is used.
  *
- * @param clock_freq The desired cputime frequency, in hertz (Hz).
+ * @param clock_freqThe desired cputime frequency, in hertz (Hz).
  *
- * @return int 0 on success; -1 on error.
+ * @return  0 on success;
+ *  -1 on error.
  */
 int os_cputime_init(uint32_t clock_freq);
 
 /**
  * Returns the low 32 bits of cputime.
  *
- * @return uint32_t The lower 32 bits of cputime
+ * @return  The lower 32 bits of cputime
  */
 uint32_t os_cputime_get32(void);
 
@@ -122,9 +130,9 @@ uint32_t os_cputime_get32(void);
  * Converts the given number of nanoseconds into cputime ticks.
  * Not defined if OS_CPUTIME_FREQ_PWR2 is defined.
  *
- * @param usecs The number of nanoseconds to convert to ticks
+ * @param nsecs The number of nanoseconds to convert to ticks
  *
- * @return uint32_t The number of ticks corresponding to 'nsecs'
+ * @return  The number of ticks corresponding to 'nsecs'
  */
 uint32_t os_cputime_nsecs_to_ticks(uint32_t nsecs);
 
@@ -132,9 +140,10 @@ uint32_t os_cputime_nsecs_to_ticks(uint32_t nsecs);
  * Convert the given number of ticks into nanoseconds.
  * Not defined if OS_CPUTIME_FREQ_PWR2 is defined.
  *
- * @param ticks The number of ticks to convert to nanoseconds.
+ * @param ticks The number of ticks to convert to nanoseconds.
  *
- * @return uint32_t The number of nanoseconds corresponding to 'ticks'
+ * @return  The number of nanoseconds corresponding to
+ *  'ticks'
  */
 uint32_t os_cputime_ticks_to_nsecs(uint32_t ticks);
 
@@ -143,7 +152,7 @@ uint32_t os_cputime_ticks_to_nsecs(uint32_t ticks);
  * Not defined if OS_CPUTIME_FREQ_PWR2 is defined.
  *
  *
- * @param nsecs The number of nanoseconds to wait.
+ * @param nsecs The number of nanoseconds to wait.
  */
 void os_cputime_delay_nsecs(uint32_t nsecs);
 #endif
@@ -167,18 +176,19 @@ os_cputime_ticks_to_usecs(uint32_t ticks)
 /**
  * Converts the given number of microseconds into cputime ticks.
  *
- * @param usecs The number of microseconds to convert to ticks
+ * @param usecs The number of microseconds to convert to ticks
  *
- * @return uint32_t The number of ticks corresponding to 'usecs'
+ * @return  The number of ticks corresponding to 'usecs'
  */
 uint32_t os_cputime_usecs_to_ticks(uint32_t usecs);
 
 /**
  * Convert the given number of ticks into microseconds.
  *
- * @param ticks The number of ticks to convert to microseconds.
+ * @param ticks The number of ticks to convert to microseconds.
  *
- * @return uint32_t The number of microseconds corresponding to 'ticks'
+ * @return  The number of microseconds corresponding to
+ *  'ticks'
  */
 uint32_t os_cputime_ticks_to_usecs(uint32_t ticks);
 #endif
@@ -186,23 +196,23 @@ uint32_t os_cputim

(mynewt-core) branch master updated (2ea3e72b4 -> c102ed4a0)

2024-06-27 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


from 2ea3e72b4 hw/mcu/nordic: Add common GPIO HAL for nRF MCUs
 new 3eba334c6 kernel/os_cputime: Update doxygen comments in the header file
 new c102ed4a0 kernel/os_cputime: Remove doxygen comments from the source 
file

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:
 kernel/os/include/os/os_cputime.h | 75 +++
 kernel/os/src/os_cputime.c|  5 ---
 2 files changed, 44 insertions(+), 36 deletions(-)



(mynewt-core) 02/02: kernel/os_cputime: Remove doxygen comments from the source file

2024-06-27 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit c102ed4a0d617255af050daf124f90cd9c7ae777
Author: Wojciech Pietraszewski 
AuthorDate: Thu Jun 27 13:13:59 2024 +0200

kernel/os_cputime: Remove doxygen comments from the source file

Removes redundant doxygen entry.
---
 kernel/os/src/os_cputime.c | 5 -
 1 file changed, 5 deletions(-)

diff --git a/kernel/os/src/os_cputime.c b/kernel/os/src/os_cputime.c
index e0476e365..5a1fa9859 100644
--- a/kernel/os/src/os_cputime.c
+++ b/kernel/os/src/os_cputime.c
@@ -39,11 +39,6 @@ os_cputime_init(uint32_t clock_freq)
 return rc;
 }
 
-/**
- * Wait until the number of ticks has elapsed. This is a blocking delay.
- *
- * @param ticks The number of ticks to wait.
- */
 void
 os_cputime_delay_ticks(uint32_t ticks)
 {



(mynewt-core) branch master updated: hw/mcu/nordic: Add common GPIO HAL for nRF MCUs

2024-06-27 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
 new 2ea3e72b4 hw/mcu/nordic: Add common GPIO HAL for nRF MCUs
2ea3e72b4 is described below

commit 2ea3e72b414f43467ecfda15fd10c13894041a4e
Author: Michal Gorecki 
AuthorDate: Wed Jun 12 11:40:44 2024 +0200

hw/mcu/nordic: Add common GPIO HAL for nRF MCUs

Common HAL package will be extended in the future
to provide common HAL API for other peripherals.
This also makes GPIO HAL use the API provided by nrfx,
instead of using MCUs registers directly.
---
 hw/mcu/nordic/nrf51xxx/include/mcu/nrf51_hal.h |  14 +-
 hw/mcu/nordic/nrf51xxx/pkg.yml |   3 +-
 hw/mcu/nordic/nrf51xxx/src/hal_gpio.c  | 351 -
 hw/mcu/nordic/nrf52xxx/include/mcu/nrf52_hal.h |  14 +-
 hw/mcu/nordic/nrf52xxx/pkg.yml |   3 +-
 hw/mcu/nordic/nrf5340/include/mcu/nrf5340_hal.h|  15 +-
 hw/mcu/nordic/nrf5340/pkg.yml  |   3 +-
 hw/mcu/nordic/nrf5340/src/hal_gpio.c   | 544 
 .../nrf5340_net/include/mcu/nrf5340_net_hal.h  |  15 +-
 hw/mcu/nordic/nrf5340_net/pkg.yml  |   3 +-
 hw/mcu/nordic/nrf5340_net/src/hal_gpio.c   | 544 
 hw/mcu/nordic/nrf91xx/include/mcu/nrf91_hal.h  |  14 +-
 hw/mcu/nordic/nrf91xx/pkg.yml  |   3 +-
 hw/mcu/nordic/nrf91xx/src/hal_gpio.c   | 562 -
 .../nrf51_hal.h => nrf_common/include/nrf_hal.h}   |  31 +-
 hw/mcu/nordic/{nrf51xxx => nrf_common}/pkg.yml |  24 +-
 .../nordic/{nrf52xxx => nrf_common}/src/hal_gpio.c | 179 ++-
 17 files changed, 71 insertions(+), 2251 deletions(-)

diff --git a/hw/mcu/nordic/nrf51xxx/include/mcu/nrf51_hal.h 
b/hw/mcu/nordic/nrf51xxx/include/mcu/nrf51_hal.h
index 2d88fa3d2..50b4abeb7 100644
--- a/hw/mcu/nordic/nrf51xxx/include/mcu/nrf51_hal.h
+++ b/hw/mcu/nordic/nrf51xxx/include/mcu/nrf51_hal.h
@@ -24,19 +24,7 @@
  extern "C" {
 #endif
 
-/* Helper functions to enable/disable interrupts. */
-#define __HAL_DISABLE_INTERRUPTS(x) \
-do {\
-x = __get_PRIMASK();\
-__disable_irq();\
-} while(0);
-
-#define __HAL_ENABLE_INTERRUPTS(x)  \
-do {\
-if (!x) {   \
-__enable_irq(); \
-}   \
-} while(0);
+#include "nrf_hal.h"
 
 struct nrf51_uart_cfg {
 int8_t suc_pin_tx;  /* pins for IO */
diff --git a/hw/mcu/nordic/nrf51xxx/pkg.yml b/hw/mcu/nordic/nrf51xxx/pkg.yml
index 9c77756ba..ca001456d 100644
--- a/hw/mcu/nordic/nrf51xxx/pkg.yml
+++ b/hw/mcu/nordic/nrf51xxx/pkg.yml
@@ -27,8 +27,7 @@ pkg.keywords:
 
 pkg.deps:
 - "@apache-mynewt-core/hw/mcu/nordic"
-- "@apache-mynewt-core/hw/cmsis-core"
-- "@apache-mynewt-core/hw/hal"
+- "@apache-mynewt-core/hw/mcu/nordic/nrf_common"
 
 pkg.ign_files.'!MCU_COMMON_STARTUP || SPLIT_LOADER':
 - gcc_startup_cm0.s
diff --git a/hw/mcu/nordic/nrf51xxx/src/hal_gpio.c 
b/hw/mcu/nordic/nrf51xxx/src/hal_gpio.c
deleted file mode 100644
index 29edbc90f..0
--- a/hw/mcu/nordic/nrf51xxx/src/hal_gpio.c
+++ /dev/null
@@ -1,351 +0,0 @@
-/*
- * 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.
- */
-
-#include "hal/hal_gpio.h"
-#include "mcu/cmsis_nvic.h"
-#include "nrf51.h"
-#include "nrf51_bitfields.h"
-#include 
-
-/* XXX:
- * 1) The code probably does not handle "re-purposing" gpio very well.
- * "Re-purposing" means changing a gpio from input to output, or calling
- * gpio_init_in and expecting previously enabled interrupts to be stopped.
- *
- */
-
-/* GPIO pin ma

(mynewt-core) branch master updated (a09610139 -> c0c9e1eae)

2024-06-26 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


from a09610139 sys/log_fcb: Relax write alignment restriction
 new 0441681f5 kernel/os_sched: Add parameter names
 new c0c9e1eae kernel/os_sched: Update doxygen comments in the header file

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:
 kernel/os/include/os/os_sched.h | 118 ++--
 kernel/os/src/os_sched.c|  95 
 2 files changed, 102 insertions(+), 111 deletions(-)



(mynewt-core) 01/02: kernel/os_sched: Add parameter names

2024-06-26 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 0441681f5fa085420070fc5c39caa733eaa6a866
Author: Wojciech Pietraszewski 
AuthorDate: Wed Jun 26 10:13:23 2024 +0200

kernel/os_sched: Add parameter names

Adds missing parameter names to functions prototypes
---
 kernel/os/include/os/os_sched.h | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/kernel/os/include/os/os_sched.h b/kernel/os/include/os/os_sched.h
index f1c9073c6..a4c1d86f3 100644
--- a/kernel/os/include/os/os_sched.h
+++ b/kernel/os/include/os/os_sched.h
@@ -43,7 +43,7 @@ extern struct os_task *g_current_task;
 extern struct os_task_list g_os_run_list;
 extern struct os_task_list g_os_sleep_list;
 
-void os_sched_ctx_sw_hook(struct os_task *);
+void os_sched_ctx_sw_hook(struct os_task *next_t);
 
 /** @endcond */
 
@@ -54,7 +54,7 @@ void os_sched_ctx_sw_hook(struct os_task *);
  * @return The currently running task.
  */
 struct os_task *os_sched_get_current_task(void);
-void os_sched_set_current_task(struct os_task *);
+void os_sched_set_current_task(struct os_task *t);
 struct os_task *os_sched_next_task(void);
 
 /**
@@ -111,15 +111,15 @@ int os_sched_resume(void);
  * }
  * @endcode
  */
-void os_sched(struct os_task *);
+void os_sched(struct os_task *next_t);
 
 /** @cond INTERNAL_HIDDEN */
 void os_sched_os_timer_exp(void);
-os_error_t os_sched_insert(struct os_task *);
-int os_sched_sleep(struct os_task *, os_time_t nticks);
-int os_sched_wakeup(struct os_task *);
-int os_sched_remove(struct os_task *);
-void os_sched_resort(struct os_task *);
+os_error_t os_sched_insert(struct os_task *t);
+int os_sched_sleep(struct os_task *t, os_time_t nticks);
+int os_sched_wakeup(struct os_task *t);
+int os_sched_remove(struct os_task *t);
+void os_sched_resort(struct os_task *t);
 os_time_t os_sched_wakeup_ticks(os_time_t now);
 
 /** @endcond */



(mynewt-core) 02/02: kernel/os_sched: Update doxygen comments in the header file

2024-06-26 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit c0c9e1eaea229755d89846ee17f8b9ea82b83e5b
Author: Wojciech Pietraszewski 
AuthorDate: Wed Jun 26 11:14:32 2024 +0200

kernel/os_sched: Update doxygen comments in the header file

Adds missing documentation for functions and removes it from the source 
file.
Adjusts the formatting for better readability.
---
 kernel/os/include/os/os_sched.h | 102 
 kernel/os/src/os_sched.c|  95 -
 2 files changed, 94 insertions(+), 103 deletions(-)

diff --git a/kernel/os/include/os/os_sched.h b/kernel/os/include/os/os_sched.h
index a4c1d86f3..2bc8cb1cc 100644
--- a/kernel/os/include/os/os_sched.h
+++ b/kernel/os/include/os/os_sched.h
@@ -51,10 +51,29 @@ void os_sched_ctx_sw_hook(struct os_task *next_t);
  * Returns the currently running task. Note that this task may or may not be
  * the highest priority task ready to run.
  *
- * @return The currently running task.
+ * @return  The currently running task.
  */
 struct os_task *os_sched_get_current_task(void);
+
+/**
+ * Sets the currently running task to 't'. Note that this function simply sets
+ * the global variable holding the currently running task. It does not perform
+ * a context switch or change the os run or sleep list.
+ *
+ * @param t Pointer to currently running task.
+ */
 void os_sched_set_current_task(struct os_task *t);
+
+/**
+ * Returns the task that we should be running. This is the task at the head
+ * of the run list.
+ *
+ * @noteIf you want to guarantee that the os run list
+ *  does not change after calling this 
function,
+ *  you have to call it with interrupts 
disabled.
+ *
+ * @return  The task at the head of the list
+ */
 struct os_task *os_sched_next_task(void);
 
 /**
@@ -73,9 +92,9 @@ void os_sched_suspend(void);
  * Resume task scheduling
  *
  * Resumes the scheduler after it was suspended with os_sched_suspend().
- * @returns 0 when scheduling resumed
- * @returns non-0 when scheduling is still locked and more calls
- *  to os_sched_resume() are needed
+ * @return  0 when scheduling resumed;
+ *  non-0 when scheduling is still locked and more
+ *  calls to os_sched_resume() are needed
  */
 int os_sched_resume(void);
 
@@ -87,11 +106,9 @@ int os_sched_resume(void);
  *
  * This function will call the architecture specific routine to swap in the 
new task.
  *
- * @param next_t Pointer to task which must run next (optional)
+ * @param next_tPointer to task which must run next (optional)
  *
- * @return n/a
- *
- * @note Interrupts must be disabled when calling this.
+ * @noteInterrupts must be disabled when calling this.
  *
  * @code{.c}
  * // example
@@ -114,12 +131,81 @@ int os_sched_resume(void);
 void os_sched(struct os_task *next_t);
 
 /** @cond INTERNAL_HIDDEN */
+
+/**
+ * Called when the OS tick timer expires. Search the sleep list for any tasks
+ * that need waking up. This occurs when the current OS time exceeds the next
+ * wakeup time stored in the task. Any tasks that need waking up will be
+ * removed from the sleep list and added to the run list.
+ */
 void os_sched_os_timer_exp(void);
+
+/**
+ * Insert a task into the scheduler list. This causes the task to be evaluated
+ * for running when os_sched is called.
+ *
+ * @param t Pointer to task to insert in run list
+ *
+ * @return  OS_OK: task was inserted into run list;
+ *  OS_EINVAL: Task was not in ready state.
+ */
 os_error_t os_sched_insert(struct os_task *t);
+
+/**
+ * Removes the task from the run list and puts it on the sleep list.
+ *
+ * @param t Task to put to sleep
+ * @param nticksNumber of ticks to put task to sleep
+ *
+ * @return  Zero on success
+ *
+ * @noteMust be called with interrupts disabled! This
+ *  function does not call the scheduler.
+ */
 int os_sched_sleep(struct os_task *t, os_time_t nticks);
+
+/**
+ * Called to wake up a task. Waking up a task consists of setting the task 
state
+ * to READY and moving it from the sleep list to the run list.
+ *
+ * @param t Pointer to task to wake up.
+ *
+ * @return  Zero on success
+ *
+ * @noteThis function must be called with interrupts
+ *  disabled.
+ */
 int os_sched_wakeup(struct os_task *t);
+
+/**
+ * @note This routine is currently experimental and not ready 

(mynewt-core) branch master updated: kernel/os_eventq: Update doxygen comments in the header file

2024-06-25 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
 new 959b1b753 kernel/os_eventq: Update doxygen comments in the header file
959b1b753 is described below

commit 959b1b753c4bbf968ab7c25fa191647a6e9cfef2
Author: Wojciech Pietraszewski 
AuthorDate: Tue Jun 25 17:40:29 2024 +0200

kernel/os_eventq: Update doxygen comments in the header file

Adds missing documentation for functions and structures.
Adjusts the formatting for better readability.
---
 kernel/os/include/os/os_eventq.h | 51 +---
 1 file changed, 32 insertions(+), 19 deletions(-)

diff --git a/kernel/os/include/os/os_eventq.h b/kernel/os/include/os/os_eventq.h
index b941a95e0..ad9d74619 100644
--- a/kernel/os/include/os/os_eventq.h
+++ b/kernel/os/include/os/os_eventq.h
@@ -38,6 +38,8 @@ extern "C" {
 #endif
 
 struct os_event;
+
+/** Callback function type for handling events. */
 typedef void os_event_fn(struct os_event *ev);
 
 /**
@@ -56,6 +58,7 @@ struct os_event {
 /** Argument to pass to the event queue callback. */
 void *ev_arg;
 
+/** Next event in the queue. */
 STAILQ_ENTRY(os_event) ev_next;
 };
 
@@ -78,6 +81,7 @@ struct os_eventq_mon {
 };
 #endif
 
+/** Structure representing an event queue. */
 struct os_eventq {
 /** Pointer to task that "owns" this event queue. */
 struct os_task *evq_owner;
@@ -87,6 +91,7 @@ struct os_eventq {
  */
 struct os_task *evq_task;
 
+/** Event queue list. */
 STAILQ_HEAD(, os_event) evq_list;
 
 #if MYNEWT_VAL(OS_EVENTQ_DEBUG)
@@ -102,30 +107,36 @@ struct os_eventq {
 /**
  * Initialize the event queue
  *
- * @param evq The event queue to initialize
+ * @param evq   The event queue to initialize
  */
-void os_eventq_init(struct os_eventq *);
+void os_eventq_init(struct os_eventq *evq);
 
 /**
  * Check whether the event queue is initialized.
  *
- * @param evq The event queue to check
+ * @param evq   The event queue to check
+ *
+ * @return  Non-zero if the event queue is initialized;
+ *  zero otherwise.
  */
 int os_eventq_inited(const struct os_eventq *evq);
 
 /**
  * Put an event on the event queue.
  *
- * @param evq The event queue to put an event on
- * @param ev The event to put on the queue
+ * @param evq   The event queue to put an event on
+ * @param evThe event to put on the queue
  */
-void os_eventq_put(struct os_eventq *, struct os_event *);
+void os_eventq_put(struct os_eventq *evq, struct os_event *ev);
 
 /**
  * Poll an event from the event queue and return it immediately.
  * If no event is available, don't block, just return NULL.
  *
- * @return Event from the queue, or NULL if none available.
+ * @param evq   The event queue to pull an event from
+ *
+ * @return  The event from the queue;
+ *  NULL if none available.
  */
 struct os_event *os_eventq_get_no_wait(struct os_eventq *evq);
 
@@ -133,17 +144,17 @@ struct os_event *os_eventq_get_no_wait(struct os_eventq 
*evq);
  * Pull a single item from an event queue.  This function blocks until there
  * is an item on the event queue to read.
  *
- * @param evq The event queue to pull an event from
+ * @param evq   The event queue to pull an event from
  *
- * @return The event from the queue
+ * @return  The event from the queue
  */
-struct os_event *os_eventq_get(struct os_eventq *);
+struct os_event *os_eventq_get(struct os_eventq *evq);
 
 /**
  * Pull a single item off the event queue and call it's event
  * callback.
  *
- * @param evq The event queue to pull the item off.
+ * @param evq   The event queue to pull the item off.
  */
 void os_eventq_run(struct os_eventq *evq);
 
@@ -154,21 +165,23 @@ void os_eventq_run(struct os_eventq *evq);
  * the queues.  Event queues are searched in the order that they
  * are passed in the array.
  *
- * @param evq Array of event queues
- * @param nevqs Number of event queues in evq
- * @param timo Timeout, forever if OS_WAIT_FOREVER is passed to poll.
+ * @param evq   Array of event queues
+ * @param nevqs Number of event queues in evq
+ * @param timo  Timeout, forever if OS_WAIT_FOREVER is passed 
to
+ *  poll.
  *
- * @return An event, or NULL if no events available
+ * @return  The first available event;
+ *  NULL if no events available
  */
-struct os_event *os_eventq_poll(struct os_eventq **, int, os_time_t);
+struct os_event *os_eventq_poll(struct os_eventq **evq, int nevqs, os_time_t 
timo);
 
 /**
  * 

(mynewt-core) branch master updated (8d9f4b4b0 -> 03b7eaab3)

2024-06-25 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


from 8d9f4b4b0  kernel/os_mutex: Update doxygen comments in the header file
 add 03b7eaab3 kernel/os_sem: Update doxygen comments in the header file

No new revisions were added by this update.

Summary of changes:
 kernel/os/include/os/os_sem.h | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)



(mynewt-core) branch master updated (820bcbc19 -> 8d9f4b4b0)

2024-06-25 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


from 820bcbc19 ci: check_style: Fix awk filter for nimble
 add 8d9f4b4b0  kernel/os_mutex: Update doxygen comments in the header file

No new revisions were added by this update.

Summary of changes:
 kernel/os/include/os/os_mutex.h | 2 ++
 1 file changed, 2 insertions(+)



(mynewt-newtmgr) branch master updated: ci: Add CodeQL Workflow for Code Security Analysis

2024-06-21 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newtmgr.git


The following commit(s) were added to refs/heads/master by this push:
 new 748f9d0  ci: Add CodeQL Workflow for Code Security Analysis
748f9d0 is described below

commit 748f9d074633267bf9c9e4e23fee979da89098c9
Author: Szymon Janc 
AuthorDate: Fri Jun 21 11:53:56 2024 +0200

ci: Add CodeQL Workflow for Code Security Analysis

This introduces a CodeQL workflow to enhance the security analysis of our 
repository.
---
 .github/workflows/codeql.yml | 93 
 1 file changed, 93 insertions(+)

diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
new file mode 100644
index 000..d151422
--- /dev/null
+++ b/.github/workflows/codeql.yml
@@ -0,0 +1,93 @@
+# For most projects, this workflow file will not need changing; you simply need
+# to commit it to your repository.
+#
+# You may wish to alter this file to override the set of languages analyzed,
+# or to provide custom queries or build logic.
+#
+#  NOTE 
+# We have attempted to detect the languages in your repository. Please check
+# the `language` matrix defined below to confirm you have the correct set of
+# supported CodeQL languages.
+#
+name: "CodeQL"
+
+on:
+  push:
+branches: [ "master" ]
+  pull_request:
+branches: [ "master" ]
+  schedule:
+- cron: '22 9 * * 2'
+
+jobs:
+  analyze:
+name: Analyze (${{ matrix.language }})
+# Runner size impacts CodeQL analysis time. To learn more, please see:
+#   - https://gh.io/recommended-hardware-resources-for-running-codeql
+#   - https://gh.io/supported-runners-and-hardware-resources
+#   - https://gh.io/using-larger-runners (GitHub.com only)
+# Consider using larger runners or machines with greater resources for 
possible analysis time improvements.
+runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 
'ubuntu-latest' }}
+timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
+permissions:
+  # required for all workflows
+  security-events: write
+
+  # required to fetch internal or private CodeQL packs
+  packages: read
+
+  # only required for workflows in private repositories
+  actions: read
+  contents: read
+
+strategy:
+  fail-fast: false
+  matrix:
+include:
+- language: go
+  build-mode: autobuild
+# CodeQL supports the following values keywords for 'language': 
'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 
'ruby', 'swift'
+# Use `c-cpp` to analyze code written in C, C++ or both
+# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
+# Use 'javascript-typescript' to analyze code written in JavaScript, 
TypeScript or both
+# To learn more about changing the languages that are analyzed or 
customizing the build mode for your analysis,
+# see 
https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
+# If you are analyzing a compiled language, you can modify the 
'build-mode' for that language to customize how
+# your codebase is analyzed, see 
https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
+steps:
+- name: Checkout repository
+  uses: actions/checkout@v4
+
+# Initializes the CodeQL tools for scanning.
+- name: Initialize CodeQL
+  uses: github/codeql-action/init@v3
+  with:
+languages: ${{ matrix.language }}
+build-mode: ${{ matrix.build-mode }}
+# If you wish to specify custom queries, you can do so here or in a 
config file.
+# By default, queries listed here will override any specified in a 
config file.
+# Prefix the list here with "+" to use these queries and those in the 
config file.
+
+# For more details on CodeQL's query packs, refer to: 
https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
+# queries: security-extended,security-and-quality
+
+# If the analyze step fails for one of the languages you are analyzing with
+# "We were unable to automatically build your code", modify the matrix 
above
+# to set the build mode to "manual" for that language. Then modify this 
step
+# to build your code.
+# ℹ️ Command-line programs to run usin

(mynewt-newt) branch master updated: ci: Add CodeQL Workflow for Code Security Analysis

2024-06-21 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newt.git


The following commit(s) were added to refs/heads/master by this push:
 new ce21d333 ci: Add CodeQL Workflow for Code Security Analysis
ce21d333 is described below

commit ce21d3332a7aa3f25e52eccc1463b5d6ccc29ccf
Author: Szymon Janc 
AuthorDate: Fri Jun 21 11:50:54 2024 +0200

ci: Add CodeQL Workflow for Code Security Analysis

This introduces a CodeQL workflow to enhance the security analysis of our 
repository.
---
 .github/workflows/codeql.yml | 93 
 1 file changed, 93 insertions(+)

diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
new file mode 100644
index ..da255198
--- /dev/null
+++ b/.github/workflows/codeql.yml
@@ -0,0 +1,93 @@
+# For most projects, this workflow file will not need changing; you simply need
+# to commit it to your repository.
+#
+# You may wish to alter this file to override the set of languages analyzed,
+# or to provide custom queries or build logic.
+#
+#  NOTE 
+# We have attempted to detect the languages in your repository. Please check
+# the `language` matrix defined below to confirm you have the correct set of
+# supported CodeQL languages.
+#
+name: "CodeQL"
+
+on:
+  push:
+branches: [ "master" ]
+  pull_request:
+branches: [ "master" ]
+  schedule:
+- cron: '27 1 * * 0'
+
+jobs:
+  analyze:
+name: Analyze (${{ matrix.language }})
+# Runner size impacts CodeQL analysis time. To learn more, please see:
+#   - https://gh.io/recommended-hardware-resources-for-running-codeql
+#   - https://gh.io/supported-runners-and-hardware-resources
+#   - https://gh.io/using-larger-runners (GitHub.com only)
+# Consider using larger runners or machines with greater resources for 
possible analysis time improvements.
+runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 
'ubuntu-latest' }}
+timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
+permissions:
+  # required for all workflows
+  security-events: write
+
+  # required to fetch internal or private CodeQL packs
+  packages: read
+
+  # only required for workflows in private repositories
+  actions: read
+  contents: read
+
+strategy:
+  fail-fast: false
+  matrix:
+include:
+- language: go
+  build-mode: autobuild
+# CodeQL supports the following values keywords for 'language': 
'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 
'ruby', 'swift'
+# Use `c-cpp` to analyze code written in C, C++ or both
+# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
+# Use 'javascript-typescript' to analyze code written in JavaScript, 
TypeScript or both
+# To learn more about changing the languages that are analyzed or 
customizing the build mode for your analysis,
+# see 
https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
+# If you are analyzing a compiled language, you can modify the 
'build-mode' for that language to customize how
+# your codebase is analyzed, see 
https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
+steps:
+- name: Checkout repository
+  uses: actions/checkout@v4
+
+# Initializes the CodeQL tools for scanning.
+- name: Initialize CodeQL
+  uses: github/codeql-action/init@v3
+  with:
+languages: ${{ matrix.language }}
+build-mode: ${{ matrix.build-mode }}
+# If you wish to specify custom queries, you can do so here or in a 
config file.
+# By default, queries listed here will override any specified in a 
config file.
+# Prefix the list here with "+" to use these queries and those in the 
config file.
+
+# For more details on CodeQL's query packs, refer to: 
https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
+# queries: security-extended,security-and-quality
+
+# If the analyze step fails for one of the languages you are analyzing with
+# "We were unable to automatically build your code", modify the matrix 
above
+# to set the build mode to "manual" for that language. Then modify this 
step
+# to build your code.
+# ℹ️ Command-line programs to run usin

(mynewt-nimble) branch master updated: ci: Fix `Check ports syscfg update` workflow

2024-06-21 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
 new dba49690 ci: Fix `Check ports syscfg update` workflow
dba49690 is described below

commit dba496900b2dc6bade7f859e21d9aba050fc4554
Author: Wojciech Pietraszewski 
AuthorDate: Fri Jun 21 10:35:42 2024 +0200

ci: Fix `Check ports syscfg update` workflow

Updates run conditions, so that the action will be triggered on every PR 
merge.
Additionally, adds a scheduled run once a day.
---
 .github/workflows/ports_syscfg_check.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/ports_syscfg_check.yml 
b/.github/workflows/ports_syscfg_check.yml
index 89ccd82e..e49dedc3 100644
--- a/.github/workflows/ports_syscfg_check.yml
+++ b/.github/workflows/ports_syscfg_check.yml
@@ -23,8 +23,8 @@ on:
   push:
 branches:
   - 'master'
-paths:
-  - '*/syscfg.h'
+  schedule:
+- cron: '0 0 * * *'
 
 jobs:
   targets:



(mynewt-nimble) branch master updated: nimble/transport/socket: Add ISO Tx transport support

2024-06-21 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
 new 263e5d4d nimble/transport/socket: Add ISO Tx transport support
263e5d4d is described below

commit 263e5d4d40f548292a1e3263a9bf7a19ca01e681
Author: Mariusz Skamra 
AuthorDate: Fri Apr 26 15:22:23 2024 +0200

nimble/transport/socket: Add ISO Tx transport support

Add support for sending ISO data on native.
---
 nimble/transport/socket/src/ble_hci_socket.c | 50 
 1 file changed, 50 insertions(+)

diff --git a/nimble/transport/socket/src/ble_hci_socket.c 
b/nimble/transport/socket/src/ble_hci_socket.c
index 41975cac..c0581c63 100644
--- a/nimble/transport/socket/src/ble_hci_socket.c
+++ b/nimble/transport/socket/src/ble_hci_socket.c
@@ -277,6 +277,50 @@ ble_hci_sock_acl_tx(struct os_mbuf *om)
 
 #if MYNEWT_VAL(BLE_SOCK_USE_LINUX_BLUE) || MYNEWT_VAL(BLE_SOCK_USE_TCP)
 static int
+ble_hci_sock_iso_tx(struct os_mbuf *om)
+{
+struct msghdr msg;
+struct iovec iov[8];
+int i;
+struct os_mbuf *m;
+uint8_t ch;
+
+memset(&msg, 0, sizeof(msg));
+memset(iov, 0, sizeof(iov));
+
+msg.msg_iov = iov;
+
+ch = BLE_HCI_UART_H4_ISO;
+iov[0].iov_len = 1;
+iov[0].iov_base = &ch;
+i = 1;
+for (m = om; m; m = SLIST_NEXT(m, om_next)) {
+iov[i].iov_base = m->om_data;
+iov[i].iov_len = m->om_len;
+i++;
+}
+msg.msg_iovlen = i;
+
+STATS_INC(hci_sock_stats, omsg);
+STATS_INC(hci_sock_stats, oiso);
+STATS_INCN(hci_sock_stats, obytes, OS_MBUF_PKTLEN(om) + 1);
+i = sendmsg(ble_hci_sock_state.sock, &msg, 0);
+os_mbuf_free_chain(om);
+if (i != OS_MBUF_PKTLEN(om) + 1) {
+if (i < 0) {
+dprintf(1, "sendmsg() failed : %d\n", errno);
+} else {
+dprintf(1, "sendmsg() partial write: %d\n", i);
+}
+STATS_INC(hci_sock_stats, oerr);
+return BLE_ERR_MEM_CAPACITY;
+}
+return 0;
+}
+#endif /* BLE_SOCK_USE_LINUX_BLUE */
+
+#if MYNEWT_VAL(BLE_SOCK_USE_LINUX_BLUE)
+static int
 ble_hci_sock_cmdevt_tx(uint8_t *hci_ev, uint8_t h4_type)
 {
 struct msghdr msg;
@@ -871,6 +915,12 @@ ble_hci_sock_init(void)
 SYSINIT_PANIC_ASSERT(rc == 0);
 }
 
+int
+ble_transport_to_ll_iso_impl(struct os_mbuf *om)
+{
+return ble_hci_sock_iso_tx(om);
+}
+
 void
 ble_transport_ll_init(void)
 {



(mynewt-core) 03/03: kernel/os_mbuf: Adjust doxygen comments

2024-06-20 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 5dced2655a028ef200a1bdde5e13182c7095b377
Author: Wojciech Pietraszewski 
AuthorDate: Thu Jun 20 17:03:37 2024 +0200

kernel/os_mbuf: Adjust doxygen comments

Adjusts formatting for better readability.
---
 kernel/os/include/os/os_mbuf.h | 129 -
 1 file changed, 75 insertions(+), 54 deletions(-)

diff --git a/kernel/os/include/os/os_mbuf.h b/kernel/os/include/os/os_mbuf.h
index 0ecb4e523..73fe477bd 100644
--- a/kernel/os/include/os/os_mbuf.h
+++ b/kernel/os/include/os/os_mbuf.h
@@ -130,14 +130,14 @@ struct os_mqueue {
 /**
  * Given a flag number, provide the mask for it
  *
- * @param __n The number of the flag in the mask
+ * @param __n   The number of the flag in the mask
  */
 #define OS_MBUF_F_MASK(__n) (1 << (__n))
 
 /**
  * Checks whether a given mbuf is a packet header mbuf
  *
- * @param __om The mbuf to check
+ * @param __om  The mbuf to check
  */
 #define OS_MBUF_IS_PKTHDR(__om) \
 ((__om)->om_pkthdr_len >= sizeof (struct os_mbuf_pkthdr))
@@ -159,8 +159,8 @@ struct os_mqueue {
 /**
  * Access the data of a mbuf, and cast it to type
  *
- * @param __om The mbuf to access, and cast
- * @param __type The type to cast it to
+ * @param __om  The mbuf to access, and cast
+ * @param __typeThe type to cast it to
  */
 #define OS_MBUF_DATA(__om, __type) \
  (__type) ((__om)->om_data)
@@ -212,9 +212,10 @@ _os_mbuf_leadingspace(struct os_mbuf *om)
  * Works on both packet header, and regular mbufs, as it accounts
  * for the additional space allocated to the packet header.
  *
- * @param __om  Is the mbuf in that pool to get the leadingspace for
+ * @param __om  The mbuf in that pool to get the leading
+ *  space for
  *
- * @return Amount of leading space available in the mbuf
+ * @return  Amount of leading space available in the mbuf
  */
 #define OS_MBUF_LEADINGSPACE(__om) _os_mbuf_leadingspace(__om)
 
@@ -239,9 +240,10 @@ _os_mbuf_trailingspace(struct os_mbuf *om)
  * Returns the trailing space (space at the end) of the mbuf.
  * Works on both packet header and regular mbufs.
  *
- * @param __om  Is the mbuf in that pool to get trailing space for
+ * @param __om  The mbuf in that pool to get the trailing
+ *  space for
  *
- * @return The amount of trailing space available in the mbuf
+ * @return  Amount of trailing space available in the mbuf
  */
 #define OS_MBUF_TRAILINGSPACE(__om) _os_mbuf_trailingspace(__om)
 
@@ -268,9 +270,10 @@ int os_mqueue_init(struct os_mqueue *mq, os_event_fn 
*ev_cb, void *arg);
 /**
  * Remove and return a single mbuf from the mbuf queue.  Does not block.
  *
- * @param mq The mbuf queue to pull an element off of.
+ * @param mqThe mbuf queue to pull an element off of.
  *
- * @return The next mbuf in the queue, or NULL if queue has no mbufs.
+ * @return  The next mbuf in the queue;
+ *  NULL if queue has no mbufs.
  */
 struct os_mbuf *os_mqueue_get(struct os_mqueue *mq);
 
@@ -284,7 +287,8 @@ struct os_mbuf *os_mqueue_get(struct os_mqueue *mq);
  *
  * @return 0 on success, non-zero on failure.
  */
-int os_mqueue_put(struct os_mqueue *mq, struct os_eventq *evq, struct os_mbuf 
*om);
+int os_mqueue_put(struct os_mqueue *mq, struct os_eventq *evq,
+  struct os_mbuf *om);
 
 /**
  * MSYS is a system level mbuf registry.  Allows the system to share
@@ -298,9 +302,10 @@ int os_mqueue_put(struct os_mqueue *mq, struct os_eventq 
*evq, struct os_mbuf *o
  * os_msys_register() registers a mbuf pool with MSYS, and allows MSYS to
  * allocate mbufs out of it.
  *
- * @param new_pool The pool to register with MSYS
+ * @param new_pool  The pool to register with MSYS
  *
- * @return 0 on success, non-zero on failure
+ * @return  0 on success;
+ *  non-zero on failure
  */
 int os_msys_register(struct os_mbuf_pool *new_pool);
 
@@ -308,10 +313,13 @@ int os_msys_register(struct os_mbuf_pool *new_pool);
  * Allocate a mbuf from msys.  Based upon the data size requested,
  * os_msys_get() will choose the mbuf pool that has the best fit.
  *
- * @param dsize The estimated size of the data being stored in the mbuf
- * @param leadingspace The amount of leadingspace to allocate in the mbuf
+ * @param dsize The estimated size of the data being stored in
+ *  the mbuf
+ * @param leadingspace  The amount of leadingspace to allocate in
+ *  the mbuf
  *
- * @return A freshly allocated mbuf on success, NULL on failu

(mynewt-core) 01/03: kernel/os_mbuf: Update doxygen comments in the header file

2024-06-20 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 434cefc9058a48bab7b2bc353bb2b24ad03204da
Author: Wojciech Pietraszewski 
AuthorDate: Thu Jun 20 14:53:55 2024 +0200

kernel/os_mbuf: Update doxygen comments in the header file

Adds missing macros and structures documentation.
Updates existing entries.
---
 kernel/os/include/os/os_mbuf.h | 29 +++--
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/kernel/os/include/os/os_mbuf.h b/kernel/os/include/os/os_mbuf.h
index 53a16c5d2..a6c869f28 100644
--- a/kernel/os/include/os/os_mbuf.h
+++ b/kernel/os/include/os/os_mbuf.h
@@ -54,6 +54,9 @@ struct os_mbuf_pool {
  */
 struct os_mempool *omp_pool;
 
+/**
+ * Next mbuf pool in the list
+ */
 STAILQ_ENTRY(os_mbuf_pool) omp_next;
 };
 
@@ -71,6 +74,9 @@ struct os_mbuf_pkthdr {
  */
 uint16_t omp_flags;
 
+/**
+ * Next mbuf packet header in the list
+ */
 STAILQ_ENTRY(os_mbuf_pkthdr) omp_next;
 };
 
@@ -100,6 +106,9 @@ struct os_mbuf {
  */
 struct os_mbuf_pool *om_omp;
 
+/**
+ * Next mbuf in the list
+ */
 SLIST_ENTRY(os_mbuf) om_next;
 
 /**
@@ -112,19 +121,20 @@ struct os_mbuf {
  * Structure representing a queue of mbufs.
  */
 struct os_mqueue {
+/** A queue of mbuf packet headers. */
 STAILQ_HEAD(, os_mbuf_pkthdr) mq_head;
 /** Event to post when new buffers are available on the queue. */
 struct os_event mq_ev;
 };
 
-/*
+/**
  * Given a flag number, provide the mask for it
  *
  * @param __n The number of the flag in the mask
  */
 #define OS_MBUF_F_MASK(__n) (1 << (__n))
 
-/*
+/**
  * Checks whether a given mbuf is a packet header mbuf
  *
  * @param __om The mbuf to check
@@ -202,7 +212,6 @@ _os_mbuf_leadingspace(struct os_mbuf *om)
  * Works on both packet header, and regular mbufs, as it accounts
  * for the additional space allocated to the packet header.
  *
- * @param __omp Is the mbuf pool (which contains packet header length.)
  * @param __om  Is the mbuf in that pool to get the leadingspace for
  *
  * @return Amount of leading space available in the mbuf
@@ -230,7 +239,6 @@ _os_mbuf_trailingspace(struct os_mbuf *om)
  * Returns the trailing space (space at the end) of the mbuf.
  * Works on both packet header and regular mbufs.
  *
- * @param __omp The mbuf pool for this mbuf
  * @param __om  Is the mbuf in that pool to get trailing space for
  *
  * @return The amount of trailing space available in the mbuf
@@ -272,7 +280,7 @@ struct os_mbuf *os_mqueue_get(struct os_mqueue *);
  *
  * @param mqThe mbuf queue to append the mbuf to.
  * @param evq   The event queue to post an event to.
- * @param m The mbuf to append to the mbuf queue.
+ * @param omThe mbuf to append to the mbuf queue.
  *
  * @return 0 on success, non-zero on failure.
  */
@@ -376,7 +384,6 @@ struct os_mbuf *os_mbuf_get_pkthdr(struct os_mbuf_pool *omp,
 /**
  * Duplicate a chain of mbufs.  Return the start of the duplicated chain.
  *
- * @param omp The mbuf pool to duplicate out of
  * @param om  The mbuf chain to duplicate
  *
  * @return A pointer to the new chain of mbufs
@@ -400,11 +407,11 @@ struct os_mbuf *os_mbuf_off(const struct os_mbuf *om, int 
off,
 uint16_t *out_off);
 
 
-/*
+/**
  * Copy data from an mbuf chain starting "off" bytes from the beginning,
  * continuing for "len" bytes, into the indicated buffer.
  *
- * @param m The mbuf chain to copy from
+ * @param om The mbuf chain to copy from
  * @param off The offset into the mbuf chain to begin copying from
  * @param len The length of the data to copy
  * @param dst The destination buffer to copy into
@@ -460,7 +467,6 @@ int os_mbuf_appendfrom(struct os_mbuf *dst, const struct 
os_mbuf *src,
 /**
  * Release a mbuf back to the pool
  *
- * @param omp The Mbuf pool to release back to
  * @param om  The Mbuf to release back to the pool
  *
  * @return 0 on success, -1 on failure
@@ -470,7 +476,6 @@ int os_mbuf_free(struct os_mbuf *mb);
 /**
  * Free a chain of mbufs
  *
- * @param omp The mbuf pool to free the chain of mbufs into
  * @param om  The starting mbuf of the chain to free back into the pool
  *
  * @return 0 on success, -1 on failure
@@ -536,7 +541,6 @@ int os_mbuf_cmpm(const struct os_mbuf *om1, uint16_t 
offset1,
  *
  * The specified mbuf chain does not need to contain a packet header.
  *
- * @param omp   The mbuf pool to allocate from.
  * @param omThe head of the mbuf chain.
  * @param len   The number of bytes to prepend.
  *
@@ -564,7 +568,6 @@ struct os_mbuf *os_mbuf_prepend_pullup(struct os_mbuf *om, 
uint16_t len);
  * it is extended as necessary.  If the destination mbuf contains a pac

(mynewt-core) 02/03: kernel/os_mbuf: Update function parameters names

2024-06-20 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 7759d4f8b72c40474902c32e886a54344d0d5751
Author: Wojciech Pietraszewski 
AuthorDate: Thu Jun 20 14:54:48 2024 +0200

kernel/os_mbuf: Update function parameters names

Adds missing variables names in function declarations.
Updates existing variables names in function definitions
 for improved consistency.
---
 kernel/os/include/os/os_mbuf.h | 27 +--
 kernel/os/src/os_mbuf.c| 42 +++---
 2 files changed, 36 insertions(+), 33 deletions(-)

diff --git a/kernel/os/include/os/os_mbuf.h b/kernel/os/include/os/os_mbuf.h
index a6c869f28..0ecb4e523 100644
--- a/kernel/os/include/os/os_mbuf.h
+++ b/kernel/os/include/os/os_mbuf.h
@@ -272,7 +272,7 @@ int os_mqueue_init(struct os_mqueue *mq, os_event_fn 
*ev_cb, void *arg);
  *
  * @return The next mbuf in the queue, or NULL if queue has no mbufs.
  */
-struct os_mbuf *os_mqueue_get(struct os_mqueue *);
+struct os_mbuf *os_mqueue_get(struct os_mqueue *mq);
 
 /**
  * Adds a packet (i.e. packet header mbuf) to an mqueue. The event associated
@@ -284,7 +284,7 @@ struct os_mbuf *os_mqueue_get(struct os_mqueue *);
  *
  * @return 0 on success, non-zero on failure.
  */
-int os_mqueue_put(struct os_mqueue *, struct os_eventq *, struct os_mbuf *);
+int os_mqueue_put(struct os_mqueue *mq, struct os_eventq *evq, struct os_mbuf 
*om);
 
 /**
  * MSYS is a system level mbuf registry.  Allows the system to share
@@ -302,7 +302,7 @@ int os_mqueue_put(struct os_mqueue *, struct os_eventq *, 
struct os_mbuf *);
  *
  * @return 0 on success, non-zero on failure
  */
-int os_msys_register(struct os_mbuf_pool *);
+int os_msys_register(struct os_mbuf_pool *new_pool);
 
 /**
  * Allocate a mbuf from msys.  Based upon the data size requested,
@@ -355,9 +355,8 @@ int os_msys_num_free(void);
  *
  * @return 0 on success, error code on failure.
  */
-int os_mbuf_pool_init(struct os_mbuf_pool *, struct os_mempool *mp,
-uint16_t, uint16_t);
-
+int os_mbuf_pool_init(struct os_mbuf_pool *omp, struct os_mempool *mp,
+  uint16_t buf_len, uint16_t nbufs);
 /**
  * Get an mbuf from the mbuf pool.  The mbuf is allocated, and initialized
  * prior to being returned.
@@ -368,7 +367,7 @@ int os_mbuf_pool_init(struct os_mbuf_pool *, struct 
os_mempool *mp,
  *
  * @return An initialized mbuf on success, and NULL on failure.
  */
-struct os_mbuf *os_mbuf_get(struct os_mbuf_pool *omp, uint16_t);
+struct os_mbuf *os_mbuf_get(struct os_mbuf_pool *omp, uint16_t leadingspace);
 
 /**
  * Allocate a new packet header mbuf out of the os_mbuf_pool.
@@ -379,7 +378,7 @@ struct os_mbuf *os_mbuf_get(struct os_mbuf_pool *omp, 
uint16_t);
  * @return A freshly allocated mbuf on success, NULL on failure.
  */
 struct os_mbuf *os_mbuf_get_pkthdr(struct os_mbuf_pool *omp,
-uint8_t pkthdr_len);
+uint8_t user_pkthdr_len);
 
 /**
  * Duplicate a chain of mbufs.  Return the start of the duplicated chain.
@@ -388,7 +387,7 @@ struct os_mbuf *os_mbuf_get_pkthdr(struct os_mbuf_pool *omp,
  *
  * @return A pointer to the new chain of mbufs
  */
-struct os_mbuf *os_mbuf_dup(struct os_mbuf *m);
+struct os_mbuf *os_mbuf_dup(struct os_mbuf *om);
 
 /**
  * Locates the specified absolute offset within an mbuf chain.  The offset
@@ -419,7 +418,7 @@ struct os_mbuf *os_mbuf_off(const struct os_mbuf *om, int 
off,
  * @return  0 on success;
  *  -1 if the mbuf does not contain enough data.
  */
-int os_mbuf_copydata(const struct os_mbuf *m, int off, int len, void *dst);
+int os_mbuf_copydata(const struct os_mbuf *om, int off, int len, void *dst);
 
 /**
  * @brief Calculates the length of an mbuf chain.
@@ -444,7 +443,7 @@ uint16_t os_mbuf_len(const struct os_mbuf *om);
  *
  * @return 0 on success, and an error code on failure
  */
-int os_mbuf_append(struct os_mbuf *m, const void *, uint16_t);
+int os_mbuf_append(struct os_mbuf *om, const void *data, uint16_t len);
 
 /**
  * Reads data from one mbuf and appends it to another.  On error, the specified
@@ -471,7 +470,7 @@ int os_mbuf_appendfrom(struct os_mbuf *dst, const struct 
os_mbuf *src,
  *
  * @return 0 on success, -1 on failure
  */
-int os_mbuf_free(struct os_mbuf *mb);
+int os_mbuf_free(struct os_mbuf *om);
 
 /**
  * Free a chain of mbufs
@@ -486,12 +485,12 @@ int os_mbuf_free_chain(struct os_mbuf *om);
  * Adjust the length of a mbuf, trimming either from the head or the tail
  * of the mbuf.
  *
- * @param mp The mbuf chain to adjust
+ * @param om The mbuf chain to adjust
  * @param req_len The length to trim from the mbuf.  If positive, trims
  *from the head of the mbuf, if negative, trims from the
  *tail of the mbuf.
  */
-void os_mbuf_adj(struct os_mbuf *mp, int req_len);
+void

(mynewt-core) branch master updated (b51675645 -> 5dced2655)

2024-06-20 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


from b51675645 hw/bsp: Define nrf51 DK LEDs and buttons
 new 434cefc90 kernel/os_mbuf: Update doxygen comments in the header file
 new 7759d4f8b kernel/os_mbuf: Update function parameters names
 new 5dced2655 kernel/os_mbuf: Adjust doxygen comments

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:
 kernel/os/include/os/os_mbuf.h | 179 +++--
 kernel/os/src/os_mbuf.c|  42 +-
 2 files changed, 123 insertions(+), 98 deletions(-)



(mynewt-core) branch master updated: hw/bsp: Define nrf51 DK LEDs and buttons

2024-06-20 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
 new b51675645 hw/bsp: Define nrf51 DK LEDs and buttons
b51675645 is described below

commit b5167564504971b018ee390e6a1b81360e2ed858
Author: Michal Gorecki 
AuthorDate: Mon Jun 17 17:46:01 2024 +0200

hw/bsp: Define nrf51 DK LEDs and buttons
---
 hw/bsp/nordic_pca10028-16k/include/bsp/bsp.h | 11 ++-
 hw/bsp/nordic_pca10028/include/bsp/bsp.h | 12 +++-
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/hw/bsp/nordic_pca10028-16k/include/bsp/bsp.h 
b/hw/bsp/nordic_pca10028-16k/include/bsp/bsp.h
index cd9643761..b36b13c7d 100644
--- a/hw/bsp/nordic_pca10028-16k/include/bsp/bsp.h
+++ b/hw/bsp/nordic_pca10028-16k/include/bsp/bsp.h
@@ -37,8 +37,17 @@ extern uint8_t _ram_start;
 #define RAM_SIZE0x4000
 
 /* LED pins */
-#define LED_BLINK_PIN   (21)
+#define LED_1   (21)
 #define LED_2   (22)
+#define LED_3   (23)
+#define LED_4   (24)
+#define LED_BLINK_PIN   (LED_1)
+
+/* Buttons */
+#define BUTTON_1(17)
+#define BUTTON_2(18)
+#define BUTTON_3(19)
+#define BUTTON_4(20)
 
 #ifdef __cplusplus
 }
diff --git a/hw/bsp/nordic_pca10028/include/bsp/bsp.h 
b/hw/bsp/nordic_pca10028/include/bsp/bsp.h
index d7bca975d..65febcb19 100644
--- a/hw/bsp/nordic_pca10028/include/bsp/bsp.h
+++ b/hw/bsp/nordic_pca10028/include/bsp/bsp.h
@@ -37,8 +37,18 @@ extern uint8_t _ram_start;
 #define RAM_SIZE0x8000
 
 /* LED pins */
-#define LED_BLINK_PIN   (21)
+#define LED_1   (21)
 #define LED_2   (22)
+#define LED_3   (23)
+#define LED_4   (24)
+#define LED_BLINK_PIN   (LED_1)
+
+/* Buttons */
+#define BUTTON_1(17)
+#define BUTTON_2(18)
+#define BUTTON_3(19)
+#define BUTTON_4(20)
+
 
 /* Arduino pins */
 #define ARDUINO_PIN_D0  12



(mynewt-nimble) branch master updated (cc101575 -> 2096f125)

2024-06-20 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


from cc101575 ci: Build Nuttx port
 new 09ae1c44 porting/update_generated_files: Add comments stripping and 
prepend license header
 new 2096f125 ci: Submit PR updating ports syscfg files on merge

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:
 .../dummy/main.c => .github/LICENSE_TEMPLATE   |  9 -
 .github/workflows/ports_syscfg_check.yml   | 47 ++
 porting/update_generated_files.sh  |  7 ++--
 3 files changed, 43 insertions(+), 20 deletions(-)
 copy porting/examples/dummy/main.c => .github/LICENSE_TEMPLATE (88%)



(mynewt-nimble) 01/02: porting/update_generated_files: Add comments stripping and prepend license header

2024-06-20 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git

commit 09ae1c44275de9275e4a6412b132d34daa99c243
Author: Wojciech Pietraszewski 
AuthorDate: Wed May 22 13:16:54 2024 +0200

porting/update_generated_files: Add comments stripping and prepend license 
header

The script modifying 'syscfg.h' files for ports will now
remove all block comments and add the license header
---
 .github/LICENSE_TEMPLATE  | 18 ++
 porting/update_generated_files.sh |  7 ---
 2 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/.github/LICENSE_TEMPLATE b/.github/LICENSE_TEMPLATE
new file mode 100644
index ..80b58651
--- /dev/null
+++ b/.github/LICENSE_TEMPLATE
@@ -0,0 +1,18 @@
+/*
+ * 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.
+ */
diff --git a/porting/update_generated_files.sh 
b/porting/update_generated_files.sh
index 7365bc3e..94f1808a 100755
--- a/porting/update_generated_files.sh
+++ b/porting/update_generated_files.sh
@@ -37,9 +37,10 @@ for target in "${!targets[@]}"; do
 rm -rf 
"bin/@apache-mynewt-nimble/porting/targets/${target}/generated/include/logcfg"
 rm -rf 
"bin/@apache-mynewt-nimble/porting/targets/${target}/generated/include/sysflash"
 cp "bin/@apache-mynewt-nimble/porting/targets/${target}/generated/include" 
"${targets[$target]}" -r
-# Remove repo version and hash MYNEWT_VALS as it doesn't make much sense 
to commit them and they
-# defeat the purpose of this script.
+# Remove all comments and hash MYNEWT_VALS as it doesn't make much sense 
to commit them and they
+# defeat the purpose of this script. Prepend the license header.
 find "${targets[$target]}/include" -type f -name 'syscfg.h' -exec sed -i 
'/MYNEWT_VAL_REPO_*/,/#endif/d' {} \;
-find "${targets[$target]}/include" -type f -name 'syscfg.h' -exec sed -i 
'/\/\*\*\* Repository/,/\*\//d' {} \;
+find "${targets[$target]}/include" -type f -name 'syscfg.h' -exec sed -i 
-E ':a;N;$!ba;s:/\*([^*]|(\*+([^*/])))*\*+/::g' {} \;
 find "${targets[$target]}/include" -type f -name 'syscfg.h' -exec sed -i 
'$!N;/^\n$/{$q;D;};P;D;' {} \;
+find "${targets[$target]}/include" -type f -name 'syscfg.h' -exec sh -c 
'cat "$0" "$1" > "$1.tmp" && mv "$1.tmp" "$1"' "../.github/LICENSE_TEMPLATE" {} 
\;
 done



(mynewt-nimble) 02/02: ci: Submit PR updating ports syscfg files on merge

2024-06-20 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git

commit 2096f12513b344a3673abf08e9d3edc624b94d94
Author: Wojciech Pietraszewski 
AuthorDate: Wed May 22 13:30:34 2024 +0200

ci: Submit PR updating ports syscfg files on merge

Adds new step to the CI that creates
a Pull Request with each 'syscfg.h'
file if changes are detected.
---
 .github/workflows/ports_syscfg_check.yml | 47 ++--
 1 file changed, 39 insertions(+), 8 deletions(-)

diff --git a/.github/workflows/ports_syscfg_check.yml 
b/.github/workflows/ports_syscfg_check.yml
index 66d47a23..89ccd82e 100644
--- a/.github/workflows/ports_syscfg_check.yml
+++ b/.github/workflows/ports_syscfg_check.yml
@@ -19,12 +19,20 @@
 
 name: Check ports syscfg update
 
-on: [pull_request]
+on:
+  push:
+branches:
+  - 'master'
+paths:
+  - '*/syscfg.h'
 
 jobs:
   targets:
 name: Check ports syscfg update
 runs-on: ubuntu-latest
+permissions:
+  contents: write
+  pull-requests: write
 steps:
   - uses: actions/checkout@v3
   - uses: actions/setup-go@v3
@@ -52,23 +60,46 @@ jobs:
  newt upgrade --shallow=1
  rm -rf repos/apache-mynewt-nimble
  git clone .. repos/apache-mynewt-nimble
- cd ..
   - name: Build ports tests targets
 shell: bash
 run: |
  cd build
  ./repos/apache-mynewt-nimble/porting/update_generated_files.sh
- cd repos/apache-mynewt-nimble
   - name: Check ports syscfg (debug)
 shell: bash
 if:  runner.debug == '1'
 run: |
+  cd build/repos/apache-mynewt-nimble
   git diff
   - name: Check ports syscfg
 shell: bash
 run: |
- git diff --quiet || (\
-   echo -e "\033[0;31mChanges in system configration files 
detected.";
-   echo -e "\033[0;31mRun 
./repos/apache-mynewt-nimble/porting/update_generated_files.sh" \
-   "to update NimBLE ports configurations.";
-   exit 1)
+  cd build/repos/apache-mynewt-nimble
+  if ! git diff --quiet; then
+  echo -e "\033[0;31mChanges in system configuration files 
detected:"
+  git diff --name-only
+  cp porting/examples/linux/include/syscfg/syscfg.h 
../../../porting/examples/linux/include/syscfg/syscfg.h
+  cp porting/examples/linux_blemesh/include/syscfg/syscfg.h 
../../../porting/examples/linux_blemesh/include/syscfg/syscfg.h
+  cp porting/examples/nuttx/include/syscfg/syscfg.h 
../../../porting/examples/nuttx/include/syscfg/syscfg.h
+  cp porting/nimble/include/syscfg/syscfg.h 
../../../porting/nimble/include/syscfg/syscfg.h
+  cp porting/npl/riot/include/syscfg/syscfg.h 
../../../porting/npl/riot/include/syscfg/syscfg.h
+  else
+  echo "No changes detected in system configuration files."
+  fi
+  cd ../../..
+  rm -rf build
+  - name: Create Pull Request
+uses: peter-evans/create-pull-request@v6
+with:
+  token: ${{ secrets.GITHUB_TOKEN }}
+  commit-message: |
+porting: Update ports syscfg
+  branch: update-ports-syscfg
+  title: "Update ports syscfg"
+  body: |
+Update NimBLE ports configurations:
+- Removes all /* */ comments from `syscfg.h` files.
+- Adds the license header to each `syscfg.h` file.
+- Auto-generated by [create-pull-request][1]
+
+[1]: https://github.com/peter-evans/create-pull-request



  1   2   3   4   5   6   7   8   9   10   >