[GitHub] [mynewt-core] kasjer commented on a change in pull request #2482: Updates to k64f aka kinetis trng driver

2021-02-16 Thread GitBox


kasjer commented on a change in pull request #2482:
URL: https://github.com/apache/mynewt-core/pull/2482#discussion_r577373281



##
File path: hw/drivers/trng/trng_kinetis/src/trng_kinetis.c
##
@@ -18,7 +18,23 @@
  */
 
 #include 
+#include "os/mynewt.h"
+
+#if MYNEWT_VAL(KINETIS_TRNG_USE_RNGA)
+#define USE_RNGA 1
 #include "fsl_rnga.h"
+#elif MYNEWT_VAL(KINETIS_TRNG_USE_TRNG)
+#define USE_TRNG 1
+#include "fsl_trng.h"
+#define TRNG_START(base) \

Review comment:
   maybe use do {} while (0) to prevent accidents with if (cond) 
TRNG_START();
   though I know mynewt style calls for {} in each if

##
File path: hw/drivers/trng/trng_kinetis/src/trng_kinetis.c
##
@@ -154,9 +186,16 @@ kinetis_trng_dev_open(struct os_dev *dev, uint32_t wait, 
void *arg)
 rng_cache_out = 0;
 rng_cache_in = 0;
 
+#if USE_RNGA
 RNGA_Init(RNG);
-
-kinetis_rnga_start();
+#elif USE_TRNG
+(void)TRNG_GetDefaultConfig(&default_config);
+TRNG_Init(TRNG0, &default_config);
+#else
+assert(0);

Review comment:
   this case was take care of in line 35
   ```c
   #error "Unsupported TRNG interface"
   ```





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

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




[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on pull request #2481: da1469x disable dcdc when vbus is present

2021-02-16 Thread GitBox


apache-mynewt-bot removed a comment on pull request #2481:
URL: https://github.com/apache/mynewt-core/pull/2481#issuecomment-779904663


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

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




[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2481: da1469x disable dcdc when vbus is present

2021-02-16 Thread GitBox


apache-mynewt-bot commented on pull request #2481:
URL: https://github.com/apache/mynewt-core/pull/2481#issuecomment-780353083


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

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




[GitHub] [mynewt-core] kasjer commented on a change in pull request #2481: da1469x disable dcdc when vbus is present

2021-02-16 Thread GitBox


kasjer commented on a change in pull request #2481:
URL: https://github.com/apache/mynewt-core/pull/2481#discussion_r577369201



##
File path: hw/drivers/chg_ctrl/da1469x_charger/src/da1469x_charger.c
##
@@ -27,6 +27,8 @@
 #include 
 #if MYNEWT_VAL(DA1469X_CHARGER_USE_CHARGE_CONTROL)
 #include 
+#include 
+

Review comment:
   done





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

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




[GitHub] [mynewt-core] kasjer commented on a change in pull request #2481: da1469x disable dcdc when vbus is present

2021-02-16 Thread GitBox


kasjer commented on a change in pull request #2481:
URL: https://github.com/apache/mynewt-core/pull/2481#discussion_r577369085



##
File path: hw/mcu/dialog/da1469x/src/da1469x_prail.c
##
@@ -24,6 +24,9 @@
 #include "mcu/da1469x_hal.h"
 #include "mcu/da1469x_prail.h"
 #include "mcu/da1469x_retreg.h"
+#if MYNEWT_VAL(ENABLE_BLE)

Review comment:
   done

##
File path: hw/mcu/dialog/da1469x/src/da1469x_prail.c
##
@@ -176,13 +179,21 @@ da1469x_prail_dcdc_restore(void)
 if (CRG_TOP->ANA_STATUS_REG & CRG_TOP_ANA_STATUS_REG_COMP_VBAT_HIGH_Msk) {
 da1469x_retreg_restore(g_mcu_dcdc_config, 
ARRAY_SIZE(g_mcu_dcdc_config));
 DCDC->DCDC_CTRL1_REG |= DCDC_DCDC_CTRL1_REG_DCDC_ENABLE_Msk;
+#if MYNEWT_VAL(ENABLE_BLE)
+/* Enable turnning DCDC on from CMAC core. */

Review comment:
   done





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

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




[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on pull request #2482: Updates to k64f aka kinetis trng driver

2021-02-16 Thread GitBox


apache-mynewt-bot removed a comment on pull request #2482:
URL: https://github.com/apache/mynewt-core/pull/2482#issuecomment-780168681


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

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




[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2482: Updates to k64f aka kinetis trng driver

2021-02-16 Thread GitBox


apache-mynewt-bot commented on pull request #2482:
URL: https://github.com/apache/mynewt-core/pull/2482#issuecomment-780199210


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

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




[GitHub] [mynewt-core] utzig merged pull request #2480: Kinetis hash driver updates

2021-02-16 Thread GitBox


utzig merged pull request #2480:
URL: https://github.com/apache/mynewt-core/pull/2480


   



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

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




[mynewt-core] branch master updated (ab5d874 -> cbf4886)

2021-02-16 Thread utzig
This is an automated email from the ASF dual-hosted git repository.

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


from ab5d874  Merge pull request #2479 from 
andrzej-kaczmarek/cmac-retain-cm_error_dis_reg
 new 41c8c40  Rename hash_k64f to hash_kinetis
 new cbf4886  Enable HW HASH usage on frdm-k82f board

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 hw/bsp/frdm-k64f/pkg.yml |  2 +-
 hw/bsp/frdm-k64f/src/hal_bsp.c   |  4 ++--
 hw/bsp/frdm-k82f/pkg.yml |  3 +++
 hw/bsp/frdm-k82f/src/hal_bsp.c   | 13 +
 .../include/hash_context.h   |  0
 .../include/hash_kinetis/hash_kinetis.h} |  8 
 hw/drivers/hash/{hash_k64f => hash_kinetis}/pkg.yml  |  4 ++--
 .../hash_k64f.c => hash_kinetis/src/hash_kinetis.c}  | 20 ++--
 .../src/hash_kinetis_cau.c}  |  2 +-
 9 files changed, 36 insertions(+), 20 deletions(-)
 rename hw/drivers/hash/{hash_k64f => hash_kinetis}/include/hash_context.h 
(100%)
 rename hw/drivers/hash/{hash_k64f/include/hash_k64f/hash_k64f.h => 
hash_kinetis/include/hash_kinetis/hash_kinetis.h} (86%)
 rename hw/drivers/hash/{hash_k64f => hash_kinetis}/pkg.yml (91%)
 rename hw/drivers/hash/{hash_k64f/src/hash_k64f.c => 
hash_kinetis/src/hash_kinetis.c} (88%)
 rename hw/drivers/hash/{hash_k64f/src/hash_k64f_cau.c => 
hash_kinetis/src/hash_kinetis_cau.c} (99%)



[mynewt-core] 01/02: Rename hash_k64f to hash_kinetis

2021-02-16 Thread utzig
This is an automated email from the ASF dual-hosted git repository.

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

commit 41c8c40dd9c1c1b5316abc3b5524afb8d533872a
Author: Fabio Utzig 
AuthorDate: Mon Feb 8 12:41:55 2021 -0300

Rename hash_k64f to hash_kinetis

This makes it less specific, since the driver should also work on other
Kinetis families.

Signed-off-by: Fabio Utzig 
---
 hw/bsp/frdm-k64f/pkg.yml |  2 +-
 hw/bsp/frdm-k64f/src/hal_bsp.c   |  4 ++--
 .../include/hash_context.h   |  0
 .../include/hash_kinetis/hash_kinetis.h} |  8 
 hw/drivers/hash/{hash_k64f => hash_kinetis}/pkg.yml  |  4 ++--
 .../hash_k64f.c => hash_kinetis/src/hash_kinetis.c}  | 20 ++--
 .../src/hash_kinetis_cau.c}  |  2 +-
 7 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/hw/bsp/frdm-k64f/pkg.yml b/hw/bsp/frdm-k64f/pkg.yml
index 7143c45..193337d 100644
--- a/hw/bsp/frdm-k64f/pkg.yml
+++ b/hw/bsp/frdm-k64f/pkg.yml
@@ -73,4 +73,4 @@ pkg.deps.ENC_FLASH_DEV:
 - "@apache-mynewt-core/hw/drivers/flash/enc_flash/ef_crypto"
 
 pkg.deps.HASH:
-- "@apache-mynewt-core/hw/drivers/hash/hash_k64f"
+- "@apache-mynewt-core/hw/drivers/hash/hash_kinetis"
diff --git a/hw/bsp/frdm-k64f/src/hal_bsp.c b/hw/bsp/frdm-k64f/src/hal_bsp.c
index f79a1ba..1f6c95e 100644
--- a/hw/bsp/frdm-k64f/src/hal_bsp.c
+++ b/hw/bsp/frdm-k64f/src/hal_bsp.c
@@ -41,7 +41,7 @@
 #endif
 #if MYNEWT_VAL(HASH)
 #include "hash/hash.h"
-#include "hash_k64f/hash_k64f.h"
+#include "hash_kinetis/hash_kinetis.h"
 #endif
 #if MYNEWT_VAL(UART_0) || MYNEWT_VAL(UART_1) || MYNEWT_VAL(UART_2) || \
 MYNEWT_VAL(UART_3) || MYNEWT_VAL(UART_4) || MYNEWT_VAL(UART_5)
@@ -223,7 +223,7 @@ hal_bsp_init(void)
 
 #if MYNEWT_VAL(HASH)
 rc = os_dev_create(&os_bsp_hash.dev, "hash", OS_DEV_INIT_KERNEL,
-   OS_DEV_INIT_PRIO_DEFAULT, k64f_hash_dev_init, NULL);
+   OS_DEV_INIT_PRIO_DEFAULT, kinetis_hash_dev_init, NULL);
 assert(rc == 0);
 #endif
 
diff --git a/hw/drivers/hash/hash_k64f/include/hash_context.h 
b/hw/drivers/hash/hash_kinetis/include/hash_context.h
similarity index 100%
rename from hw/drivers/hash/hash_k64f/include/hash_context.h
rename to hw/drivers/hash/hash_kinetis/include/hash_context.h
diff --git a/hw/drivers/hash/hash_k64f/include/hash_k64f/hash_k64f.h 
b/hw/drivers/hash/hash_kinetis/include/hash_kinetis/hash_kinetis.h
similarity index 86%
rename from hw/drivers/hash/hash_k64f/include/hash_k64f/hash_k64f.h
rename to hw/drivers/hash/hash_kinetis/include/hash_kinetis/hash_kinetis.h
index 76100dc..d2a8b18 100644
--- a/hw/drivers/hash/hash_k64f/include/hash_k64f/hash_k64f.h
+++ b/hw/drivers/hash/hash_kinetis/include/hash_kinetis/hash_kinetis.h
@@ -17,8 +17,8 @@
  * under the License.
  */
 
-#ifndef __HASH_K64F_H__
-#define __HASH_K64F_H__
+#ifndef __HASH_KINETIS_H__
+#define __HASH_KINETIS_H__
 
 #include "hash/hash.h"
 
@@ -26,10 +26,10 @@
 extern "C" {
 #endif
 
-int k64f_hash_dev_init(struct os_dev *dev, void *arg);
+int kinetis_hash_dev_init(struct os_dev *dev, void *arg);
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* __HASH_K64F_H__ */
+#endif /* __HASH_KINETIS_H__ */
diff --git a/hw/drivers/hash/hash_k64f/pkg.yml 
b/hw/drivers/hash/hash_kinetis/pkg.yml
similarity index 91%
rename from hw/drivers/hash/hash_k64f/pkg.yml
rename to hw/drivers/hash/hash_kinetis/pkg.yml
index 0a71c76..386899c 100644
--- a/hw/drivers/hash/hash_k64f/pkg.yml
+++ b/hw/drivers/hash/hash_kinetis/pkg.yml
@@ -17,8 +17,8 @@
 # under the License.
 #
 
-pkg.name: hw/drivers/hash/hash_k64f
-pkg.description: Hash driver for NXP K64F
+pkg.name: hw/drivers/hash/hash_kinetis
+pkg.description: Hash driver for NXP Kinetis family
 pkg.author: "Apache Mynewt "
 pkg.homepage: "http://mynewt.apache.org/";
 pkg.keywords:
diff --git a/hw/drivers/hash/hash_k64f/src/hash_k64f.c 
b/hw/drivers/hash/hash_kinetis/src/hash_kinetis.c
similarity index 88%
rename from hw/drivers/hash/hash_k64f/src/hash_k64f.c
rename to hw/drivers/hash/hash_kinetis/src/hash_kinetis.c
index dd48412..170e253 100644
--- a/hw/drivers/hash/hash_k64f/src/hash_k64f.c
+++ b/hw/drivers/hash/hash_kinetis/src/hash_kinetis.c
@@ -22,7 +22,7 @@
 #include 
 
 #include "hash/hash.h"
-#include "hash_k64f/hash_k64f.h"
+#include "hash_kinetis/hash_kinetis.h"
 
 static struct os_mutex gmtx;
 static uint32_t g_algos = HASH_ALGO_SHA256;
@@ -51,7 +51,7 @@ extern void cau_sha256_hash(const unsigned char *msg_data,
 unsigned int *sha256_state);
 
 static int
-k64f_hash_start(struct hash_dev *hash, void *ctx, uint16_t algo)
+kinetis_hash_start(struct hash_dev *hash, void *ctx, uint16_t algo)
 {
 struct hash_sha256_context *sha256ctx;
 
@@ -69,7 +69,7 @@ k64f_hash_start(struct hash_dev *hash, void *ctx, uint16_t 
algo)
 }
 
 static int
-k64f_hash_update(struct hash_dev *hash, void *c

[mynewt-core] 02/02: Enable HW HASH usage on frdm-k82f board

2021-02-16 Thread utzig
This is an automated email from the ASF dual-hosted git repository.

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

commit cbf4886a57ed4fe546302cdf0675ebc37d0cab47
Author: Fabio Utzig 
AuthorDate: Mon Feb 8 12:42:56 2021 -0300

Enable HW HASH usage on frdm-k82f board

Signed-off-by: Fabio Utzig 
---
 hw/bsp/frdm-k82f/pkg.yml   |  3 +++
 hw/bsp/frdm-k82f/src/hal_bsp.c | 13 +
 2 files changed, 16 insertions(+)

diff --git a/hw/bsp/frdm-k82f/pkg.yml b/hw/bsp/frdm-k82f/pkg.yml
index 778b4c7..0389789 100644
--- a/hw/bsp/frdm-k82f/pkg.yml
+++ b/hw/bsp/frdm-k82f/pkg.yml
@@ -62,3 +62,6 @@ pkg.deps.UART_4:
 
 pkg.deps.ENC_FLASH_DEV:
 - "@apache-mynewt-core/hw/drivers/flash/enc_flash/ef_crypto"
+
+pkg.deps.HASH:
+- "@apache-mynewt-core/hw/drivers/hash/hash_kinetis"
diff --git a/hw/bsp/frdm-k82f/src/hal_bsp.c b/hw/bsp/frdm-k82f/src/hal_bsp.c
index abf3af9..71162d2 100644
--- a/hw/bsp/frdm-k82f/src/hal_bsp.c
+++ b/hw/bsp/frdm-k82f/src/hal_bsp.c
@@ -31,6 +31,10 @@
 #if MYNEWT_VAL(ENC_FLASH_DEV)
 #include 
 #endif
+#if MYNEWT_VAL(HASH)
+#include "hash/hash.h"
+#include "hash_kinetis/hash_kinetis.h"
+#endif
 #if MYNEWT_VAL(UART_0) || MYNEWT_VAL(UART_1) || MYNEWT_VAL(UART_2) || \
 MYNEWT_VAL(UART_3) || MYNEWT_VAL(UART_4)
 #include "uart/uart.h"
@@ -98,6 +102,9 @@ static const struct nxp_hal_i2c_cfg hal_i2c3_cfg = {
 };
 #endif
 
+#if MYNEWT_VAL(HASH)
+static struct hash_dev os_bsp_hash;
+#endif
 
 /*
  * What memory to include in coredump.
@@ -222,6 +229,12 @@ hal_bsp_init(void)
 init_hardware();
 BOARD_BootClockRUN();
 
+#if MYNEWT_VAL(HASH)
+rc = os_dev_create(&os_bsp_hash.dev, "hash", OS_DEV_INIT_KERNEL,
+   OS_DEV_INIT_PRIO_DEFAULT, kinetis_hash_dev_init, NULL);
+assert(rc == 0);
+#endif
+
 #if MYNEWT_VAL(UART_0)
 rc = os_dev_create((struct os_dev *) &os_bsp_uart0, "uart0",
OS_DEV_INIT_PRIMARY, 0, uart_hal_init, NULL);



[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2482: Updates to k64f aka kinetis trng driver

2021-02-16 Thread GitBox


apache-mynewt-bot commented on pull request #2482:
URL: https://github.com/apache/mynewt-core/pull/2482#issuecomment-780168681


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

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




[GitHub] [mynewt-core] utzig opened a new pull request #2482: Updates to k64f aka kinetis trng driver

2021-02-16 Thread GitBox


utzig opened a new pull request #2482:
URL: https://github.com/apache/mynewt-core/pull/2482


   * trng: k64f: rename to trng_kinetis - This makes it less specific, since 
the driver should also work on other Kinetis families.
   
   * trng: kinetis: update driver for newer families - Older Kinetis families 
used the RNGA HW module for random number generation, newer models have a 
slightly different HW module called TRNG; this commit adds TRNG API usage 
compatibility, and adds syscfg to allow BSPs to choose from one of the HW 
modules.
   
   * hw: bsp: frdm-k82f: enable TRNG usage
   
   * trng: kinetis: remove delay in poller - This delay was causing a race 
condition on trng_test during console_printf, and can be safely removed.
   
   * trng: kinetis: seed RNGA with SIM->UIDL - This follows the recommendation 
from NXP SDK.



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

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




[mynewt-nimble] branch master updated (ab53154 -> 26ab03d)

2021-02-16 Thread benmccrea
This is an automated email from the ASF dual-hosted git repository.

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


from ab53154  nimble/porting: sync with core Synchronization of state with 
core repository.
 new 69c8991  nimble/phy: Fix tx_late handling
 new 04dc9e9  nimble/phy: Add stats for tx_late variants
 new 26ab03d  Merge pull request #910 from 
andrzej-kaczmarek/cmac-tx-late-one-more-attempt

The 4008 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/drivers/dialog_cmac/src/ble_phy.c | 30 --
 1 file changed, 20 insertions(+), 10 deletions(-)



[GitHub] [mynewt-nimble] benmccrea merged pull request #910: nimble/phy: Fix tx_late handling

2021-02-16 Thread GitBox


benmccrea merged pull request #910:
URL: https://github.com/apache/mynewt-nimble/pull/910


   



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

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




[mynewt-core] branch master updated: hw/mcu/dialog: Retain CM_ERROR_DIS_REG

2021-02-16 Thread benmccrea
This is an automated email from the ASF dual-hosted git repository.

benmccrea 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 f93b8a8  hw/mcu/dialog: Retain CM_ERROR_DIS_REG
 new ab5d874  Merge pull request #2479 from 
andrzej-kaczmarek/cmac-retain-cm_error_dis_reg
f93b8a8 is described below

commit f93b8a869421ebbe09fdc3f52c276855d10e2d35
Author: Andrzej Kaczmarek 
AuthorDate: Mon Feb 15 17:58:55 2021 +0100

hw/mcu/dialog: Retain CM_ERROR_DIS_REG

Latest CMAC PHY uses some hackery with CM_ERROR_DIS_REG to handle
tx_late errors so we need to retain that register.
---
 hw/mcu/dialog/cmac/src/cmac_sleep.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/mcu/dialog/cmac/src/cmac_sleep.c 
b/hw/mcu/dialog/cmac/src/cmac_sleep.c
index bd0bc88..5571722 100644
--- a/hw/mcu/dialog/cmac/src/cmac_sleep.c
+++ b/hw/mcu/dialog/cmac/src/cmac_sleep.c
@@ -43,6 +43,7 @@ static __IOM uint32_t * const retained_regs[] = {
 &CMAC->CM_LL_TIMER1_36_10_EQ_Y_REG,
 &CMAC->CM_LL_TIMER1_EQ_X_HI_REG,
 &CMAC->CM_LL_TIMER1_EQ_X_LO_REG,
+&CMAC->CM_ERROR_DIS_REG,
 #if MYNEWT_VAL(CMAC_DEBUG_DIAG_ENABLE)
 &CMAC->CM_DIAG_PORT0_REG,
 &CMAC->CM_DIAG_PORT1_REG,



[GitHub] [mynewt-core] benmccrea merged pull request #2479: hw/mcu/dialog: Retain CM_ERROR_DIS_REG

2021-02-16 Thread GitBox


benmccrea merged pull request #2479:
URL: https://github.com/apache/mynewt-core/pull/2479


   



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

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




[GitHub] [mynewt-core] benmccrea commented on pull request #2479: hw/mcu/dialog: Retain CM_ERROR_DIS_REG

2021-02-16 Thread GitBox


benmccrea commented on pull request #2479:
URL: https://github.com/apache/mynewt-core/pull/2479#issuecomment-779942566


   LGTM



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

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




[GitHub] [mynewt-core] andrzej-kaczmarek commented on a change in pull request #2481: da1469x disable dcdc when vbus is present

2021-02-16 Thread GitBox


andrzej-kaczmarek commented on a change in pull request #2481:
URL: https://github.com/apache/mynewt-core/pull/2481#discussion_r576908281



##
File path: hw/mcu/dialog/da1469x/src/da1469x_prail.c
##
@@ -176,13 +179,21 @@ da1469x_prail_dcdc_restore(void)
 if (CRG_TOP->ANA_STATUS_REG & CRG_TOP_ANA_STATUS_REG_COMP_VBAT_HIGH_Msk) {
 da1469x_retreg_restore(g_mcu_dcdc_config, 
ARRAY_SIZE(g_mcu_dcdc_config));
 DCDC->DCDC_CTRL1_REG |= DCDC_DCDC_CTRL1_REG_DCDC_ENABLE_Msk;
+#if MYNEWT_VAL(ENABLE_BLE)
+/* Enable turnning DCDC on from CMAC core. */

Review comment:
   typo

##
File path: hw/drivers/chg_ctrl/da1469x_charger/src/da1469x_charger.c
##
@@ -27,6 +27,8 @@
 #include 
 #if MYNEWT_VAL(DA1469X_CHARGER_USE_CHARGE_CONTROL)
 #include 
+#include 
+

Review comment:
   empty line

##
File path: hw/mcu/dialog/da1469x/src/da1469x_prail.c
##
@@ -176,13 +179,21 @@ da1469x_prail_dcdc_restore(void)
 if (CRG_TOP->ANA_STATUS_REG & CRG_TOP_ANA_STATUS_REG_COMP_VBAT_HIGH_Msk) {
 da1469x_retreg_restore(g_mcu_dcdc_config, 
ARRAY_SIZE(g_mcu_dcdc_config));
 DCDC->DCDC_CTRL1_REG |= DCDC_DCDC_CTRL1_REG_DCDC_ENABLE_Msk;
+#if MYNEWT_VAL(ENABLE_BLE)
+/* Enable turnning DCDC on from CMAC core. */
+g_cmac_shared_data->dcdc.enabled = 1;
+#endif
 }
 }
 #endif
 
 void
 da1469x_prail_dcdc_disable(void)
 {
+#if MYNEWT_VAL(ENABLE_BLE)
+/* Prevent CMAC from turnning DCDC on. */

Review comment:
   typo

##
File path: hw/mcu/dialog/da1469x/src/da1469x_prail.c
##
@@ -24,6 +24,9 @@
 #include "mcu/da1469x_hal.h"
 #include "mcu/da1469x_prail.h"
 #include "mcu/da1469x_retreg.h"
+#if MYNEWT_VAL(ENABLE_BLE)

Review comment:
   there's no such setting, use `MYNEWT_VAL_CHOICE(BLE_HCI_TRANSPORT, 
dialog_cmac)`





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

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




[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2481: da1469x disable dcdc when vbus is present

2021-02-16 Thread GitBox


apache-mynewt-bot commented on pull request #2481:
URL: https://github.com/apache/mynewt-core/pull/2481#issuecomment-779904663


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

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




[GitHub] [mynewt-core] kasjer opened a new pull request #2481: da1469x disable dcdc when vbus is present

2021-02-16 Thread GitBox


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


   DCDC is more efficient then LDO to provide power rails but in case
   when VBUS (charger) is present, it is actually more efficient from
   battery point of view to disable DCDC (which is powered by battery)
   and use LDO that is powered by VBUS.
   This way charging current will go to battery and not to DCDC reducing charge 
time.
   It will also prevent discharging battery when it was fully changed and not 
removed
   from charger.



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

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




[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2472: MTB in core dump

2021-02-16 Thread GitBox


apache-mynewt-bot commented on pull request #2472:
URL: https://github.com/apache/mynewt-core/pull/2472#issuecomment-779865883


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

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




[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on pull request #2472: MTB in core dump

2021-02-16 Thread GitBox


apache-mynewt-bot removed a comment on pull request #2472:
URL: https://github.com/apache/mynewt-core/pull/2472#issuecomment-775023230


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

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




[GitHub] [mynewt-nimble] apache-mynewt-bot commented on pull request #913: Optimize host size

2021-02-16 Thread GitBox


apache-mynewt-bot commented on pull request #913:
URL: https://github.com/apache/mynewt-nimble/pull/913#issuecomment-779809233


   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    nimble/host/services/gap/src/ble_svc_gap.c
   
   
   ```diff
   @@ -38,7 +38,7 @@
static ble_svc_gap_chr_changed_fn *ble_svc_gap_chr_changed_cb_fn;

static char ble_svc_gap_name[BLE_SVC_GAP_NAME_MAX_LEN + 1] =
   -MYNEWT_VAL(BLE_SVC_GAP_DEVICE_NAME);
   +MYNEWT_VAL(BLE_SVC_GAP_DEVICE_NAME);
static uint16_t ble_svc_gap_appearance = MYNEWT_VAL(BLE_SVC_GAP_APPEARANCE);

#if NIMBLE_BLE_CONNECT
   ```
   
   
   
    nimble/host/src/ble_att_clt.c
   
   
   ```diff
   @@ -28,8 +28,8 @@

#if NIMBLE_BLE_CONNECT

/*
   - * $error response  
 *
   - 
*/
   +* $error response   
*
   
+*/

int
ble_att_clt_rx_error(uint16_t conn_handle, struct os_mbuf **rxom)
   ```
   
   
   
    nimble/host/src/ble_gap.c
   
   
   ```diff
   @@ -386,8 +386,8 @@
#endif


/*
   - * $snapshot
 *
   - 
*/
   +* $snapshot 
*
   
+*/

#if NIMBLE_BLE_CONNECT
static void
   @@ -620,7 +620,7 @@

int
ble_gap_set_prefered_le_phy(uint16_t conn_handle, uint8_t tx_phys_mask,
   -   uint8_t rx_phys_mask, uint16_t phy_opts)
   +uint8_t rx_phys_mask, uint16_t phy_opts)
{
#if NIMBLE_BLE_CONNECT
struct ble_hci_le_set_phy_cp cmd;
   @@ -5141,8 +5139,8 @@
}


/*
   - * $cancel  
 *
   - 
*/
   +* $cancel   
*
   
+*/

#if NIMBLE_BLE_CONNECT
static int
   ```
   
   
   
    nimble/host/src/ble_gattc.c
   
   
   ```diff
   @@ -62,8 +62,8 @@

#if NIMBLE_BLE_CONNECT

/*
   - * $definitions / declarations  
 *
   - 
*/
   +* $definitions / declarations   
*
   
+*/

/**
 * The maximum time to wait for a single ATT response.  The spec defines 
this
   ```
   
   
   
    nimble/host/src/ble_gatts_lcl.c
   
   
   ```diff
   @@ -26,7 +26,7 @@

#if NIMBLE_BLE_CONNECT
static const ble_uuid_t *uuid_ccc =
   -BLE_UUID16_DECLARE(BLE_GATT_DSC_CLT_CFG_UUID16);
   +BLE_UUID16_DECLARE(BLE_GATT_DSC_CLT_CFG_UUID16);

static const char * const ble_gatt_chr_f_names[] = {
"BROADCAST",
   ```
   
   
   
    nimble/host/src/ble_l2cap_sig.c
   
   
   ```diff
   @@ -50,8 +50,8 @@

#if NIMBLE_BLE_CONNECT

/*
   - * $definitions / declarations  
 *
   - 
*/
   +* $definitions / declarations   
*
   
+*/

#define BLE_L2CAP_SIG_UNRESPONSIVE_TIMEOUT  3   /* Milliseconds. */

   ```
   
   



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

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




[GitHub] [mynewt-nimble] apache-mynewt-bot removed a comment on pull request #913: Optimize host size

2021-02-16 Thread GitBox


apache-mynewt-bot removed a comment on pull request #913:
URL: https://github.com/apache/mynewt-nimble/pull/913#issuecomment-779785424


   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    nimble/host/services/gap/src/ble_svc_gap.c
   
   
   ```diff
   @@ -38,7 +38,7 @@
static ble_svc_gap_chr_changed_fn *ble_svc_gap_chr_changed_cb_fn;

static char ble_svc_gap_name[BLE_SVC_GAP_NAME_MAX_LEN + 1] =
   -MYNEWT_VAL(BLE_SVC_GAP_DEVICE_NAME);
   +MYNEWT_VAL(BLE_SVC_GAP_DEVICE_NAME);
static uint16_t ble_svc_gap_appearance = MYNEWT_VAL(BLE_SVC_GAP_APPEARANCE);

#if NIMBLE_BLE_CONNECT
   ```
   
   
   
    nimble/host/src/ble_att_clt.c
   
   
   ```diff
   @@ -28,8 +28,8 @@

#if NIMBLE_BLE_CONNECT

/*
   - * $error response  
 *
   - 
*/
   +* $error response   
*
   
+*/

int
ble_att_clt_rx_error(uint16_t conn_handle, struct os_mbuf **rxom)
   ```
   
   
   
    nimble/host/src/ble_gap.c
   
   
   ```diff
   @@ -386,8 +386,8 @@
#endif


/*
   - * $snapshot
 *
   - 
*/
   +* $snapshot 
*
   
+*/

#if NIMBLE_BLE_CONNECT
static void
   @@ -620,7 +620,7 @@

int
ble_gap_set_prefered_le_phy(uint16_t conn_handle, uint8_t tx_phys_mask,
   -   uint8_t rx_phys_mask, uint16_t phy_opts)
   +uint8_t rx_phys_mask, uint16_t phy_opts)
{
#if NIMBLE_BLE_CONNECT
struct ble_hci_le_set_phy_cp cmd;
   @@ -5147,8 +5145,8 @@
}


/*
   - * $cancel  
 *
   - 
*/
   +* $cancel   
*
   
+*/

#if NIMBLE_BLE_CONNECT
static int
   ```
   
   
   
    nimble/host/src/ble_gattc.c
   
   
   ```diff
   @@ -62,8 +62,8 @@

#if NIMBLE_BLE_CONNECT

/*
   - * $definitions / declarations  
 *
   - 
*/
   +* $definitions / declarations   
*
   
+*/

/**
 * The maximum time to wait for a single ATT response.  The spec defines 
this
   ```
   
   
   
    nimble/host/src/ble_gatts_lcl.c
   
   
   ```diff
   @@ -26,7 +26,7 @@

#if NIMBLE_BLE_CONNECT
static const ble_uuid_t *uuid_ccc =
   -BLE_UUID16_DECLARE(BLE_GATT_DSC_CLT_CFG_UUID16);
   +BLE_UUID16_DECLARE(BLE_GATT_DSC_CLT_CFG_UUID16);

static const char * const ble_gatt_chr_f_names[] = {
"BROADCAST",
   ```
   
   
   
    nimble/host/src/ble_l2cap_sig.c
   
   
   ```diff
   @@ -50,8 +50,8 @@

#if NIMBLE_BLE_CONNECT

/*
   - * $definitions / declarations  
 *
   - 
*/
   +* $definitions / declarations   
*
   
+*/

#define BLE_L2CAP_SIG_UNRESPONSIVE_TIMEOUT  3   /* Milliseconds. */

   ```
   
   



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

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




[GitHub] [mynewt-nimble] apache-mynewt-bot removed a comment on pull request #913: Optimize host size

2021-02-16 Thread GitBox


apache-mynewt-bot removed a comment on pull request #913:
URL: https://github.com/apache/mynewt-nimble/pull/913#issuecomment-779809233


   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    nimble/host/services/gap/src/ble_svc_gap.c
   
   
   ```diff
   @@ -38,7 +38,7 @@
static ble_svc_gap_chr_changed_fn *ble_svc_gap_chr_changed_cb_fn;

static char ble_svc_gap_name[BLE_SVC_GAP_NAME_MAX_LEN + 1] =
   -MYNEWT_VAL(BLE_SVC_GAP_DEVICE_NAME);
   +MYNEWT_VAL(BLE_SVC_GAP_DEVICE_NAME);
static uint16_t ble_svc_gap_appearance = MYNEWT_VAL(BLE_SVC_GAP_APPEARANCE);

#if NIMBLE_BLE_CONNECT
   ```
   
   
   
    nimble/host/src/ble_att_clt.c
   
   
   ```diff
   @@ -28,8 +28,8 @@

#if NIMBLE_BLE_CONNECT

/*
   - * $error response  
 *
   - 
*/
   +* $error response   
*
   
+*/

int
ble_att_clt_rx_error(uint16_t conn_handle, struct os_mbuf **rxom)
   ```
   
   
   
    nimble/host/src/ble_gap.c
   
   
   ```diff
   @@ -386,8 +386,8 @@
#endif


/*
   - * $snapshot
 *
   - 
*/
   +* $snapshot 
*
   
+*/

#if NIMBLE_BLE_CONNECT
static void
   @@ -620,7 +620,7 @@

int
ble_gap_set_prefered_le_phy(uint16_t conn_handle, uint8_t tx_phys_mask,
   -   uint8_t rx_phys_mask, uint16_t phy_opts)
   +uint8_t rx_phys_mask, uint16_t phy_opts)
{
#if NIMBLE_BLE_CONNECT
struct ble_hci_le_set_phy_cp cmd;
   @@ -5141,8 +5139,8 @@
}


/*
   - * $cancel  
 *
   - 
*/
   +* $cancel   
*
   
+*/

#if NIMBLE_BLE_CONNECT
static int
   ```
   
   
   
    nimble/host/src/ble_gattc.c
   
   
   ```diff
   @@ -62,8 +62,8 @@

#if NIMBLE_BLE_CONNECT

/*
   - * $definitions / declarations  
 *
   - 
*/
   +* $definitions / declarations   
*
   
+*/

/**
 * The maximum time to wait for a single ATT response.  The spec defines 
this
   ```
   
   
   
    nimble/host/src/ble_gatts_lcl.c
   
   
   ```diff
   @@ -26,7 +26,7 @@

#if NIMBLE_BLE_CONNECT
static const ble_uuid_t *uuid_ccc =
   -BLE_UUID16_DECLARE(BLE_GATT_DSC_CLT_CFG_UUID16);
   +BLE_UUID16_DECLARE(BLE_GATT_DSC_CLT_CFG_UUID16);

static const char * const ble_gatt_chr_f_names[] = {
"BROADCAST",
   ```
   
   
   
    nimble/host/src/ble_l2cap_sig.c
   
   
   ```diff
   @@ -50,8 +50,8 @@

#if NIMBLE_BLE_CONNECT

/*
   - * $definitions / declarations  
 *
   - 
*/
   +* $definitions / declarations   
*
   
+*/

#define BLE_L2CAP_SIG_UNRESPONSIVE_TIMEOUT  3   /* Milliseconds. */

   ```
   
   



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

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




[GitHub] [mynewt-nimble] apache-mynewt-bot commented on pull request #913: Optimize host size

2021-02-16 Thread GitBox


apache-mynewt-bot commented on pull request #913:
URL: https://github.com/apache/mynewt-nimble/pull/913#issuecomment-779812240


   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    nimble/host/services/gap/src/ble_svc_gap.c
   
   
   ```diff
   @@ -38,7 +38,7 @@
static ble_svc_gap_chr_changed_fn *ble_svc_gap_chr_changed_cb_fn;

static char ble_svc_gap_name[BLE_SVC_GAP_NAME_MAX_LEN + 1] =
   -MYNEWT_VAL(BLE_SVC_GAP_DEVICE_NAME);
   +MYNEWT_VAL(BLE_SVC_GAP_DEVICE_NAME);
static uint16_t ble_svc_gap_appearance = MYNEWT_VAL(BLE_SVC_GAP_APPEARANCE);

#if NIMBLE_BLE_CONNECT
   ```
   
   
   
    nimble/host/src/ble_att_clt.c
   
   
   ```diff
   @@ -28,8 +28,8 @@

#if NIMBLE_BLE_CONNECT

/*
   - * $error response  
 *
   - 
*/
   +* $error response   
*
   
+*/

int
ble_att_clt_rx_error(uint16_t conn_handle, struct os_mbuf **rxom)
   ```
   
   
   
    nimble/host/src/ble_gap.c
   
   
   ```diff
   @@ -386,8 +386,8 @@
#endif


/*
   - * $snapshot
 *
   - 
*/
   +* $snapshot 
*
   
+*/

#if NIMBLE_BLE_CONNECT
static void
   @@ -620,7 +620,7 @@

int
ble_gap_set_prefered_le_phy(uint16_t conn_handle, uint8_t tx_phys_mask,
   -   uint8_t rx_phys_mask, uint16_t phy_opts)
   +uint8_t rx_phys_mask, uint16_t phy_opts)
{
#if NIMBLE_BLE_CONNECT
struct ble_hci_le_set_phy_cp cmd;
   @@ -5147,8 +5145,8 @@
}


/*
   - * $cancel  
 *
   - 
*/
   +* $cancel   
*
   
+*/

#if NIMBLE_BLE_CONNECT
static int
   ```
   
   
   
    nimble/host/src/ble_gattc.c
   
   
   ```diff
   @@ -62,8 +62,8 @@

#if NIMBLE_BLE_CONNECT

/*
   - * $definitions / declarations  
 *
   - 
*/
   +* $definitions / declarations   
*
   
+*/

/**
 * The maximum time to wait for a single ATT response.  The spec defines 
this
   ```
   
   
   
    nimble/host/src/ble_gatts_lcl.c
   
   
   ```diff
   @@ -26,7 +26,7 @@

#if NIMBLE_BLE_CONNECT
static const ble_uuid_t *uuid_ccc =
   -BLE_UUID16_DECLARE(BLE_GATT_DSC_CLT_CFG_UUID16);
   +BLE_UUID16_DECLARE(BLE_GATT_DSC_CLT_CFG_UUID16);

static const char * const ble_gatt_chr_f_names[] = {
"BROADCAST",
   ```
   
   
   
    nimble/host/src/ble_l2cap_sig.c
   
   
   ```diff
   @@ -50,8 +50,8 @@

#if NIMBLE_BLE_CONNECT

/*
   - * $definitions / declarations  
 *
   - 
*/
   +* $definitions / declarations   
*
   
+*/

#define BLE_L2CAP_SIG_UNRESPONSIVE_TIMEOUT  3   /* Milliseconds. */

   ```
   
   



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

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




[GitHub] [mynewt-nimble] KKopyscinski commented on pull request #913: Optimize host size

2021-02-16 Thread GitBox


KKopyscinski commented on pull request #913:
URL: https://github.com/apache/mynewt-nimble/pull/913#issuecomment-779792566


   this soves https://github.com/apache/mynewt-nimble/issues/224



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

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




[GitHub] [mynewt-nimble] apache-mynewt-bot removed a comment on pull request #913: Optimize host size

2021-02-16 Thread GitBox


apache-mynewt-bot removed a comment on pull request #913:
URL: https://github.com/apache/mynewt-nimble/pull/913#issuecomment-779682021


   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    nimble/host/services/gap/src/ble_svc_gap.c
   
   
   ```diff
   @@ -38,7 +38,7 @@
static ble_svc_gap_chr_changed_fn *ble_svc_gap_chr_changed_cb_fn;

static char ble_svc_gap_name[BLE_SVC_GAP_NAME_MAX_LEN + 1] =
   -MYNEWT_VAL(BLE_SVC_GAP_DEVICE_NAME);
   +MYNEWT_VAL(BLE_SVC_GAP_DEVICE_NAME);
static uint16_t ble_svc_gap_appearance = MYNEWT_VAL(BLE_SVC_GAP_APPEARANCE);

#if NIMBLE_BLE_CONNECT
   ```
   
   
   
    nimble/host/src/ble_att_clt.c
   
   
   ```diff
   @@ -28,8 +28,8 @@

#if NIMBLE_BLE_CONNECT

/*
   - * $error response  
 *
   - 
*/
   +* $error response   
*
   
+*/

int
ble_att_clt_rx_error(uint16_t conn_handle, struct os_mbuf **rxom)
   ```
   
   
   
    nimble/host/src/ble_gap.c
   
   
   ```diff
   @@ -386,8 +386,8 @@
#endif


/*
   - * $snapshot
 *
   - 
*/
   +* $snapshot 
*
   
+*/

#if NIMBLE_BLE_CONNECT
static void
   @@ -620,7 +620,7 @@

int
ble_gap_set_prefered_le_phy(uint16_t conn_handle, uint8_t tx_phys_mask,
   -   uint8_t rx_phys_mask, uint16_t phy_opts)
   +uint8_t rx_phys_mask, uint16_t phy_opts)
{
#if NIMBLE_BLE_CONNECT
struct ble_hci_le_set_phy_cp cmd;
   @@ -5147,8 +5145,8 @@
}


/*
   - * $cancel  
 *
   - 
*/
   +* $cancel   
*
   
+*/

#if NIMBLE_BLE_CONNECT
static int
   ```
   
   
   
    nimble/host/src/ble_gattc.c
   
   
   ```diff
   @@ -62,8 +62,8 @@

#if NIMBLE_BLE_CONNECT

/*
   - * $definitions / declarations  
 *
   - 
*/
   +* $definitions / declarations   
*
   
+*/

/**
 * The maximum time to wait for a single ATT response.  The spec defines 
this
   ```
   
   
   
    nimble/host/src/ble_gatts_lcl.c
   
   
   ```diff
   @@ -26,7 +26,7 @@

#if NIMBLE_BLE_CONNECT
static const ble_uuid_t *uuid_ccc =
   -BLE_UUID16_DECLARE(BLE_GATT_DSC_CLT_CFG_UUID16);
   +BLE_UUID16_DECLARE(BLE_GATT_DSC_CLT_CFG_UUID16);

static const char * const ble_gatt_chr_f_names[] = {
"BROADCAST",
   ```
   
   
   
    nimble/host/src/ble_l2cap_sig.c
   
   
   ```diff
   @@ -50,8 +50,8 @@

#if NIMBLE_BLE_CONNECT

/*
   - * $definitions / declarations  
 *
   - 
*/
   +* $definitions / declarations   
*
   
+*/

#define BLE_L2CAP_SIG_UNRESPONSIVE_TIMEOUT  3   /* Milliseconds. */

   ```
   
   



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

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




[GitHub] [mynewt-nimble] apache-mynewt-bot commented on pull request #913: Optimize host size

2021-02-16 Thread GitBox


apache-mynewt-bot commented on pull request #913:
URL: https://github.com/apache/mynewt-nimble/pull/913#issuecomment-779785424


   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    nimble/host/services/gap/src/ble_svc_gap.c
   
   
   ```diff
   @@ -38,7 +38,7 @@
static ble_svc_gap_chr_changed_fn *ble_svc_gap_chr_changed_cb_fn;

static char ble_svc_gap_name[BLE_SVC_GAP_NAME_MAX_LEN + 1] =
   -MYNEWT_VAL(BLE_SVC_GAP_DEVICE_NAME);
   +MYNEWT_VAL(BLE_SVC_GAP_DEVICE_NAME);
static uint16_t ble_svc_gap_appearance = MYNEWT_VAL(BLE_SVC_GAP_APPEARANCE);

#if NIMBLE_BLE_CONNECT
   ```
   
   
   
    nimble/host/src/ble_att_clt.c
   
   
   ```diff
   @@ -28,8 +28,8 @@

#if NIMBLE_BLE_CONNECT

/*
   - * $error response  
 *
   - 
*/
   +* $error response   
*
   
+*/

int
ble_att_clt_rx_error(uint16_t conn_handle, struct os_mbuf **rxom)
   ```
   
   
   
    nimble/host/src/ble_gap.c
   
   
   ```diff
   @@ -386,8 +386,8 @@
#endif


/*
   - * $snapshot
 *
   - 
*/
   +* $snapshot 
*
   
+*/

#if NIMBLE_BLE_CONNECT
static void
   @@ -620,7 +620,7 @@

int
ble_gap_set_prefered_le_phy(uint16_t conn_handle, uint8_t tx_phys_mask,
   -   uint8_t rx_phys_mask, uint16_t phy_opts)
   +uint8_t rx_phys_mask, uint16_t phy_opts)
{
#if NIMBLE_BLE_CONNECT
struct ble_hci_le_set_phy_cp cmd;
   @@ -5147,8 +5145,8 @@
}


/*
   - * $cancel  
 *
   - 
*/
   +* $cancel   
*
   
+*/

#if NIMBLE_BLE_CONNECT
static int
   ```
   
   
   
    nimble/host/src/ble_gattc.c
   
   
   ```diff
   @@ -62,8 +62,8 @@

#if NIMBLE_BLE_CONNECT

/*
   - * $definitions / declarations  
 *
   - 
*/
   +* $definitions / declarations   
*
   
+*/

/**
 * The maximum time to wait for a single ATT response.  The spec defines 
this
   ```
   
   
   
    nimble/host/src/ble_gatts_lcl.c
   
   
   ```diff
   @@ -26,7 +26,7 @@

#if NIMBLE_BLE_CONNECT
static const ble_uuid_t *uuid_ccc =
   -BLE_UUID16_DECLARE(BLE_GATT_DSC_CLT_CFG_UUID16);
   +BLE_UUID16_DECLARE(BLE_GATT_DSC_CLT_CFG_UUID16);

static const char * const ble_gatt_chr_f_names[] = {
"BROADCAST",
   ```
   
   
   
    nimble/host/src/ble_l2cap_sig.c
   
   
   ```diff
   @@ -50,8 +50,8 @@

#if NIMBLE_BLE_CONNECT

/*
   - * $definitions / declarations  
 *
   - 
*/
   +* $definitions / declarations   
*
   
+*/

#define BLE_L2CAP_SIG_UNRESPONSIVE_TIMEOUT  3   /* Milliseconds. */

   ```
   
   



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

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




[GitHub] [mynewt-nimble] andrzej-kaczmarek commented on issue #912: Controller: Assertion fail in ble_ll_scan.c with extended advertisings

2021-02-16 Thread GitBox


andrzej-kaczmarek commented on issue #912:
URL: https://github.com/apache/mynewt-nimble/issues/912#issuecomment-779752561


   @janosbrodbeck instead of coredump you can just dump RAM address area to 
binary file and attach it with application .elf. We will also try to reproduce 
this locally here with your app but it can take a while so if you can provide 
such dump we can try to analyze quickly.



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

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




[GitHub] [mynewt-nimble] apache-mynewt-bot commented on pull request #913: Optimize host size

2021-02-16 Thread GitBox


apache-mynewt-bot commented on pull request #913:
URL: https://github.com/apache/mynewt-nimble/pull/913#issuecomment-779682021


   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    nimble/host/services/gap/src/ble_svc_gap.c
   
   
   ```diff
   @@ -38,7 +38,7 @@
static ble_svc_gap_chr_changed_fn *ble_svc_gap_chr_changed_cb_fn;

static char ble_svc_gap_name[BLE_SVC_GAP_NAME_MAX_LEN + 1] =
   -MYNEWT_VAL(BLE_SVC_GAP_DEVICE_NAME);
   +MYNEWT_VAL(BLE_SVC_GAP_DEVICE_NAME);
static uint16_t ble_svc_gap_appearance = MYNEWT_VAL(BLE_SVC_GAP_APPEARANCE);

#if NIMBLE_BLE_CONNECT
   ```
   
   
   
    nimble/host/src/ble_att_clt.c
   
   
   ```diff
   @@ -28,8 +28,8 @@

#if NIMBLE_BLE_CONNECT

/*
   - * $error response  
 *
   - 
*/
   +* $error response   
*
   
+*/

int
ble_att_clt_rx_error(uint16_t conn_handle, struct os_mbuf **rxom)
   ```
   
   
   
    nimble/host/src/ble_gap.c
   
   
   ```diff
   @@ -386,8 +386,8 @@
#endif


/*
   - * $snapshot
 *
   - 
*/
   +* $snapshot 
*
   
+*/

#if NIMBLE_BLE_CONNECT
static void
   @@ -620,7 +620,7 @@

int
ble_gap_set_prefered_le_phy(uint16_t conn_handle, uint8_t tx_phys_mask,
   -   uint8_t rx_phys_mask, uint16_t phy_opts)
   +uint8_t rx_phys_mask, uint16_t phy_opts)
{
#if NIMBLE_BLE_CONNECT
struct ble_hci_le_set_phy_cp cmd;
   @@ -5147,8 +5145,8 @@
}


/*
   - * $cancel  
 *
   - 
*/
   +* $cancel   
*
   
+*/

#if NIMBLE_BLE_CONNECT
static int
   ```
   
   
   
    nimble/host/src/ble_gattc.c
   
   
   ```diff
   @@ -62,8 +62,8 @@

#if NIMBLE_BLE_CONNECT

/*
   - * $definitions / declarations  
 *
   - 
*/
   +* $definitions / declarations   
*
   
+*/

/**
 * The maximum time to wait for a single ATT response.  The spec defines 
this
   ```
   
   
   
    nimble/host/src/ble_gatts_lcl.c
   
   
   ```diff
   @@ -26,7 +26,7 @@

#if NIMBLE_BLE_CONNECT
static const ble_uuid_t *uuid_ccc =
   -BLE_UUID16_DECLARE(BLE_GATT_DSC_CLT_CFG_UUID16);
   +BLE_UUID16_DECLARE(BLE_GATT_DSC_CLT_CFG_UUID16);

static const char * const ble_gatt_chr_f_names[] = {
"BROADCAST",
   ```
   
   
   
    nimble/host/src/ble_l2cap_sig.c
   
   
   ```diff
   @@ -50,8 +50,8 @@

#if NIMBLE_BLE_CONNECT

/*
   - * $definitions / declarations  
 *
   - 
*/
   +* $definitions / declarations   
*
   
+*/

#define BLE_L2CAP_SIG_UNRESPONSIVE_TIMEOUT  3   /* Milliseconds. */

   ```
   
   



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

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




[GitHub] [mynewt-nimble] apache-mynewt-bot removed a comment on pull request #913: Optimize host size

2021-02-16 Thread GitBox


apache-mynewt-bot removed a comment on pull request #913:
URL: https://github.com/apache/mynewt-nimble/pull/913#issuecomment-779641285


   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    nimble/host/services/gap/src/ble_svc_gap.c
   
   
   ```diff
   @@ -38,7 +38,7 @@
static ble_svc_gap_chr_changed_fn *ble_svc_gap_chr_changed_cb_fn;

static char ble_svc_gap_name[BLE_SVC_GAP_NAME_MAX_LEN + 1] =
   -MYNEWT_VAL(BLE_SVC_GAP_DEVICE_NAME);
   +MYNEWT_VAL(BLE_SVC_GAP_DEVICE_NAME);
static uint16_t ble_svc_gap_appearance = MYNEWT_VAL(BLE_SVC_GAP_APPEARANCE);

#if NIMBLE_BLE_CONNECT
   ```
   
   
   
    nimble/host/src/ble_att_clt.c
   
   
   ```diff
   @@ -28,8 +28,8 @@

#if NIMBLE_BLE_CONNECT

/*
   - * $error response  
 *
   - 
*/
   +* $error response   
*
   
+*/

int
ble_att_clt_rx_error(uint16_t conn_handle, struct os_mbuf **rxom)
   ```
   
   
   
    nimble/host/src/ble_gap.c
   
   
   ```diff
   @@ -386,8 +386,8 @@
#endif


/*
   - * $snapshot
 *
   - 
*/
   +* $snapshot 
*
   
+*/

#if NIMBLE_BLE_CONNECT
static void
   @@ -620,7 +620,7 @@

int
ble_gap_set_prefered_le_phy(uint16_t conn_handle, uint8_t tx_phys_mask,
   -   uint8_t rx_phys_mask, uint16_t phy_opts)
   +uint8_t rx_phys_mask, uint16_t phy_opts)
{
#if NIMBLE_BLE_CONNECT
struct ble_hci_le_set_phy_cp cmd;
   @@ -5147,8 +5145,8 @@
}


/*
   - * $cancel  
 *
   - 
*/
   +* $cancel   
*
   
+*/

#if NIMBLE_BLE_CONNECT
static int
   ```
   
   
   
    nimble/host/src/ble_gattc.c
   
   
   ```diff
   @@ -62,8 +62,8 @@

#if NIMBLE_BLE_CONNECT

/*
   - * $definitions / declarations  
 *
   - 
*/
   +* $definitions / declarations   
*
   
+*/

/**
 * The maximum time to wait for a single ATT response.  The spec defines 
this
   ```
   
   
   
    nimble/host/src/ble_gatts_lcl.c
   
   
   ```diff
   @@ -26,7 +26,7 @@

#if NIMBLE_BLE_CONNECT
static const ble_uuid_t *uuid_ccc =
   -BLE_UUID16_DECLARE(BLE_GATT_DSC_CLT_CFG_UUID16);
   +BLE_UUID16_DECLARE(BLE_GATT_DSC_CLT_CFG_UUID16);

static const char * const ble_gatt_chr_f_names[] = {
"BROADCAST",
   ```
   
   
   
    nimble/host/src/ble_l2cap_sig.c
   
   
   ```diff
   @@ -50,8 +50,8 @@

#if NIMBLE_BLE_CONNECT

/*
   - * $definitions / declarations  
 *
   - 
*/
   +* $definitions / declarations   
*
   
+*/

#define BLE_L2CAP_SIG_UNRESPONSIVE_TIMEOUT  3   /* Milliseconds. */

   ```
   
   



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

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




[GitHub] [mynewt-mcumgr] greg-leach commented on a change in pull request #112: Bug #18312 Add support for half-floats to MCUMGR

2021-02-16 Thread GitBox


greg-leach commented on a change in pull request #112:
URL: https://github.com/apache/mynewt-mcumgr/pull/112#discussion_r576629784



##
File path: cborattr/src/cborattr.c
##
@@ -67,6 +67,11 @@ valid_attr_type(CborType ct, CborAttrType at)
 }
break;
 #if FLOAT_SUPPORT
+case CborAttrHalfFloatType:
+if (ct == CborHalfFloatType) {
+return 1;
+}
+break;

Review comment:
   Definitely yes. The half float type will only be used when CBOR is 
compacting float data into a half float type to save on message space. 





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

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




[GitHub] [mynewt-mcumgr] greg-leach commented on a change in pull request #112: Bug #18312 Add support for half-floats to MCUMGR

2021-02-16 Thread GitBox


greg-leach commented on a change in pull request #112:
URL: https://github.com/apache/mynewt-mcumgr/pull/112#discussion_r576629119



##
File path: cborattr/include/cborattr/cborattr.h
##
@@ -85,6 +86,9 @@ struct cbor_array_t {
 struct {
 double *store;
 } reals;
+struct{
+int *store;
+} halffloats;

Review comment:
   The thinking here was to use standard C types, looking further on in the 
code I can see uint16_t being used. I've updated the halffloat to be a uint16_t 
type.





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

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




[GitHub] [mynewt-nimble] KKopyscinski commented on pull request #872: nimble/porting: sync with core

2021-02-16 Thread GitBox


KKopyscinski commented on pull request #872:
URL: https://github.com/apache/mynewt-nimble/pull/872#issuecomment-779664413


   @btashton https://github.com/apache/mynewt-nimble/pull/915 should fix this.
   Also, to make sure code won't broke like that in the future, you can add 
target to https://github.com/JuulLabs-OSS/mynewt-travis-ci



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

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