[GitHub] [mynewt-nimble] apache-mynewt-bot commented on pull request #1399: nimble/transport: Add UART transport for external controller

2022-10-14 Thread GitBox


apache-mynewt-bot commented on PR #1399:
URL: https://github.com/apache/mynewt-nimble/pull/1399#issuecomment-1279245127

   
   
   
   ## Style check summary
   
    No suggestions at this time!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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



[GitHub] [mynewt-nimble] andrzej-kaczmarek opened a new pull request, #1399: nimble/transport: Add UART transport for external controller

2022-10-14 Thread GitBox


andrzej-kaczmarek opened a new pull request, #1399:
URL: https://github.com/apache/mynewt-nimble/pull/1399

   This is the same as standard "uart" transport except it's for LL side which 
means it can be used for NimBLE host to talk to external controller. Enable it 
by "BLE_TRANSPORT_LL: uart_ll".


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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



[GitHub] [mynewt-nimble] apache-mynewt-bot commented on pull request #1398: nimble/ll: Fix syscfg restrictions

2022-10-14 Thread GitBox


apache-mynewt-bot commented on PR #1398:
URL: https://github.com/apache/mynewt-nimble/pull/1398#issuecomment-1279146773

   
   
   
   ## Style check summary
   
    No suggestions at this time!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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



[GitHub] [mynewt-nimble] apache-mynewt-bot commented on pull request #1396: nimble/host: Add host callback to provide security keys

2022-10-14 Thread GitBox


apache-mynewt-bot commented on PR #1396:
URL: https://github.com/apache/mynewt-nimble/pull/1396#issuecomment-1279106552

   
   
   
   ## Style check summary
   
    No suggestions at this time!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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



[GitHub] [mynewt-nimble] andrzej-kaczmarek opened a new pull request, #1398: nimble/ll: Fix syscfg restrictions

2022-10-14 Thread GitBox


andrzej-kaczmarek opened a new pull request, #1398:
URL: https://github.com/apache/mynewt-nimble/pull/1398

   syscfg conditions should use single quotes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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



[mynewt-core] branch master updated: sys/console: Reset text attributes on init

2022-10-14 Thread jerzy
This is an automated email from the ASF dual-hosted git repository.

jerzy 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 96334e250 sys/console: Reset text attributes on init
96334e250 is described below

commit 96334e250e91afef758e4e5a1a69a553848108f2
Author: Jerzy Kasenberg 
AuthorDate: Fri Oct 14 13:13:23 2022 +0200

sys/console: Reset text attributes on init

When console has colors (for now only for software
cursor) color or other text attributes can be changed
from the default when device reboots.
Now escape sequnce to restore default text attributes
is added to first time initialization of console.
---
 sys/console/full/src/console.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/console/full/src/console.c b/sys/console/full/src/console.c
index a147c6a1d..5460b95b1 100644
--- a/sys/console/full/src/console.c
+++ b/sys/console/full/src/console.c
@@ -368,6 +368,7 @@ console_init_terminal(void)
 {
 if (MYNEWT_VAL(CONSOLE_PROMPT_STICKY) && !terminal_initialized) {
 console_write_str(CSI "!p"
+  CSI "0m"
   CSI "1;999r"
   CSI "999;1H\n\n"
   CSI "A"



[GitHub] [mynewt-core] kasjer merged pull request #2903: sys/console: Reset text attributes on init

2022-10-14 Thread GitBox


kasjer merged PR #2903:
URL: https://github.com/apache/mynewt-core/pull/2903


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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



[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2903: sys/console: Reset text attributes on init

2022-10-14 Thread GitBox


apache-mynewt-bot commented on PR #2903:
URL: https://github.com/apache/mynewt-core/pull/2903#issuecomment-1278972431

   
   
   
   ## Style check summary
   
    No suggestions at this time!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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



[GitHub] [mynewt-nimble] apache-mynewt-bot commented on pull request #1396: nimble/host: Add host callback to provide security keys

2022-10-14 Thread GitBox


apache-mynewt-bot commented on PR #1396:
URL: https://github.com/apache/mynewt-nimble/pull/1396#issuecomment-1278953822

   
   
   
   ## Style check summary
   
    No suggestions at this time!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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



[GitHub] [mynewt-core] kasjer opened a new pull request, #2903: sys/console: Reset text attributes on init

2022-10-14 Thread GitBox


kasjer opened a new pull request, #2903:
URL: https://github.com/apache/mynewt-core/pull/2903

   When console has colors (for now only for software cursor) color or other 
text attributes can be changed from the default when device reboots.
   Now escape sequnce to restore default text attributes is added to first time 
initialization of console.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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



[mynewt-core] 04/06: hw/ipc_nrf5340: Add APIs to get used/free space in IPC channel

2022-10-14 Thread andk
This is an automated email from the ASF dual-hosted git repository.

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

commit fa3cd4ee33fff312f80fee2eda27736f34542202
Author: Andrzej Kaczmarek 
AuthorDate: Tue Oct 11 22:07:01 2022 +0200

hw/ipc_nrf5340: Add APIs to get used/free space in IPC channel
---
 .../ipc_nrf5340/include/ipc_nrf5340/ipc_nrf5340.h  | 26 ++
 hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c   | 15 +
 2 files changed, 41 insertions(+)

diff --git a/hw/drivers/ipc_nrf5340/include/ipc_nrf5340/ipc_nrf5340.h 
b/hw/drivers/ipc_nrf5340/include/ipc_nrf5340/ipc_nrf5340.h
index d0398d518..b20ecc5a6 100644
--- a/hw/drivers/ipc_nrf5340/include/ipc_nrf5340/ipc_nrf5340.h
+++ b/hw/drivers/ipc_nrf5340/include/ipc_nrf5340/ipc_nrf5340.h
@@ -131,6 +131,32 @@ uint16_t ipc_nrf5340_available(int channel);
  */
 uint16_t ipc_nrf5340_available_buf(int channel, void **dptr);
 
+/**
+ * Returns number of data bytes available in IPC ring buffer for reading.
+ *
+ * Note: this function does not use any kind of locking so it's up to caller
+ *   to make sure it's not used during write from other context as it may
+ *   yield incorrect results.
+ *
+ * @param channel IPC channel number
+ *
+ * @returnNumber of bytes available in IPC ring buffer
+ */
+uint16_t ipc_nrf5340_data_available_get(int channel);
+
+/**
+ * Returns number of free data bytes available in IPC ring buffer for writing.
+ *
+ * Note: this function does not use any kind of locking so it's up to caller
+ *   to make sure it's not used during write from other context as it may
+ *   yield incorrect results.
+ *
+ * @param channel IPC channel number
+ *
+ * @returnNumber of bytes available in IPC ring buffer
+ */
+uint16_t ipc_nrf5340_data_free_get(int channel);
+
 /**
  * Consumes data from IPC ring buffer without copying. Should be used only
  * from ipc_nrf5340_recv_cb context.
diff --git a/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c 
b/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c
index 45a5b6d51..53c1d8a26 100644
--- a/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c
+++ b/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c
@@ -470,6 +470,21 @@ ipc_nrf5340_available_buf(int channel, void **dptr)
 return 0;
 }
 
+uint16_t
+ipc_nrf5340_data_available_get(int channel)
+{
+assert(channel < IPC_MAX_CHANS);
+
+return ipc_nrf5340_shm_get_data_length(shms[channel].head,
+   shms[channel].tail);
+}
+
+uint16_t
+ipc_nrf5340_data_free_get(int channel)
+{
+return IPC_BUF_SIZE - ipc_nrf5340_data_available_get(channel) - 1;
+}
+
 uint16_t
 ipc_nrf5340_consume(int channel, uint16_t len)
 {



[mynewt-core] 03/06: hw/ipc_nrf5340: Clear shared memory on init

2022-10-14 Thread andk
This is an automated email from the ASF dual-hosted git repository.

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

commit 2e9298739fdea8eeab6d545a7dcd9048183614e5
Author: Andrzej Kaczmarek 
AuthorDate: Wed Oct 12 21:40:48 2022 +0200

hw/ipc_nrf5340: Clear shared memory on init
---
 hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c 
b/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c
index 82aa14dd1..45a5b6d51 100644
--- a/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c
+++ b/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c
@@ -233,6 +233,8 @@ ipc_nrf5340_init(void)
 NRF_GPIO_Type *nrf_gpio;
 #endif
 
+memset(ipc_shared, 0, sizeof(ipc_shared));
+
 #if MYNEWT_VAL(NRF5340_EMBED_NET_CORE)
 /*
  * Get network core image size and placement in application flash.



[mynewt-core] branch master updated (1ccc0a2df -> d3461cfb0)

2022-10-14 Thread andk
This is an automated email from the ASF dual-hosted git repository.

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


from 1ccc0a2df mcu/nrf5340: Include TFM module to allow MCU GPIO assignment
 new 6abb9a4e4 hw/ipc_nrf5340: Move priv header to src
 new cad0f694d hw/ipc_nrf5340: Remove unused includes
 new 2e9298739 hw/ipc_nrf5340: Clear shared memory on init
 new fa3cd4ee3 hw/ipc_nrf5340: Add APIs to get used/free space in IPC 
channel
 new fe698d05c hw/ipc_nrf5340: Add note to some APIs
 new d3461cfb0 hw/ipc_nrf5340: Deprecate ipc_nrf5340_available

The 6 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:
 .../ipc_nrf5340/include/ipc_nrf5340/ipc_nrf5340.h  | 63 ++
 hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c   | 27 +++---
 .../ipc_nrf5340 => src}/ipc_nrf5340_priv.h |  0
 3 files changed, 73 insertions(+), 17 deletions(-)
 rename hw/drivers/ipc_nrf5340/{include/ipc_nrf5340 => src}/ipc_nrf5340_priv.h 
(100%)



[mynewt-core] 05/06: hw/ipc_nrf5340: Add note to some APIs

2022-10-14 Thread andk
This is an automated email from the ASF dual-hosted git repository.

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

commit fe698d05c395bd43d922fb4a0fa3a8f95b9baffa
Author: Andrzej Kaczmarek 
AuthorDate: Wed Oct 12 21:42:30 2022 +0200

hw/ipc_nrf5340: Add note to some APIs

APIs that access IPC channel in general can be used outside callback
assuming caller takes care that other context on the same MCU does not
try to write to that IPC channel.
---
 .../ipc_nrf5340/include/ipc_nrf5340/ipc_nrf5340.h  | 35 --
 1 file changed, 26 insertions(+), 9 deletions(-)

diff --git a/hw/drivers/ipc_nrf5340/include/ipc_nrf5340/ipc_nrf5340.h 
b/hw/drivers/ipc_nrf5340/include/ipc_nrf5340/ipc_nrf5340.h
index b20ecc5a6..40c61a577 100644
--- a/hw/drivers/ipc_nrf5340/include/ipc_nrf5340/ipc_nrf5340.h
+++ b/hw/drivers/ipc_nrf5340/include/ipc_nrf5340/ipc_nrf5340.h
@@ -87,8 +87,11 @@ int ipc_nrf5340_send(int channel, const void *data, uint16_t 
len);
 int ipc_nrf5340_write(int channel, const void *data, uint16_t len, bool last);
 
 /**
- * Reads data from IPC ring buffer to specified flat buffer. Should be used 
only
- * from ipc_nrf5340_recv_cb context.
+ * Reads data from IPC ring buffer to specified flat buffer.
+ *
+ * Note: this function does not use any kind of locking so it's up to caller
+ *   to make sure it's not used during write from other context as it may
+ *   yield incorrect results.
  *
  * @param channel IPC channel number to read from
  * @param buf Buffer to read data to
@@ -99,8 +102,11 @@ int ipc_nrf5340_write(int channel, const void *data, 
uint16_t len, bool last);
 uint16_t ipc_nrf5340_read(int channel, void *buf, uint16_t len);
 
 /**
- * Reads data from IPC ring buffer to specified mbuf. Should be used only
- * from ipc_nrf5340_recv_cb context.
+ * Reads data from IPC ring buffer to specified mbuf.
+ *
+ * Note: this function does not use any kind of locking so it's up to caller
+ *   to make sure it's not used during write from other context as it may
+ *   yield incorrect results.
  *
  * @param channel IPC channel number to read from
  * @param om  mbuf to read data to
@@ -111,8 +117,11 @@ uint16_t ipc_nrf5340_read(int channel, void *buf, uint16_t 
len);
 uint16_t ipc_nrf5340_read_om(int channel, struct os_mbuf *om, uint16_t len);
 
 /**
- * Returns number of data bytes available in IPC ring buffer. Should be used
- * only from ipc_nrf5340_recv_cb context.
+ * Returns number of data bytes available in IPC ring buffer.
+ *
+ * Note: this function does not use any kind of locking so it's up to caller
+ *   to make sure it's not used during write from other context as it may
+ *   yield incorrect results.
  *
  * @param channel IPC channel number
  *
@@ -122,7 +131,12 @@ uint16_t ipc_nrf5340_available(int channel);
 
 /**
  * Returns number of continuous data bytes available in IPC ring buffer with
- * pointer to that data. Should be used only from ipc_nrf5340_recv_cb context.
+ * pointer to that data.
+ *
+ * Note: this function does not use any kind of locking so it's up to caller
+ *   to make sure it's not used during write from other context as it may
+ *   yield incorrect results.
+ *
  *
  * @param channel IPC channel number
  * @param dptrPointer to data buffer
@@ -158,8 +172,11 @@ uint16_t ipc_nrf5340_data_available_get(int channel);
 uint16_t ipc_nrf5340_data_free_get(int channel);
 
 /**
- * Consumes data from IPC ring buffer without copying. Should be used only
- * from ipc_nrf5340_recv_cb context.
+ * Consumes data from IPC ring buffer without copying.
+ *
+ * Note: this function does not use any kind of locking so it's up to caller
+ *   to make sure it's not used during write from other context as it may
+ *   yield incorrect results.
  *
  * @param channel IPC channel number to consume from
  * @param len Number of bytes to consume



[GitHub] [mynewt-core] andrzej-kaczmarek merged pull request #2902: hw/ipc_nrf5340: Some updates

2022-10-14 Thread GitBox


andrzej-kaczmarek merged PR #2902:
URL: https://github.com/apache/mynewt-core/pull/2902


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

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



[mynewt-core] 06/06: hw/ipc_nrf5340: Deprecate ipc_nrf5340_available

2022-10-14 Thread andk
This is an automated email from the ASF dual-hosted git repository.

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

commit d3461cfb0483ad5b845ca910ebb5fbfaef827381
Author: Andrzej Kaczmarek 
AuthorDate: Wed Oct 12 21:46:30 2022 +0200

hw/ipc_nrf5340: Deprecate ipc_nrf5340_available

We have new one with better name ;)
---
 hw/drivers/ipc_nrf5340/include/ipc_nrf5340/ipc_nrf5340.h | 2 ++
 hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c | 5 +
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/hw/drivers/ipc_nrf5340/include/ipc_nrf5340/ipc_nrf5340.h 
b/hw/drivers/ipc_nrf5340/include/ipc_nrf5340/ipc_nrf5340.h
index 40c61a577..c30dc96df 100644
--- a/hw/drivers/ipc_nrf5340/include/ipc_nrf5340/ipc_nrf5340.h
+++ b/hw/drivers/ipc_nrf5340/include/ipc_nrf5340/ipc_nrf5340.h
@@ -119,6 +119,8 @@ uint16_t ipc_nrf5340_read_om(int channel, struct os_mbuf 
*om, uint16_t len);
 /**
  * Returns number of data bytes available in IPC ring buffer.
  *
+ * Note: use ipc_nrf5340_data_available_get() instead
+ *
  * Note: this function does not use any kind of locking so it's up to caller
  *   to make sure it's not used during write from other context as it may
  *   yield incorrect results.
diff --git a/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c 
b/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c
index 53c1d8a26..82ad89607 100644
--- a/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c
+++ b/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c
@@ -446,10 +446,7 @@ ipc_nrf5340_read_om(int channel, struct os_mbuf *om, 
uint16_t len)
 uint16_t
 ipc_nrf5340_available(int channel)
 {
-assert(channel < IPC_MAX_CHANS);
-
-return ipc_nrf5340_shm_get_data_length(shms[channel].head,
-   shms[channel].tail);
+return ipc_nrf5340_data_available_get(channel);
 }
 
 uint16_t



[mynewt-core] 02/06: hw/ipc_nrf5340: Remove unused includes

2022-10-14 Thread andk
This is an automated email from the ASF dual-hosted git repository.

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

commit cad0f694d7bb77587902e41e272c4a4596cd59dc
Author: Andrzej Kaczmarek 
AuthorDate: Wed Oct 12 21:34:16 2022 +0200

hw/ipc_nrf5340: Remove unused includes
---
 hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c 
b/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c
index 1ea3561fc..82aa14dd1 100644
--- a/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c
+++ b/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c
@@ -21,9 +21,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
 #include "ipc_nrf5340_priv.h"
 
 #if MYNEWT_VAL(IPC_NRF5340_NET_GPIO)



[mynewt-core] 01/06: hw/ipc_nrf5340: Move priv header to src

2022-10-14 Thread andk
This is an automated email from the ASF dual-hosted git repository.

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

commit 6abb9a4e40f250d5eee0408b517e492ce111ed07
Author: Andrzej Kaczmarek 
AuthorDate: Wed Oct 12 21:34:16 2022 +0200

hw/ipc_nrf5340: Move priv header to src

If it's private, it should not be public...
---
 hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c   | 2 +-
 hw/drivers/ipc_nrf5340/{include/ipc_nrf5340 => src}/ipc_nrf5340_priv.h | 0
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c 
b/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c
index 5cd879dca..1ea3561fc 100644
--- a/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c
+++ b/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c
@@ -20,11 +20,11 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
 #include 
+#include "ipc_nrf5340_priv.h"
 
 #if MYNEWT_VAL(IPC_NRF5340_NET_GPIO)
 #include 
diff --git a/hw/drivers/ipc_nrf5340/include/ipc_nrf5340/ipc_nrf5340_priv.h 
b/hw/drivers/ipc_nrf5340/src/ipc_nrf5340_priv.h
similarity index 100%
rename from hw/drivers/ipc_nrf5340/include/ipc_nrf5340/ipc_nrf5340_priv.h
rename to hw/drivers/ipc_nrf5340/src/ipc_nrf5340_priv.h