[mynewt-core] branch master updated: hw/mcu/dialog: added critical section to dma acquire peripheral

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

wes3 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 f1229062c hw/mcu/dialog: added critical section to dma acquire 
peripheral
f1229062c is described below

commit f1229062c75b318bde7442a51245027a90e3a39b
Author: Dustin Franco 
AuthorDate: Thu Sep 28 11:27:39 2023 -0700

hw/mcu/dialog: added critical section to dma acquire peripheral
---
 hw/mcu/dialog/da1469x/src/da1469x_dma.c | 14 ++
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/hw/mcu/dialog/da1469x/src/da1469x_dma.c 
b/hw/mcu/dialog/da1469x/src/da1469x_dma.c
index 6e8f39e20..de5f8c230 100644
--- a/hw/mcu/dialog/da1469x/src/da1469x_dma.c
+++ b/hw/mcu/dialog/da1469x/src/da1469x_dma.c
@@ -164,17 +164,22 @@ int
 da1469x_dma_acquire_periph(int cidx, uint8_t periph,
struct da1469x_dma_regs *chans[2])
 {
+int sr;
+int rc = 0;
 assert(cidx < MCU_DMA_CHAN_MAX && periph < MCU_DMA_PERIPH_NONE);
+OS_ENTER_CRITICAL(sr);
 
 if (cidx < 0) {
 cidx = find_free_pair();
 if (cidx < 0) {
-return SYS_ENOENT;
+rc = SYS_ENOENT;
+goto out;
 }
 } else {
 cidx &= 0xfe;
 if (g_da1469x_dma_acquired & (3 << cidx)) {
-return SYS_EBUSY;
+rc = SYS_EBUSY;
+goto out;
 }
 }
 
@@ -191,8 +196,9 @@ da1469x_dma_acquire_periph(int cidx, uint8_t periph,
 
 chans[0]->DMA_CTRL_REG |= DMA_DMA0_CTRL_REG_DREQ_MODE_Msk;
 chans[1]->DMA_CTRL_REG |= DMA_DMA0_CTRL_REG_DREQ_MODE_Msk;
-
-return 0;
+out:
+OS_EXIT_CRITICAL(sr);
+return rc;
 }
 
 int



[mynewt-core] branch master updated: sys/config: fix CONF_FLOAT

2023-09-13 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 c9a3c6bc5 sys/config: fix CONF_FLOAT
c9a3c6bc5 is described below

commit c9a3c6bc55ef0a4abc46633ecab9045bf88f4f59
Author: Will San Filippo 
AuthorDate: Wed Sep 13 10:58:37 2023 -0400

sys/config: fix CONF_FLOAT

The check in conf_value_from_str for CONF_FLOAT is incorrect.
FLT_MIN is not the smallest negative float; it is the smallest
positive float. Removing the check for min/max value as it is
not needed in this case.
---
 sys/config/src/config.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/sys/config/src/config.c b/sys/config/src/config.c
index cb35d56b0..62c3be9f4 100644
--- a/sys/config/src/config.c
+++ b/sys/config/src/config.c
@@ -228,9 +228,6 @@ conf_value_from_str(char *val_str, enum conf_type type, 
void *vp, int maxlen)
 if (*eptr != '\0') {
 goto err;
 }
-if ((fval < FLT_MIN) || (fval > FLT_MAX)) {
-goto err;
-}
 *(float *)vp = fval;
 break;
 case CONF_STRING:



[mynewt-core] branch master updated: sys/config: Add CONF_FLOAT

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

wes3 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 ed7a54835 sys/config: Add CONF_FLOAT
ed7a54835 is described below

commit ed7a54835e4efae2937cb75ce9cb6e61dbc97955
Author: Will San Filippo 
AuthorDate: Fri Jul 28 12:18:32 2023 -0400

sys/config: Add CONF_FLOAT

CONF_FLOAT was defined as a type but not implemented. This change
adds CONF_FLOAT.
---
 libc/baselibc/include/stdlib.h |  1 +
 sys/config/src/config.c| 18 ++
 2 files changed, 19 insertions(+)

diff --git a/libc/baselibc/include/stdlib.h b/libc/baselibc/include/stdlib.h
index d80a0f8a5..071342735 100644
--- a/libc/baselibc/include/stdlib.h
+++ b/libc/baselibc/include/stdlib.h
@@ -57,6 +57,7 @@ __extern long strtol(const char *, char **, int);
 __extern long long strtoll(const char *, char **, int);
 __extern unsigned long strtoul(const char *, char **, int);
 __extern unsigned long long strtoull(const char *, char **, int);
+__extern float strtof(const char *, char **);
 
 typedef int (*__comparefunc_t) (const void *, const void *);
 __extern void *bsearch(const void *, const void *, size_t, size_t,
diff --git a/sys/config/src/config.c b/sys/config/src/config.c
index a1b08e07a..cb35d56b0 100644
--- a/sys/config/src/config.c
+++ b/sys/config/src/config.c
@@ -19,6 +19,8 @@
 
 #include 
 #include 
+#include 
+#include 
 
 #include "os/mynewt.h"
 #include "base64/base64.h"
@@ -154,6 +156,7 @@ conf_value_from_str(char *val_str, enum conf_type type, 
void *vp, int maxlen)
 {
 int64_t val;
 uint64_t uval;
+float fval;
 char *eptr;
 
 if (!val_str) {
@@ -220,6 +223,16 @@ conf_value_from_str(char *val_str, enum conf_type type, 
void *vp, int maxlen)
 *(uint64_t *)vp = uval;
 }
 break;
+case CONF_FLOAT:
+fval = strtof(val_str, );
+if (*eptr != '\0') {
+goto err;
+}
+if ((fval < FLT_MIN) || (fval > FLT_MAX)) {
+goto err;
+}
+*(float *)vp = fval;
+break;
 case CONF_STRING:
 val = strlen(val_str);
 if (val + 1 > maxlen) {
@@ -256,6 +269,7 @@ conf_str_from_value(enum conf_type type, void *vp, char 
*buf, int buf_len)
 {
 int64_t val;
 uint64_t uval;
+float fval;
 
 if (type == CONF_STRING) {
 return vp;
@@ -294,6 +308,10 @@ conf_str_from_value(enum conf_type type, void *vp, char 
*buf, int buf_len)
 }
 snprintf(buf, buf_len, "%llu", uval);
 return buf;
+case CONF_FLOAT:
+fval = *(float *)vp;
+snprintf(buf, buf_len, "%f", fval);
+return buf;
 default:
 return NULL;
 }



[mynewt-core] branch config_conf_float deleted (was 5f58e32dd)

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

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


 was 5f58e32dd sys/config: Add CONF_FLOAT to config

This change permanently discards the following revisions:

 discard 5f58e32dd sys/config: Add CONF_FLOAT to config



[mynewt-core] 01/01: sys/config: Add CONF_FLOAT to config

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

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

commit 5f58e32dd5cb72c486f634e92dc6e4f1c66e225f
Author: Will San Filippo 
AuthorDate: Fri Jul 28 12:11:02 2023 -0400

sys/config: Add CONF_FLOAT to config

CONF_FLOAT was defined as a type but not implemented. This change
adds CONF_FLOAT.
---
 libc/baselibc/include/stdlib.h |  1 +
 sys/config/src/config.c| 18 ++
 2 files changed, 19 insertions(+)

diff --git a/libc/baselibc/include/stdlib.h b/libc/baselibc/include/stdlib.h
index d80a0f8a5..071342735 100644
--- a/libc/baselibc/include/stdlib.h
+++ b/libc/baselibc/include/stdlib.h
@@ -57,6 +57,7 @@ __extern long strtol(const char *, char **, int);
 __extern long long strtoll(const char *, char **, int);
 __extern unsigned long strtoul(const char *, char **, int);
 __extern unsigned long long strtoull(const char *, char **, int);
+__extern float strtof(const char *, char **);
 
 typedef int (*__comparefunc_t) (const void *, const void *);
 __extern void *bsearch(const void *, const void *, size_t, size_t,
diff --git a/sys/config/src/config.c b/sys/config/src/config.c
index a1b08e07a..cb35d56b0 100644
--- a/sys/config/src/config.c
+++ b/sys/config/src/config.c
@@ -19,6 +19,8 @@
 
 #include 
 #include 
+#include 
+#include 
 
 #include "os/mynewt.h"
 #include "base64/base64.h"
@@ -154,6 +156,7 @@ conf_value_from_str(char *val_str, enum conf_type type, 
void *vp, int maxlen)
 {
 int64_t val;
 uint64_t uval;
+float fval;
 char *eptr;
 
 if (!val_str) {
@@ -220,6 +223,16 @@ conf_value_from_str(char *val_str, enum conf_type type, 
void *vp, int maxlen)
 *(uint64_t *)vp = uval;
 }
 break;
+case CONF_FLOAT:
+fval = strtof(val_str, );
+if (*eptr != '\0') {
+goto err;
+}
+if ((fval < FLT_MIN) || (fval > FLT_MAX)) {
+goto err;
+}
+*(float *)vp = fval;
+break;
 case CONF_STRING:
 val = strlen(val_str);
 if (val + 1 > maxlen) {
@@ -256,6 +269,7 @@ conf_str_from_value(enum conf_type type, void *vp, char 
*buf, int buf_len)
 {
 int64_t val;
 uint64_t uval;
+float fval;
 
 if (type == CONF_STRING) {
 return vp;
@@ -294,6 +308,10 @@ conf_str_from_value(enum conf_type type, void *vp, char 
*buf, int buf_len)
 }
 snprintf(buf, buf_len, "%llu", uval);
 return buf;
+case CONF_FLOAT:
+fval = *(float *)vp;
+snprintf(buf, buf_len, "%f", fval);
+return buf;
 default:
 return NULL;
 }



[mynewt-core] branch config_conf_float created (now 5f58e32dd)

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

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


  at 5f58e32dd sys/config: Add CONF_FLOAT to config

This branch includes the following new commits:

 new 5f58e32dd sys/config: Add CONF_FLOAT to config

The 1 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.




[mynewt-core] 01/04: hw/bus/drivers/spi_da1469x: Allow for 16-bit dma transfers

2023-06-19 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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

commit 2c7730f8658d1234609f4f5eae59442d5a6f5412
Author: Will San Filippo 
AuthorDate: Tue Jun 13 17:42:15 2023 -0400

hw/bus/drivers/spi_da1469x: Allow for 16-bit dma transfers

Changes allow for 16-bit DMA transfers for spi. Note that the
current hal and other configuration code do not allow the
spi to be configured for 16 bits. However, if this is
configured outside the provided API this code will allow for
the proper size transfer.
---
 hw/bus/drivers/spi_da1469x/src/spi_da1469x.c | 57 ++--
 1 file changed, 53 insertions(+), 4 deletions(-)

diff --git a/hw/bus/drivers/spi_da1469x/src/spi_da1469x.c 
b/hw/bus/drivers/spi_da1469x/src/spi_da1469x.c
index 5287f9b02..8d2d5fe29 100644
--- a/hw/bus/drivers/spi_da1469x/src/spi_da1469x.c
+++ b/hw/bus/drivers/spi_da1469x/src/spi_da1469x.c
@@ -52,6 +52,9 @@ STATS_NAME_END(spi_da1469x_stats_section)
  */
 #define MIN_DMA_SIZE 8
 
+/* A value of 1 for the word size means 16-bit words */
+#define SPI_CTRL_REG_16BIT_WORD (1 << SPI_SPI_CTRL_REG_SPI_WORD_Pos) 
+
 static const struct da1469x_dma_config spi_write_rx_dma_cfg = {
 .priority = 0,
 .burst_mode = MCU_DMA_BURST_MODE_DISABLED,
@@ -68,6 +71,22 @@ static const struct da1469x_dma_config spi_write_tx_dma_cfg 
= {
 .src_inc = true,
 };
 
+static const struct da1469x_dma_config spi_write_rx_dma_cfg16 = {
+.priority = 0,
+.burst_mode = MCU_DMA_BURST_MODE_DISABLED,
+.bus_width = MCU_DMA_BUS_WIDTH_2B,
+.dst_inc = false,
+.src_inc = false,
+};
+
+static const struct da1469x_dma_config spi_write_tx_dma_cfg16 = {
+.priority = 0,
+.burst_mode = MCU_DMA_BURST_MODE_DISABLED,
+.bus_width = MCU_DMA_BUS_WIDTH_2B,
+.dst_inc = false,
+.src_inc = true,
+};
+
 static const struct da1469x_dma_config spi_read_rx_dma_cfg = {
 .priority = 0,
 .burst_mode = MCU_DMA_BURST_MODE_DISABLED,
@@ -84,6 +103,22 @@ static const struct da1469x_dma_config spi_read_tx_dma_cfg 
= {
 .src_inc = false,
 };
 
+static const struct da1469x_dma_config spi_read_rx_dma_cfg16 = {
+.priority = 0,
+.burst_mode = MCU_DMA_BURST_MODE_DISABLED,
+.bus_width = MCU_DMA_BUS_WIDTH_2B,
+.dst_inc = true,
+.src_inc = false,
+};
+
+static const struct da1469x_dma_config spi_read_tx_dma_cfg16 = {
+.priority = 0,
+.burst_mode = MCU_DMA_BURST_MODE_DISABLED,
+.bus_width = MCU_DMA_BUS_WIDTH_2B,
+.dst_inc = false,
+.src_inc = false,
+};
+
 static void spi_da1469x_spi0_isr(void);
 static void spi_da1469x_spi1_isr(void);
 
@@ -488,8 +523,14 @@ spi_da1469x_read(struct bus_dev *bdev, struct bus_node 
*bnode,
 dd->transfer.started = 1;
 if (length >= MIN_DMA_SIZE && dd->dma_chans[0] != NULL) {
 dd->transfer.dma = 1;
-da1469x_dma_configure(dd->dma_chans[0], _read_rx_dma_cfg, 
spi_da1469x_dma_done_cb, dd);
-da1469x_dma_configure(dd->dma_chans[1], _read_tx_dma_cfg, NULL, 
NULL);
+/* NOTE: assumes if 16-bit not used; dma transfers are 8-bits */
+if ((regs->SPI_CTRL_REG & SPI_SPI_CTRL_REG_SPI_WORD_Msk) == 
SPI_CTRL_REG_16BIT_WORD) {
+da1469x_dma_configure(dd->dma_chans[0], _read_rx_dma_cfg16, 
spi_da1469x_dma_done_cb, dd);
+da1469x_dma_configure(dd->dma_chans[1], _read_tx_dma_cfg16, 
NULL, NULL);
+} else {
+da1469x_dma_configure(dd->dma_chans[0], _read_rx_dma_cfg, 
spi_da1469x_dma_done_cb, dd);
+da1469x_dma_configure(dd->dma_chans[1], _read_tx_dma_cfg, 
NULL, NULL);
+}
 da1469x_dma_read_peripheral(dd->dma_chans[0], buf, length);
 da1469x_dma_write_peripheral(dd->dma_chans[1], _dummy_src, length);
 regs->SPI_CTRL_REG |= SPI_SPI_CTRL_REG_SPI_ON_Msk;
@@ -565,8 +606,16 @@ spi_da1469x_write(struct bus_dev *bdev, struct bus_node 
*bnode,
 dd->transfer.dma = 1;
 regs->SPI_CTRL_REG &= ~SPI_SPI_CTRL_REG_SPI_INT_BIT_Msk;
 spi_da1469x_int_disable(regs);
-da1469x_dma_configure(dd->dma_chans[0], _write_rx_dma_cfg, 
spi_da1469x_dma_done_cb, dd);
-da1469x_dma_configure(dd->dma_chans[1], _write_tx_dma_cfg, NULL, 
NULL);
+
+/* NOTE: assumes if 16-bit not used; dma transfers are 8-bits */
+if ((regs->SPI_CTRL_REG & SPI_SPI_CTRL_REG_SPI_WORD_Msk) == 
SPI_CTRL_REG_16BIT_WORD) {
+da1469x_dma_configure(dd->dma_chans[0], _write_rx_dma_cfg16, 
spi_da1469x_dma_done_cb, dd);
+da1469x_dma_configure(dd->dma_chans[1], _write_tx_dma_cfg16, 
NULL, NULL);
+} else {
+da1469x_dma_configure(dd->dma_chans[0], _write_rx_dma_cfg, 
spi_da1469x_dma_done_cb, dd);
+da1469x_dma_configure(dd->dma_chans[1], _write_tx_dma_cfg, 
NULL, NULL);
+}
+
 da1469x_dma_

[mynewt-core] 02/04: hw/bus/drivers/spi_da1469x: Allow for 16-bit dma transfers

2023-06-19 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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

commit f39917fe59526ccc2dad2753a115493f745ee2cd
Author: Will San Filippo 
AuthorDate: Wed Jun 14 10:53:13 2023 -0400

hw/bus/drivers/spi_da1469x: Allow for 16-bit dma transfers

Fix trailing space.
---
 hw/bus/drivers/spi_da1469x/src/spi_da1469x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/bus/drivers/spi_da1469x/src/spi_da1469x.c 
b/hw/bus/drivers/spi_da1469x/src/spi_da1469x.c
index 8d2d5fe29..bc4f8ff65 100644
--- a/hw/bus/drivers/spi_da1469x/src/spi_da1469x.c
+++ b/hw/bus/drivers/spi_da1469x/src/spi_da1469x.c
@@ -53,7 +53,7 @@ STATS_NAME_END(spi_da1469x_stats_section)
 #define MIN_DMA_SIZE 8
 
 /* A value of 1 for the word size means 16-bit words */
-#define SPI_CTRL_REG_16BIT_WORD (1 << SPI_SPI_CTRL_REG_SPI_WORD_Pos) 
+#define SPI_CTRL_REG_16BIT_WORD (1 << SPI_SPI_CTRL_REG_SPI_WORD_Pos)
 
 static const struct da1469x_dma_config spi_write_rx_dma_cfg = {
 .priority = 0,



[mynewt-core] 04/04: hw/bus/drivers/spi_da1469x: Allow for 16-bit dma transfers

2023-06-19 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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

commit d2470161e0dec8b903b4d6ca6160161e90baea13
Author: Will San Filippo 
AuthorDate: Mon Jun 19 12:37:55 2023 -0400

hw/bus/drivers/spi_da1469x: Allow for 16-bit dma transfers

Fix style check issue.
---
 hw/bus/drivers/spi_da1469x/src/spi_da1469x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/bus/drivers/spi_da1469x/src/spi_da1469x.c 
b/hw/bus/drivers/spi_da1469x/src/spi_da1469x.c
index 08ae413dd..cf8fa95b6 100644
--- a/hw/bus/drivers/spi_da1469x/src/spi_da1469x.c
+++ b/hw/bus/drivers/spi_da1469x/src/spi_da1469x.c
@@ -179,7 +179,7 @@ struct da1469x_transfer {
 /* Transfer started */
 uint8_t started : 1;
 /* Transfer is 16 bits */
-uint8_t xfr_16: 1;
+uint8_t xfr_16 : 1;
 };
 
 struct spi_da1469x_driver_data {



[mynewt-core] branch master updated (7430369be -> d2470161e)

2023-06-19 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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


from 7430369be hw/bsp: Add BSP for Nordic Thingy:53
 new 2c7730f86 hw/bus/drivers/spi_da1469x: Allow for 16-bit dma transfers
 new f39917fe5 hw/bus/drivers/spi_da1469x: Allow for 16-bit dma transfers
 new a334ba6ab hw/bus/drivers/spi_da1469x: Allow for 16-bit dma transfers
 new d2470161e hw/bus/drivers/spi_da1469x: Allow for 16-bit dma transfers

The 4 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/bus/drivers/spi_da1469x/src/spi_da1469x.c | 118 +++
 1 file changed, 101 insertions(+), 17 deletions(-)



[mynewt-core] 03/04: hw/bus/drivers/spi_da1469x: Allow for 16-bit dma transfers

2023-06-19 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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

commit a334ba6abe1eea0502c1cd226af0b56ba7c3e92b
Author: Will San Filippo 
AuthorDate: Mon Jun 19 12:35:08 2023 -0400

hw/bus/drivers/spi_da1469x: Allow for 16-bit dma transfers

Allow for 16-bit transfers if using ISR as opposed to DMA.
---
 hw/bus/drivers/spi_da1469x/src/spi_da1469x.c | 67 +---
 1 file changed, 51 insertions(+), 16 deletions(-)

diff --git a/hw/bus/drivers/spi_da1469x/src/spi_da1469x.c 
b/hw/bus/drivers/spi_da1469x/src/spi_da1469x.c
index bc4f8ff65..08ae413dd 100644
--- a/hw/bus/drivers/spi_da1469x/src/spi_da1469x.c
+++ b/hw/bus/drivers/spi_da1469x/src/spi_da1469x.c
@@ -163,12 +163,12 @@ static const struct da1469x_spi_hw da1469x_spi2 = {
 
 struct da1469x_transfer {
 /* Transmit or receive buffer */
-uint8_t *data;
-/* Transfer length */
+void *data;
+/* Transfer length (number of items) */
 uint16_t len;
-/* Number of bytes written to output FIFO */
+/* Number of items written to output FIFO */
 uint16_t wlen;
-/* Number of bytes read from input FIFO */
+/* Number of items read from input FIFO */
 uint16_t rlen;
 
 uint8_t nostop : 1;
@@ -178,6 +178,8 @@ struct da1469x_transfer {
 uint8_t dma : 1;
 /* Transfer started */
 uint8_t started : 1;
+/* Transfer is 16 bits */
+uint8_t xfr_16: 1;
 };
 
 struct spi_da1469x_driver_data {
@@ -243,6 +245,9 @@ spi_da1469x_dma_done_cb(void *arg)
 transfer->rlen += transferred;
 
 #if MYNEWT_VAL(SPI_DA1469X_STAT)
+if (dd->transfer.xfr_16) {
+transferred *= 2;
+}
 if (transfer->write) {
 STATS_INCN(dd->stats, written_bytes, transferred);
 } else {
@@ -261,17 +266,27 @@ static void
 spi_da1469x_isr(SPI_Type *regs, struct spi_da1469x_driver_data *dd)
 {
 struct da1469x_transfer *transfer = >transfer;
-uint8_t rx_byte;
+uint16_t rxdata;
 
 while ((transfer->wlen < transfer->len) &&
!(regs->SPI_CTRL_REG & SPI_SPI_CTRL_REG_SPI_TXH_Msk)) {
 if (transfer->write) {
-regs->SPI_RX_TX_REG = transfer->data[transfer->wlen];
+if (transfer->xfr_16) {
+regs->SPI_RX_TX_REG = *(uint16_t *)transfer->data;
+#if MYNEWT_VAL(SPI_DA1469X_STAT)
+STATS_INCN(dd->stats, written_bytes, 2);
+#endif
+transfer->data = (uint16_t *)transfer->data + 1;
+} else {
+regs->SPI_RX_TX_REG = *(uint8_t *)transfer->data;
 #if MYNEWT_VAL(SPI_DA1469X_STAT)
-STATS_INC(dd->stats, written_bytes);
+STATS_INC(dd->stats, written_bytes);
 #endif
+transfer->data = (uint8_t *)transfer->data + 1;
+}
 } else {
-regs->SPI_RX_TX_REG = 0xFF;
+/* Write 16 bits in case 16-bit transfer used */
+regs->SPI_RX_TX_REG = 0x;
 }
 transfer->wlen++;
 }
@@ -281,13 +296,22 @@ spi_da1469x_isr(SPI_Type *regs, struct 
spi_da1469x_driver_data *dd)
 }
 
 while (0 != (regs->SPI_CTRL_REG & SPI_SPI_CTRL_REG_SPI_INT_BIT_Msk)) {
-rx_byte = regs->SPI_RX_TX_REG;
+rxdata = regs->SPI_RX_TX_REG;
 if (transfer->rlen < transfer->len) {
 if (!transfer->write) {
-transfer->data[transfer->rlen] = rx_byte;
-#if MYNEWT_VAL(SPI_DA1469X_STAT)
-STATS_INC(dd->stats, read_bytes);
-#endif
+if (transfer->xfr_16) {
+*(uint16_t *)transfer->data = (uint16_t)rxdata;
+transfer->data = (uint16_t *)transfer->data + 1;
+#if MYNEWT_VAL(SPI_DA1469X_STAT)
+STATS_INCN(dd->stats, read_bytes, 2);
+#endif
+} else {
+*(uint8_t *)transfer->data = (uint8_t)rxdata;
+transfer->data = (uint8_t *)transfer->data + 1;
+#if MYNEWT_VAL(SPI_DA1469X_STAT)
+STATS_INC(dd->stats, read_bytes);
+#endif
+}
 }
 transfer->rlen++;
 }
@@ -521,10 +545,16 @@ spi_da1469x_read(struct bus_dev *bdev, struct bus_node 
*bnode,
 dd->transfer.wlen = 0;
 dd->transfer.write = 0;
 dd->transfer.started = 1;
+if ((regs->SPI_CTRL_REG & SPI_SPI_CTRL_REG_SPI_WORD_Msk) == 
SPI_CTRL_REG_16BIT_WORD) {
+dd->transfer.xfr_16 = 1;
+} else {
+dd->transfer.xfr_16 = 0;
+}
+
 if (length >= MIN_DMA_SIZE && dd->dma_chans[0] != NULL) {
 dd->transfer.dma = 1;
 /* NOTE: assumes if 16-bit not used; dma transfers are 8-bits */
-if ((regs->SPI_CTRL_REG

[mynewt-core] branch master updated: Use syscfg settign for sysinit stage numbers This allows the target to rearrange package initialization order via syscfg override

2023-06-02 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 7fc827ed2 Use syscfg settign for sysinit stage numbers This allows the 
target to rearrange package initialization order via syscfg override
7fc827ed2 is described below

commit 7fc827ed2d9aeae75268ce86570136b38e301958
Author: Philip Burkhardt 
AuthorDate: Tue Jan 31 15:51:07 2023 -0800

Use syscfg settign for sysinit stage numbers
This allows the target to rearrange package initialization order via syscfg 
override
---
 hw/bus/pkg.yml   |  2 +-
 hw/bus/syscfg.yml|  5 +
 hw/mcu/dialog/da1469x/pkg.yml|  2 +-
 hw/mcu/dialog/da1469x/syscfg.yml |  5 +
 mgmt/smp/smp_os/pkg.yml  |  2 +-
 hw/bus/pkg.yml => mgmt/smp/smp_os/syscfg.yml | 14 +-
 6 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/hw/bus/pkg.yml b/hw/bus/pkg.yml
index 7828e4696..6a4759d76 100644
--- a/hw/bus/pkg.yml
+++ b/hw/bus/pkg.yml
@@ -25,4 +25,4 @@ pkg.keywords:
 pkg.deps:
 
 pkg.init:
-bus_pkg_init: 100
+bus_pkg_init: 'MYNEWT_VAL(BUS_SYSINIT_STAGE)'
diff --git a/hw/bus/syscfg.yml b/hw/bus/syscfg.yml
index f9ac0e6b0..c1bc74987 100644
--- a/hw/bus/syscfg.yml
+++ b/hw/bus/syscfg.yml
@@ -73,3 +73,8 @@ syscfg.defs:
 magic value which is then checked on each operation to ensure
 proper objects are passed to APIs.
 value: 0
+
+BUS_SYSINIT_STAGE:
+description: >
+System initialization stage for bus package
+value: 100
diff --git a/hw/mcu/dialog/da1469x/pkg.yml b/hw/mcu/dialog/da1469x/pkg.yml
index 86b49f7a5..d6a9c87b9 100644
--- a/hw/mcu/dialog/da1469x/pkg.yml
+++ b/hw/mcu/dialog/da1469x/pkg.yml
@@ -61,4 +61,4 @@ pkg.deps.SDADC:
 - "@apache-mynewt-core/hw/drivers/adc/sdadc_da1469x"
 
 pkg.init:
-da1469x_lpclk_init: 1
+da1469x_lpclk_init: 'MYNEWT_VAL(DA1469X_LPCLK_SYSINIT_STAGE)'
diff --git a/hw/mcu/dialog/da1469x/syscfg.yml b/hw/mcu/dialog/da1469x/syscfg.yml
index fe4e45b6e..eb2b642c7 100644
--- a/hw/mcu/dialog/da1469x/syscfg.yml
+++ b/hw/mcu/dialog/da1469x/syscfg.yml
@@ -459,6 +459,11 @@ syscfg.defs:
   'Disable watchdog on init'
 value: 1
 
+DA1469X_LPCLK_SYSINIT_STAGE:
+description: >
+  'Initalization stage for DA1469X'
+value: 1
+
 syscfg.vals:
 OS_TICKS_PER_SEC: 128
 
diff --git a/mgmt/smp/smp_os/pkg.yml b/mgmt/smp/smp_os/pkg.yml
index e4e7e13ce..1283430ff 100644
--- a/mgmt/smp/smp_os/pkg.yml
+++ b/mgmt/smp/smp_os/pkg.yml
@@ -39,4 +39,4 @@ pkg.req_apis:
 - smp
 
 pkg.init:
-smp_os_pkg_init: 501
+smp_os_pkg_init: 'MYNEWT_VAL(SMP_OS_SYSINIT_STAGE)'
diff --git a/hw/bus/pkg.yml b/mgmt/smp/smp_os/syscfg.yml
similarity index 79%
copy from hw/bus/pkg.yml
copy to mgmt/smp/smp_os/syscfg.yml
index 7828e4696..e589b21a9 100644
--- a/hw/bus/pkg.yml
+++ b/mgmt/smp/smp_os/syscfg.yml
@@ -17,12 +17,8 @@
 # under the License.
 #
 
-pkg.name: hw/bus
-pkg.description: Serial bus access layer
-pkg.author: "Apache Mynewt "
-pkg.homepage: "http://mynewt.apache.org/;
-pkg.keywords:
-pkg.deps:
-
-pkg.init:
-bus_pkg_init: 100
+syscfg.defs:
+SMP_OS_SYSINIT_STAGE:
+description: >
+  'System initialization stage for SMP OS package'
+value: 501



[mynewt-core] branch master updated: Be consistent in console write order for '\n' and '\r'

2023-05-25 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 34aecc7f3 Be consistent in console write order for '\n' and '\r'
34aecc7f3 is described below

commit 34aecc7f3ecd11cbf7677fdbffb263700641259e
Author: Karthik Bharadwaj 
AuthorDate: Thu May 25 10:08:41 2023 -0700

Be consistent in console write order for '\n' and '\r'

In the current implementation of the UART and CDC consoles, there
can be a discrepency in the order of the Linefeed and Carriage
Return print order. For consistency, we change this to always be
"\r\n" for both variants of the implementation. This is useful
in automated echo tests for verifying payloads.
---
 hw/usb/tinyusb/cdc_console/src/cdc_console.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/usb/tinyusb/cdc_console/src/cdc_console.c 
b/hw/usb/tinyusb/cdc_console/src/cdc_console.c
index e91a3cea0..00d81a05f 100755
--- a/hw/usb/tinyusb/cdc_console/src/cdc_console.c
+++ b/hw/usb/tinyusb/cdc_console/src/cdc_console.c
@@ -58,11 +58,10 @@ cdc_write(int c)
 int
 console_out_nolock(int c)
 {
-cdc_write(c);
-
 if ('\n' == c) {
 cdc_write('\r');
 }
+cdc_write(c);
 
 cdc_schedule_tx_flush();
 



[mynewt-artifact] 01/02: Encrypted images that use HW encryption/decription need to be hashed using the encrypted image

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

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

commit 54b7160041b33a00d94a12803bcda5d9443e7138
Author: Philip Burkhardt 
AuthorDate: Tue Apr 4 11:07:58 2023 -0700

Encrypted images that use HW encryption/decription need to be hashed using 
the encrypted image
---
 image/create.go | 40 +++-
 1 file changed, 27 insertions(+), 13 deletions(-)

diff --git a/image/create.go b/image/create.go
index 82fd1c8..cdc199e 100644
--- a/image/create.go
+++ b/image/create.go
@@ -553,19 +553,33 @@ func (ic *ImageCreator) Create() (Image, error) {
var hashBytes []byte
var err error
if ic.PlainSecret != nil {
-   // For encrypted images, must calculate the hash with the plain
-   // body and encrypt the payload afterwards
-   img.Body = append(img.Body, ic.Body...)
-   hashBytes, err = img.CalcHash(ic.InitialHash)
-   if err != nil {
-   return img, err
-   }
-   encBody, err := sec.EncryptAES(ic.Body, ic.PlainSecret, 
ic.Nonce)
-   if err != nil {
-   return img, err
-   }
-   img.Body = nil
-   img.Body = append(img.Body, encBody...)
+if img.HasEncryptionPayload() {
+// For an encrypted image that will be HW decrypted while 
running,
+// the hash must be calculated on the encrptyed image body.
+encBody, err := sec.EncryptAES(ic.Body, ic.PlainSecret, 
ic.Nonce)
+if err != nil {
+return img, err
+}
+img.Body = append(img.Body, encBody...)
+hashBytes, err = img.CalcHash(ic.InitialHash)
+if err != nil {
+return img, err
+}
+} else {
+// For normal encrypted images, must calculate the hash with 
the plain
+// body and encrypt the payload afterwards
+img.Body = append(img.Body, ic.Body...)
+hashBytes, err = img.CalcHash(ic.InitialHash)
+if err != nil {
+return img, err
+}
+encBody, err := sec.EncryptAES(ic.Body, ic.PlainSecret, 
ic.Nonce)
+if err != nil {
+return img, err
+}
+img.Body = nil
+img.Body = append(img.Body, encBody...)
+}
} else {
img.Body = append(img.Body, ic.Body...)
hashBytes, err = img.CalcHash(ic.InitialHash)



[mynewt-artifact] branch master updated (dc6549f -> 2ef05e6)

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

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


from dc6549f  Remove ec256 ASN1 signature padding
 new 54b7160  Encrypted images that use HW encryption/decription need to be 
hashed using the encrypted image
 new 2ef05e6  Comment update

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:
 image/create.go | 41 -
 1 file changed, 28 insertions(+), 13 deletions(-)



[mynewt-artifact] 02/02: Comment update

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

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

commit 2ef05e6dfb81e1e4d9df881f14f064963303beba
Author: Philip Burkhardt 
AuthorDate: Wed May 3 13:26:57 2023 -0700

Comment update
---
 image/create.go | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/image/create.go b/image/create.go
index cdc199e..5ec2a57 100644
--- a/image/create.go
+++ b/image/create.go
@@ -554,8 +554,9 @@ func (ic *ImageCreator) Create() (Image, error) {
var err error
if ic.PlainSecret != nil {
 if img.HasEncryptionPayload() {
-// For an encrypted image that will be HW decrypted while 
running,
-// the hash must be calculated on the encrptyed image body.
+// If the image has an encryption payload, it is an encrypted 
image 
+// that will be HW decrypted while running and the hash must 
be 
+// calculated on the encrypted image body.
 encBody, err := sec.EncryptAES(ic.Body, ic.PlainSecret, 
ic.Nonce)
 if err != nil {
 return img, err



[mynewt-core] branch master updated: hw/usb/cdc_console: Modify flush if cdc tx bufsize defined

2022-08-11 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 c5fb2b594 hw/usb/cdc_console: Modify flush if cdc tx bufsize defined
c5fb2b594 is described below

commit c5fb2b594d0194de530cf85dd1040184c87bcfe0
Author: Will San Filippo 
AuthorDate: Wed Aug 10 12:27:38 2022 -0700

hw/usb/cdc_console: Modify flush if cdc tx bufsize defined

If the user defines USBD_CDC_TX_BUFSIZE and that buffer size is
larger than USBD_CDC_DATA_EP_SIZE, data will not be flushed
immediately. This change will cause it to be flushed immediately.
---
 hw/usb/tinyusb/cdc_console/src/cdc_console.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/hw/usb/tinyusb/cdc_console/src/cdc_console.c 
b/hw/usb/tinyusb/cdc_console/src/cdc_console.c
index df199c265..be6490d32 100755
--- a/hw/usb/tinyusb/cdc_console/src/cdc_console.c
+++ b/hw/usb/tinyusb/cdc_console/src/cdc_console.c
@@ -71,7 +71,11 @@ console_rx_restart(void)
 static void
 tx_flush_ev_cb(struct os_event *ev)
 {
+#if MYNEWT_VAL(USBD_CDC_TX_BUFSIZE)
+if (connected && tud_cdc_write_available() < CFG_TUD_CDC_TX_BUFSIZE) {
+#else
 if (connected && tud_cdc_write_available() < USBD_CDC_DATA_EP_SIZE) {
+#endif
 if (tud_cdc_write_flush() == 0) {
 /*
  * Previous data not sent yet.



[mynewt-core] branch master updated: sys/log: Add clearing log to log command

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

wes3 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 a7ea0b0aa sys/log: Add clearing log to log command
a7ea0b0aa is described below

commit a7ea0b0aab1a07a36d0f863587664970d43ae254
Author: Will San Filippo 
AuthorDate: Thu Apr 28 14:20:18 2022 -0700

sys/log: Add clearing log to log command

This commit adds the ability to clear a log, a group of logs or
all logs using the 'log' shell command. The option -c was added
for this purpose. The syntax is similar to the log dump syntax.
---
 sys/log/full/src/log_shell.c | 45 ++--
 1 file changed, 31 insertions(+), 14 deletions(-)

diff --git a/sys/log/full/src/log_shell.c b/sys/log/full/src/log_shell.c
index 716ae86c2..48db8a822 100644
--- a/sys/log/full/src/log_shell.c
+++ b/sys/log/full/src/log_shell.c
@@ -109,16 +109,25 @@ shell_log_dump_cmd(int argc, char **argv)
 uint32_t log_limit = 0;
 bool stream;
 bool partial_match = false;
+bool clear_log;
 int i;
 int rc;
 
+clear_log = false;
 for (i = 1; i < argc; ++i) {
 if (0 == strcmp(argv[i], "-l")) {
 list_only = true;
 break;
 }
-if (isdigit((unsigned char)argv[i][0])) {
+
+/* the -c option is to clear a log (or logs). */
+if (!strcmp(argv[i], "-c")) {
+clear_log = true;
+} else if (isdigit((unsigned char)argv[i][0])) {
 log_limit = parse_ll_bounds(argv[i], 1, 100, );
+if (clear_log) {
+goto err;
+}
 } else {
 log_name = argv[i];
 if ('*' == log_name[strlen(log_name) - 1]) {
@@ -149,21 +158,29 @@ shell_log_dump_cmd(int argc, char **argv)
 continue;
 }
 
-console_printf("Dumping log %s\n", log->l_name);
-
-log_offset.lo_arg = NULL;
-log_offset.lo_ts = 0;
-log_last_index = log_get_last_index(log);
-if (log_limit == 0 || log_last_index < log_limit) {
-log_offset.lo_index = 0;
+if (clear_log) {
+console_printf("Clearing log %s\n", log->l_name);
+rc = log_flush(log);
+if (rc != 0) {
+goto err;
+}
 } else {
-log_offset.lo_index = log_last_index - log_limit;
-}
-log_offset.lo_data_len = 0;
+console_printf("Dumping log %s\n", log->l_name);
+
+log_offset.lo_arg = NULL;
+log_offset.lo_ts = 0;
+log_last_index = log_get_last_index(log);
+if (log_limit == 0 || log_last_index < log_limit) {
+log_offset.lo_index = 0;
+} else {
+log_offset.lo_index = log_last_index - log_limit;
+}
+log_offset.lo_data_len = 0;
 
-rc = log_walk_body(log, shell_log_dump_entry, _offset);
-if (rc != 0) {
-goto err;
+rc = log_walk_body(log, shell_log_dump_entry, _offset);
+if (rc != 0) {
+goto err;
+}
 }
 }
 



[mynewt-core] 01/02: hal: Modify hal_system_restart

2022-01-31 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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

commit 24398ce000466f9de64563d5817ac75e8d89bec1
Author: Will San Filippo 
AuthorDate: Wed Jan 26 13:45:30 2022 -0800

hal: Modify hal_system_restart

Two changes to the code: clear ICPR register (to
clear any pending interrupts) and also leave global
interrupts enabled when calling hal_system_start.
The idea behind this change is that the cortex-M
has global interrupts enabled on reset and that
this should be the state when the system is
restarted.
---
 hw/mcu/dialog/da1469x/src/hal_system_start.c | 15 ++-
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/hw/mcu/dialog/da1469x/src/hal_system_start.c 
b/hw/mcu/dialog/da1469x/src/hal_system_start.c
index 2445f9c..1937a7d 100644
--- a/hw/mcu/dialog/da1469x/src/hal_system_start.c
+++ b/hw/mcu/dialog/da1469x/src/hal_system_start.c
@@ -62,19 +62,24 @@ hal_system_start(void *img_start)
 void
 hal_system_restart(void *img_start)
 {
-uint32_t primask __attribute__((unused));
 int i;
 
 /*
- * Disable interrupts, and leave them disabled.
- * They get re-enabled when system starts coming back again.
+ * NOTE: on reset, PRIMASK should have global interrupts enabled so
+ * the code disables interrupts, clears the interrupt enable bits,
+ * clears any pending interrupts, then enables global interrupts
+ * so processor looks like state it would be in if it reset.
  */
-__HAL_DISABLE_INTERRUPTS(primask);
-
+__disable_irq();
 for (i = 0; i < sizeof(NVIC->ICER) / sizeof(NVIC->ICER[0]); i++) {
 NVIC->ICER[i] = 0x;
 }
 
+for (i = 0; i < sizeof(NVIC->ICPR) / sizeof(NVIC->ICPR[0]); i++) {
+NVIC->ICPR[i] = 0x;
+}
+__enable_irq();
+
 hal_system_start(img_start);
 }
 


[mynewt-core] 02/02: hal: Modify hal_system_restart

2022-01-31 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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

commit 7bea0ed29a1514f8ddaf1d8460b6d2a7cb0eac59
Author: Will San Filippo 
AuthorDate: Mon Jan 31 10:32:06 2022 -0800

hal: Modify hal_system_restart

Two changes to the code: clear ICPR register (to
clear any pending interrupts) and also leave global
interrupts enabled when calling hal_system_start.
The idea behind this change is that the cortex-M
has global interrupts enabled on reset and that
this should be the state when the system is
restarted.
---
 hw/mcu/nordic/nrf51xxx/src/hal_system_start.c| 15 ++-
 hw/mcu/nordic/nrf52xxx/src/hal_system_start.c| 15 ++-
 hw/mcu/nordic/nrf5340/src/hal_system_start.c | 15 ++-
 hw/mcu/nordic/nrf5340_net/src/hal_system_start.c | 15 ++-
 hw/mcu/nordic/nrf91xx/src/hal_system_start.c | 15 ++-
 5 files changed, 50 insertions(+), 25 deletions(-)

diff --git a/hw/mcu/nordic/nrf51xxx/src/hal_system_start.c 
b/hw/mcu/nordic/nrf51xxx/src/hal_system_start.c
index d4581fe..93e0a7e 100644
--- a/hw/mcu/nordic/nrf51xxx/src/hal_system_start.c
+++ b/hw/mcu/nordic/nrf51xxx/src/hal_system_start.c
@@ -52,17 +52,22 @@ void
 hal_system_restart(void *img_start)
 {
 int i;
-int sr;
 
 /*
- * Disable interrupts, and leave the disabled.
- * They get re-enabled when system starts coming back again.
+ * NOTE: on reset, PRIMASK should have global interrupts enabled so
+ * the code disables interrupts, clears the interrupt enable bits,
+ * clears any pending interrupts, then enables global interrupts
+ * so processor looks like state it would be in if it reset.
  */
-__HAL_DISABLE_INTERRUPTS(sr);
+__disable_irq();
 for (i = 0; i < sizeof(NVIC->ICER) / sizeof(NVIC->ICER[0]); i++) {
 NVIC->ICER[i] = 0x;
 }
-(void)sr;
+
+for (i = 0; i < sizeof(NVIC->ICPR) / sizeof(NVIC->ICPR[0]); i++) {
+NVIC->ICPR[i] = 0x;
+}
+__enable_irq();
 
 hal_system_start(img_start);
 }
diff --git a/hw/mcu/nordic/nrf52xxx/src/hal_system_start.c 
b/hw/mcu/nordic/nrf52xxx/src/hal_system_start.c
index 123353f..25e35b1 100644
--- a/hw/mcu/nordic/nrf52xxx/src/hal_system_start.c
+++ b/hw/mcu/nordic/nrf52xxx/src/hal_system_start.c
@@ -52,17 +52,22 @@ void
 hal_system_restart(void *img_start)
 {
 int i;
-int sr;
 
 /*
- * Disable interrupts, and leave the disabled.
- * They get re-enabled when system starts coming back again.
+ * NOTE: on reset, PRIMASK should have global interrupts enabled so
+ * the code disables interrupts, clears the interrupt enable bits,
+ * clears any pending interrupts, then enables global interrupts
+ * so processor looks like state it would be in if it reset.
  */
-__HAL_DISABLE_INTERRUPTS(sr);
+__disable_irq();
 for (i = 0; i < sizeof(NVIC->ICER) / sizeof(NVIC->ICER[0]); i++) {
 NVIC->ICER[i] = 0x;
 }
-(void)sr;
+
+for (i = 0; i < sizeof(NVIC->ICPR) / sizeof(NVIC->ICPR[0]); i++) {
+NVIC->ICPR[i] = 0x;
+}
+__enable_irq();
 
 hal_system_start(img_start);
 }
diff --git a/hw/mcu/nordic/nrf5340/src/hal_system_start.c 
b/hw/mcu/nordic/nrf5340/src/hal_system_start.c
index 89f3f51..ecb3cf1 100644
--- a/hw/mcu/nordic/nrf5340/src/hal_system_start.c
+++ b/hw/mcu/nordic/nrf5340/src/hal_system_start.c
@@ -193,17 +193,22 @@ void
 hal_system_restart(void *img_start)
 {
 int i;
-int sr;
 
 /*
- * Disable interrupts, and leave the disabled.
- * They get re-enabled when system starts coming back again.
+ * NOTE: on reset, PRIMASK should have global interrupts enabled so
+ * the code disables interrupts, clears the interrupt enable bits,
+ * clears any pending interrupts, then enables global interrupts
+ * so processor looks like state it would be in if it reset.
  */
-__HAL_DISABLE_INTERRUPTS(sr);
+__disable_irq();
 for (i = 0; i < sizeof(NVIC->ICER) / sizeof(NVIC->ICER[0]); i++) {
 NVIC->ICER[i] = 0x;
 }
-(void)sr;
+
+for (i = 0; i < sizeof(NVIC->ICPR) / sizeof(NVIC->ICPR[0]); i++) {
+NVIC->ICPR[i] = 0x;
+}
+__enable_irq();
 
 hal_system_start(img_start);
 }
diff --git a/hw/mcu/nordic/nrf5340_net/src/hal_system_start.c 
b/hw/mcu/nordic/nrf5340_net/src/hal_system_start.c
index a1dc5e0..f34f0f6 100644
--- a/hw/mcu/nordic/nrf5340_net/src/hal_system_start.c
+++ b/hw/mcu/nordic/nrf5340_net/src/hal_system_start.c
@@ -52,17 +52,22 @@ void
 hal_system_restart(void *img_start)
 {
 int i;
-int sr;
 
 /*
- * Disable interrupts, and leave the disabled.
- * They get re-enabled when system starts coming back again.
+ * NOTE: on reset, PR

[mynewt-core] branch master updated (ac593bb -> 7bea0ed)

2022-01-31 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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


from ac593bb  Update mailmap
 new 24398ce  hal: Modify hal_system_restart
 new 7bea0ed  hal: Modify hal_system_restart

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/mcu/dialog/da1469x/src/hal_system_start.c | 15 ++-
 hw/mcu/nordic/nrf51xxx/src/hal_system_start.c| 15 ++-
 hw/mcu/nordic/nrf52xxx/src/hal_system_start.c| 15 ++-
 hw/mcu/nordic/nrf5340/src/hal_system_start.c | 15 ++-
 hw/mcu/nordic/nrf5340_net/src/hal_system_start.c | 15 ++-
 hw/mcu/nordic/nrf91xx/src/hal_system_start.c | 15 ++-
 6 files changed, 60 insertions(+), 30 deletions(-)


[mynewt-core] branch master updated: stm32_periph: Additional SPIs

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

wes3 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 dec757d  stm32_periph: Additional SPIs
dec757d is described below

commit dec757dd25e340b1708fdf018ce5cf66f55526de
Author: JustineKH 
AuthorDate: Wed Dec 1 10:45:43 2021 -0800

stm32_periph: Additional SPIs
---
 hw/mcu/stm/stm32_common/src/stm32_periph.c | 42 ++
 1 file changed, 42 insertions(+)

diff --git a/hw/mcu/stm/stm32_common/src/stm32_periph.c 
b/hw/mcu/stm/stm32_common/src/stm32_periph.c
index bf687a2..172c16c 100644
--- a/hw/mcu/stm/stm32_common/src/stm32_periph.c
+++ b/hw/mcu/stm/stm32_common/src/stm32_periph.c
@@ -270,6 +270,32 @@ static const struct stm32_hal_spi_cfg os_bsp_spi3_cfg = {
 };
 #endif
 #endif
+#if (MYNEWT_VAL(SPI_4_MASTER) || MYNEWT_VAL(SPI_4_SLAVE))
+#if MYNEWT_VAL(SPI_4_CUSTOM_CFG)
+extern const struct stm32_hal_spi_cfg os_bsp_spi4_cfg;
+#else
+static const struct stm32_hal_spi_cfg os_bsp_spi4_cfg = {
+.sck_pin = MYNEWT_VAL(SPI_4_PIN_SCK),
+.mosi_pin = MYNEWT_VAL(SPI_4_PIN_MOSI),
+.miso_pin = MYNEWT_VAL(SPI_4_PIN_MISO),
+.ss_pin = MYNEWT_VAL(SPI_4_PIN_SS),
+.irq_prio = 2,
+};
+#endif
+#endif
+#if (MYNEWT_VAL(SPI_5_MASTER) || MYNEWT_VAL(SPI_5_SLAVE))
+#if MYNEWT_VAL(SPI_5_CUSTOM_CFG)
+extern const struct stm32_hal_spi_cfg os_bsp_spi5_cfg;
+#else
+static const struct stm32_hal_spi_cfg os_bsp_spi5_cfg = {
+.sck_pin = MYNEWT_VAL(SPI_5_PIN_SCK),
+.mosi_pin = MYNEWT_VAL(SPI_5_PIN_MOSI),
+.miso_pin = MYNEWT_VAL(SPI_5_PIN_MISO),
+.ss_pin = MYNEWT_VAL(SPI_5_PIN_SS),
+.irq_prio = 2,
+};
+#endif
+#endif
 #endif
 
 #if MYNEWT_VAL(ETH_0)
@@ -554,6 +580,22 @@ stm32_periph_create_spi(void)
 rc = hal_spi_init(3, (void *)_bsp_spi3_cfg, HAL_SPI_TYPE_SLAVE);
 assert(rc == 0);
 #endif
+#if MYNEWT_VAL(SPI_4_MASTER)
+rc = hal_spi_init(4, (void *)_bsp_spi4_cfg, HAL_SPI_TYPE_MASTER);
+assert(rc == 0);
+#endif
+#if MYNEWT_VAL(SPI_4_SLAVE)
+rc = hal_spi_init(4, (void *)_bsp_spi4_cfg, HAL_SPI_TYPE_SLAVE);
+assert(rc == 0);
+#endif
+#if MYNEWT_VAL(SPI_5_MASTER)
+rc = hal_spi_init(5, (void *)_bsp_spi5_cfg, HAL_SPI_TYPE_MASTER);
+assert(rc == 0);
+#endif
+#if MYNEWT_VAL(SPI_5_SLAVE)
+rc = hal_spi_init(5, (void *)_bsp_spi5_cfg, HAL_SPI_TYPE_SLAVE);
+assert(rc == 0);
+#endif
 }
 #endif
 


[mynewt-core] branch master updated: net/oic: Minor modification to prevent transmission no data

2021-10-25 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 cec16e1  net/oic: Minor modification to prevent transmission no data
cec16e1 is described below

commit cec16e18a892025fd7681442651966a398ada2ff
Author: Will San Filippo 
AuthorDate: Fri Oct 15 10:00:59 2021 -0700

net/oic: Minor modification to prevent transmission no data

This is a minor change to the code which should prevent the code
from sending a fragment with no data in it. In the case where
the packet length is greater than the mtu but is an integer
multiple of the mtu (pktlength % mtu equals 0) the code would
allocate a packet header mbuf with no data in it and send it.
This change should prevent that from occurring.
---
 net/oic/src/port/mynewt/ble_adaptor.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/oic/src/port/mynewt/ble_adaptor.c 
b/net/oic/src/port/mynewt/ble_adaptor.c
index e3f06e2..b9b9940 100644
--- a/net/oic/src/port/mynewt/ble_adaptor.c
+++ b/net/oic/src/port/mynewt/ble_adaptor.c
@@ -482,6 +482,9 @@ oc_ble_frag(struct os_mbuf *m, uint16_t mtu)
 }
 
 off = pkt->omp_len - (pkt->omp_len % mtu);
+if (off == pkt->omp_len) {
+off -= mtu;
+}
 while (off >= mtu) {
 n = os_msys_get_pkthdr(mtu, 0);
 if (!n) {


[mynewt-core] branch master updated: encoding/base64: Remove unused code in hex_format

2021-08-27 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 2fa39ab  encoding/base64: Remove unused code in hex_format
2fa39ab is described below

commit 2fa39abf815de25e11153b29e1b45f07c5ceb1f5
Author: Will San Filippo 
AuthorDate: Thu Aug 26 15:08:03 2021 -0700

encoding/base64: Remove unused code in hex_format

The variable dst_len was being decremented but not used.
---
 encoding/base64/src/hex.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/encoding/base64/src/hex.c b/encoding/base64/src/hex.c
index 4c91acf..9f418fd 100644
--- a/encoding/base64/src/hex.c
+++ b/encoding/base64/src/hex.c
@@ -49,7 +49,6 @@ hex_format(void *src_v, int src_len, char *dst, int dst_len)
 tgt[0] = hex_bytes[(src[i] >> 4) & 0xf];
 tgt[1] = hex_bytes[src[i] & 0xf];
 tgt += 2;
-dst_len -= 2;
 }
 *tgt = '\0';
 return dst;


[mynewt-mcumgr] branch master updated: Update smp-console.md: Length field should include length of CRC16.

2021-08-26 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 9bd9d55  Update smp-console.md: Length field should include length of 
CRC16.
9bd9d55 is described below

commit 9bd9d55d00bb70f93d85e52d7b0168c79942
Author: wes3 
AuthorDate: Thu Aug 26 14:01:39 2021 -0700

Update smp-console.md: Length field should include length of CRC16.

The length of the packet is the length of the unencoded body plus the final 
CRC (crc-16 so the length includes the two bytes of CRC).
---
 transport/smp-console.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/transport/smp-console.md b/transport/smp-console.md
index d9804f9..0b12f3c 100644
--- a/transport/smp-console.md
+++ b/transport/smp-console.md
@@ -39,7 +39,7 @@ below:
 | - | --- |
 | 0x06 0x09 | Byte pair indicating the start of a packet. |
 | 0x04 0x14 | Byte pair indicating the start of a continuation frame. |
-| Packet length | The combined total length of the *unencoded* body. |
+| Packet length | The combined total length of the *unencoded* body plus the 
final CRC (2 bytes). Length is in Big-Endian format. |
 | Body | The actual SMP data (i.e., 8-byte header and CBOR key-value map). |
 | CRC16 | A CRC16 of the *unencoded* body of the entire packet.  This field is 
only present in the final frame of a packet. |
 | Newline | A 0x0a byte; terminates a frame. |


[mynewt-nimble] branch master updated: nimble/ll: Fix possible race on TX queue

2021-03-15 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 dda185b  nimble/ll: Fix possible race on TX queue
 new 60ce2cf  Merge pull request #936 from andrzej-kaczmarek/ll-txq-race-fix
dda185b is described below

commit dda185b528c6ad195993763fba8059459a3fa54f
Author: Andrzej Kaczmarek 
AuthorDate: Mon Mar 15 16:51:20 2021 +0100

nimble/ll: Fix possible race on TX queue

Removing from ll_tx_pkt_q should be done in critical section since
insertion can be done from isr.

There's no need to protect peek on 1st element since we only insert
in isr and remove in LL so there's no risk of element being removed
after we checked not-null.
---
 nimble/controller/src/ble_ll.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/nimble/controller/src/ble_ll.c b/nimble/controller/src/ble_ll.c
index a5c4897..cf83b79 100644
--- a/nimble/controller/src/ble_ll.c
+++ b/nimble/controller/src/ble_ll.c
@@ -711,6 +711,7 @@ ble_ll_tx_pkt_in(void)
 uint16_t pb;
 struct os_mbuf_pkthdr *pkthdr;
 struct os_mbuf *om;
+os_sr_t sr;
 
 /* Drain all packets off the queue */
 while (STAILQ_FIRST(_ble_ll_data.ll_tx_pkt_q)) {
@@ -719,7 +720,9 @@ ble_ll_tx_pkt_in(void)
 om = (struct os_mbuf *)((uint8_t *)pkthdr - sizeof(struct os_mbuf));
 
 /* Remove from queue */
+OS_ENTER_CRITICAL(sr);
 STAILQ_REMOVE_HEAD(_ble_ll_data.ll_tx_pkt_q, omp_next);
+OS_EXIT_CRITICAL(sr);
 
 /* Strip HCI ACL header to get handle and length */
 handle = get_le16(om->om_data);



[mynewt-core] branch master updated: hw/mcu/da1469x: Configurable RCX reference count calibration value

2020-12-21 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 fc00736  hw/mcu/da1469x: Configurable RCX reference count calibration 
value
fc00736 is described below

commit fc007362e1f5722a9ac458dfb2404f0d4865aa99
Author: Will San Filippo 
AuthorDate: Mon Dec 21 13:53:04 2020 -0800

hw/mcu/da1469x: Configurable RCX reference count calibration value

Code prior to this change fixed the reference count value used
for RCX calibration to 100. This change allows it to be configured
by the user as a value of 100 makes for a long calibration time
(on the order of 6.67 msecs).
---
 hw/mcu/dialog/da1469x/src/da1469x_clock.c |  9 ++---
 hw/mcu/dialog/da1469x/syscfg.yml  | 13 -
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/hw/mcu/dialog/da1469x/src/da1469x_clock.c 
b/hw/mcu/dialog/da1469x/src/da1469x_clock.c
index 5e856f8..d825529 100644
--- a/hw/mcu/dialog/da1469x/src/da1469x_clock.c
+++ b/hw/mcu/dialog/da1469x/src/da1469x_clock.c
@@ -204,13 +204,8 @@ da1469x_clock_calibrate(uint8_t clock_sel, uint16_t 
ref_cnt)
 void
 da1469x_clock_lp_rcx_calibrate(void)
 {
-/*
- * XXX not sure what is a good value here, this is just some value that
- * seems to work fine; we need to check how accurate this is and 
perhaps
- * also make it configurable if necessary
- */
-const uint32_t ref_cnt = 100;
-g_mcu_clock_rcx_freq = da1469x_clock_calibrate(3, ref_cnt);
+g_mcu_clock_rcx_freq =
+da1469x_clock_calibrate(3, MYNEWT_VAL(MCU_CLOCK_RCX_CAL_REF_CNT));
 }
 
 void
diff --git a/hw/mcu/dialog/da1469x/syscfg.yml b/hw/mcu/dialog/da1469x/syscfg.yml
index af65773..7fb7b09 100644
--- a/hw/mcu/dialog/da1469x/syscfg.yml
+++ b/hw/mcu/dialog/da1469x/syscfg.yml
@@ -66,6 +66,17 @@ syscfg.defs:
 description: >
 Specifies settling time [ms] of 32K crystal oscillator.
 value: 8000
+
+MCU_CLOCK_RCX_CAL_REF_CNT:
+description: >
+Reference count value for calibration of RCX clock. The higher
+the value the more accurate the calibration but also increases
+calibration time. The calibration time is approximately this
+value multiplied by one 15kHz clock cycle, thus total calibration
+time will be approx 66.67 usecs * MCU_CLOCK_RCX_CAL_REF_CNT.
+value: 100
+restrictions: '!0'
+
 MCU_SYSCLK_SOURCE:
 description: >
 Specifies system clock source
@@ -114,7 +125,7 @@ syscfg.defs:
 value: 0
 MCU_DMA_IRQ_PRIO:
 description: >
-Specifies the NVIC interrupt priority to assign for the DMA_IRQn 
+Specifies the NVIC interrupt priority to assign for the DMA_IRQn
 interrupt.
 value: 15
 



[mynewt-nimble] branch master updated: cmac/driver: Make CMAC2SYS IRQ priority configurable

2020-11-16 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 4dc6f04  cmac/driver: Make CMAC2SYS IRQ priority configurable
 new 19d599b  Merge pull request #885 from wes3/cmac2sys_priority
4dc6f04 is described below

commit 4dc6f0494b2878c7cb4b64754148ba2ad4a9c37d
Author: Will San Filippo 
AuthorDate: Fri Nov 13 19:24:49 2020 -0800

cmac/driver: Make CMAC2SYS IRQ priority configurable

Allow the application to modify the CMAC2SYS IRQ priority.
---
 nimble/transport/dialog_cmac/cmac_driver/src/cmac_host.c | 2 +-
 nimble/transport/dialog_cmac/cmac_driver/syscfg.yml  | 6 ++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/nimble/transport/dialog_cmac/cmac_driver/src/cmac_host.c 
b/nimble/transport/dialog_cmac/cmac_driver/src/cmac_host.c
index 78c722c..d07d127 100644
--- a/nimble/transport/dialog_cmac/cmac_driver/src/cmac_host.c
+++ b/nimble/transport/dialog_cmac/cmac_driver/src/cmac_host.c
@@ -235,7 +235,7 @@ cmac_host_init(void)
 
 /* Setup CMAC2SYS interrupt */
 NVIC_SetVector(CMAC2SYS_IRQn, (uint32_t)cmac2sys_isr);
-NVIC_SetPriority(CMAC2SYS_IRQn, 0);
+NVIC_SetPriority(CMAC2SYS_IRQn, MYNEWT_VAL(CMAC_CMAC2SYS_IRQ_PRIORITY));
 NVIC_DisableIRQ(CMAC2SYS_IRQn);
 
 /* Enable Radio LDO */
diff --git a/nimble/transport/dialog_cmac/cmac_driver/syscfg.yml 
b/nimble/transport/dialog_cmac/cmac_driver/syscfg.yml
index e3f3a2d..a382c42 100644
--- a/nimble/transport/dialog_cmac/cmac_driver/syscfg.yml
+++ b/nimble/transport/dialog_cmac/cmac_driver/syscfg.yml
@@ -94,5 +94,11 @@ syscfg.defs:
 CMAC binary.
 value: 128K
 
+CMAC_CMAC2SYS_IRQ_PRIORITY:
+description: >
+The priority of the CMAC2SYS IRQ. Default is 0, or highest
+priority.
+value: 0
+
 syscfg.restrictions.BLE_HOST:
 - TRNG



[mynewt-core] branch master updated: hw/mcu/stm/stm32_common: Clear overrun error (#2325)

2020-07-06 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 1883c01  hw/mcu/stm/stm32_common: Clear overrun error (#2325)
1883c01 is described below

commit 1883c011cdbe15a62d30df4a162e03730dd43705
Author: wes3 
AuthorDate: Mon Jul 6 10:52:03 2020 -0700

hw/mcu/stm/stm32_common: Clear overrun error (#2325)

The uart irq handler for certain stm32 mcu's was not handling
the clearing of an rx overrun error. This code should handle it
properly.
---
 hw/mcu/stm/stm32_common/src/hal_uart.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/hw/mcu/stm/stm32_common/src/hal_uart.c 
b/hw/mcu/stm/stm32_common/src/hal_uart.c
index 6671d28..394a9f6 100644
--- a/hw/mcu/stm/stm32_common/src/hal_uart.c
+++ b/hw/mcu/stm/stm32_common/src/hal_uart.c
@@ -223,6 +223,11 @@ uart_irq_handler(int num)
 if (isr & USART_ISR_ORE) {
 regs->ICR |= USART_ICR_ORECF;
 }
+#else
+/* clear overrun */
+if (isr & USART_SR_ORE) {
+(void)RXDR(regs);
+}
 #endif
 }
 



[mynewt-core] branch master updated: net/ip: Re-arrange lwip (#2323)

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

wes3 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 0c29e69  net/ip: Re-arrange lwip (#2323)
0c29e69 is described below

commit 0c29e69b4267f2a7e916d33d07d2cefcd59e82c7
Author: wes3 
AuthorDate: Thu Jun 25 08:29:00 2020 -0700

net/ip: Re-arrange lwip (#2323)

* net/ip: Re-arrange lwip

This commit changes how the mynewt lwip code is arranged in
the repository. Hopefully, this new arrangement makes it easier
to include lwip_base so other lwip implementations can use it
without having to bring the mynewt lwip code. Packages requiring
the base lwip code (and not the mynewt lwip code) can depend
on net/ip/lwip_base. Applications wanting to include the mynewt
lwip code should depend on net/ip/lwip_mn. None of the previous
functionality should change; the code was simply moved from
net/ip/src to net/ip/lwip_mn/src and a new package created.

* net/ip: Re-arrange lwip

Place a dependency to lwip_mn in the lwip driver for stm32_eth.
This is needed as the previous package in net/ip was modified
and the mynewt lwip code was moved.
---
 hw/drivers/lwip/stm32_eth/pkg.yml  |  4 ++--
 net/ip/{ => lwip_mn}/include/lwipopts.h|  0
 net/ip/{ => lwip_mn}/pkg.yml   |  7 ++-
 net/ip/{ => lwip_mn}/src/ip_init.c |  0
 net/ip/{ => lwip_mn}/src/ip_priv.h |  0
 net/ip/{ => lwip_mn}/src/lwip_cli.c|  0
 net/ip/{ => lwip_mn}/src/lwip_if.c |  0
 net/ip/{ => lwip_mn}/src/lwip_mynewt.c |  0
 net/ip/{ => lwip_mn}/src/lwip_socket.c |  0
 net/ip/{ => lwip_mn}/src/os_queue.c|  0
 net/ip/{ => lwip_mn}/syscfg.yml|  0
 net/ip/mn_socket/include/mn_socket/mn_socket.h |  6 ++
 net/ip/pkg.yml | 11 ---
 13 files changed, 10 insertions(+), 18 deletions(-)

diff --git a/hw/drivers/lwip/stm32_eth/pkg.yml 
b/hw/drivers/lwip/stm32_eth/pkg.yml
index 6819c45..b5d92e6 100644
--- a/hw/drivers/lwip/stm32_eth/pkg.yml
+++ b/hw/drivers/lwip/stm32_eth/pkg.yml
@@ -27,7 +27,7 @@ pkg.keywords:
 - ethernet
 pkg.deps:
 - "@apache-mynewt-core/hw/hal"
-- "@apache-mynewt-core/net/ip/lwip_base"
+- "@apache-mynewt-core/net/ip/lwip_mn"
 
 pkg.deps.MCU_STM32F4:
 - "@apache-mynewt-core/hw/mcu/stm/stm32f4xx"
@@ -35,7 +35,7 @@ pkg.deps.MCU_STM32F4:
 pkg.deps.MCU_STM32F7:
 - "@apache-mynewt-core/hw/mcu/stm/stm32f7xx"
 
-pkg.req_apis: 
+pkg.req_apis:
 
 pkg.init:
 stm32_eth_open: 'MYNEWT_VAL(STM32_ETH_SYSINIT_STAGE)'
diff --git a/net/ip/include/lwipopts.h b/net/ip/lwip_mn/include/lwipopts.h
similarity index 100%
rename from net/ip/include/lwipopts.h
rename to net/ip/lwip_mn/include/lwipopts.h
diff --git a/net/ip/pkg.yml b/net/ip/lwip_mn/pkg.yml
similarity index 95%
copy from net/ip/pkg.yml
copy to net/ip/lwip_mn/pkg.yml
index 998e0dd..b41b8da 100644
--- a/net/ip/pkg.yml
+++ b/net/ip/lwip_mn/pkg.yml
@@ -17,15 +17,12 @@
 # under the License.
 #
 
-pkg.name: net/ip
+pkg.name: net/ip/lwip_mn
 pkg.description: LwIP adaptation to Mynewt
 pkg.author: "Apache Mynewt "
 pkg.homepage:
 pkg.keywords:
-- ip
-- ipv6
-- tcp
-- udp
+- lwip
 
 pkg.deps:
 - "@apache-mynewt-core/kernel/os"
diff --git a/net/ip/src/ip_init.c b/net/ip/lwip_mn/src/ip_init.c
similarity index 100%
rename from net/ip/src/ip_init.c
rename to net/ip/lwip_mn/src/ip_init.c
diff --git a/net/ip/src/ip_priv.h b/net/ip/lwip_mn/src/ip_priv.h
similarity index 100%
rename from net/ip/src/ip_priv.h
rename to net/ip/lwip_mn/src/ip_priv.h
diff --git a/net/ip/src/lwip_cli.c b/net/ip/lwip_mn/src/lwip_cli.c
similarity index 100%
rename from net/ip/src/lwip_cli.c
rename to net/ip/lwip_mn/src/lwip_cli.c
diff --git a/net/ip/src/lwip_if.c b/net/ip/lwip_mn/src/lwip_if.c
similarity index 100%
rename from net/ip/src/lwip_if.c
rename to net/ip/lwip_mn/src/lwip_if.c
diff --git a/net/ip/src/lwip_mynewt.c b/net/ip/lwip_mn/src/lwip_mynewt.c
similarity index 100%
rename from net/ip/src/lwip_mynewt.c
rename to net/ip/lwip_mn/src/lwip_mynewt.c
diff --git a/net/ip/src/lwip_socket.c b/net/ip/lwip_mn/src/lwip_socket.c
similarity index 100%
rename from net/ip/src/lwip_socket.c
rename to net/ip/lwip_mn/src/lwip_socket.c
diff --git a/net/ip/src/os_queue.c b/net/ip/lwip_mn/src/os_queue.c
similarity index 100%
rename from net/ip/src/os_queue.c
rename to net/ip/lwip_mn/src/os_queue.c
diff --git a/net/ip/syscfg.yml b/net/ip/lwip_mn/syscfg.yml
similarity index 100%
rename from net/ip/syscfg.yml
rename to net/ip/lwip_mn/syscfg.yml
diff --git a/net/ip/mn_socket/include/mn_socket/mn_socket.h 
b/net/ip/mn_socket/include/mn_socket/mn_socket.h
index 42b0fef..b784621 

[mynewt-core] branch master updated: hw/mcu/stm/stm32_common: Add include for os_cputime.h (#2318)

2020-06-16 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 afe3836  hw/mcu/stm/stm32_common: Add include for os_cputime.h (#2318)
afe3836 is described below

commit afe3836e2b3209c22e223d488856b74bd7911409
Author: wes3 
AuthorDate: Tue Jun 16 12:31:12 2020 -0700

hw/mcu/stm/stm32_common: Add include for os_cputime.h (#2318)

The stm32_periph.c file may not include os_cputime.h if certain
syscfg values are not set. This explicitly include os_cputime.h
if OS_CPUTIME_TIMER_NUM is >= 0.

Fix parentheses.
---
 hw/mcu/stm/stm32_common/src/stm32_periph.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/mcu/stm/stm32_common/src/stm32_periph.c 
b/hw/mcu/stm/stm32_common/src/stm32_periph.c
index 179a2be..b6cdf0e 100644
--- a/hw/mcu/stm/stm32_common/src/stm32_periph.c
+++ b/hw/mcu/stm/stm32_common/src/stm32_periph.c
@@ -52,6 +52,9 @@
 #include "stm32f4xx_hal_adc.h"
 #include "adc_stm32f4/adc_stm32f4.h"
 #endif
+#if MYNEWT_VAL(OS_CPUTIME_TIMER_NUM) >= 0
+#include "os/os_cputime.h"
+#endif
 
 #include "mcu/stm32_hal.h"
 



[mynewt-core] branch master updated: da1469x: otp and serial script enhancements (#2262)

2020-04-08 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 817ba5b  da1469x: otp and serial script enhancements (#2262)
817ba5b is described below

commit 817ba5b516da1241a7f0e9355b1fa0834c15c53d
Author: Naveen Kaje 
AuthorDate: Wed Apr 8 12:07:46 2020 -0500

da1469x: otp and serial script enhancements (#2262)

* hw/bsp/da1469x: da1469x_serial: Make the reset script optional

Make the reset script an optional parameter. This gives the
user an option to manually reset the board to make it enter
the serial load mode or use JLink or OpenOCD based reset script.

Signed-off-by: Naveen Kaje 

* hw/bsp/da1469x: otp_tool: provide common function for serial

Provide common method for serial port opening opens the port, flushes
and returns port handle. This eleminates repeated code.

Signed-off-by: Naveen Kaje 

* hw/bsp/da1469x: da1469x_serial: drain the port after open

Drain the port after opening to ensure the
buffers are empty.

Signed-off-by: Naveen Kaje 
---
 hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py | 16 +-
 hw/bsp/dialog_da1469x-dk-pro/otp_tool.py   | 70 +-
 2 files changed, 39 insertions(+), 47 deletions(-)

diff --git a/hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py 
b/hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py
index 1d7d7aa..598c609 100755
--- a/hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py
+++ b/hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py
@@ -26,7 +26,7 @@ from datetime import datetime
 
 @click.argument('infile')
 @click.option('-u', '--uart', required=True, help='uart port')
-@click.option('-r', '--reset_script', required=True, help='Custom reset script 
to switch to serial load')
+@click.option('-r', '--reset_script', required=False, help='Custom reset 
script to switch to serial load')
 @click.command(help='Load the provided file using serial load protocol')
 def load(infile, uart, reset_script):
 try:
@@ -35,6 +35,15 @@ def load(infile, uart, reset_script):
 except serial.SerialException:
 raise SystemExit("Failed to open serial port")
 
+# drain serial port buffer
+try:
+while True:
+data = ser.read(1)
+if len(data) == 0:
+break
+except serial.SerialException:
+raise SystemExit("Failed to open serial port")
+
 try:
 f = open(infile, "rb")
 except IOError:
@@ -59,12 +68,15 @@ def load(infile, uart, reset_script):
 prev = datetime.now()
 reset_delay_us = 25
 
+if reset_script is None:
+print("Please reset board to enter ROM uart recovery")
+
 while True:
 elapsed = datetime.now() - prev
 if elapsed.seconds >= 15:
 raise SystemExit("Failed to receive SOM, aborting")
 if not som_detected and not reset_triggered:
-if elapsed.microseconds >= reset_delay_us:
+if reset_script and elapsed.microseconds >= reset_delay_us:
 print("Triggering SWD reset...")
 # Run in background
 os.system(reset_script + " &")
diff --git a/hw/bsp/dialog_da1469x-dk-pro/otp_tool.py 
b/hw/bsp/dialog_da1469x-dk-pro/otp_tool.py
index fbe3086..8883365 100755
--- a/hw/bsp/dialog_da1469x-dk-pro/otp_tool.py
+++ b/hw/bsp/dialog_da1469x-dk-pro/otp_tool.py
@@ -125,14 +125,26 @@ def validate_response(response):
 return True
 
 
-def otp_read_key(index, segment, uart):
-seg_map = {'signature': 0, 'data': 1, 'qspi': 2}
-
+def get_serial_port(port, baudrate, timeout, bytesize, stopbits):
 try:
-ser = serial.Serial(port=uart, baudrate=100, timeout=1,
-bytesize=8, stopbits=serial.STOPBITS_ONE)
+ser = serial.Serial(port=port, baudrate=baudrate, timeout=timeout,
+bytesize=bytesize, stopbits=stopbits)
 except serial.SerialException:
 raise SystemExit("Failed to open serial port")
+# drain serial port buffer
+try:
+while True:
+data = ser.read(1)
+if len(data) == 0:
+break
+except serial.SerialException:
+raise SystemExit("Failed to open serial port")
+return ser
+
+
+def otp_read_key(index, segment, uart):
+seg_map = {'signature': 0, 'data': 1, 'qspi': 2}
+ser = get_serial_port(uart, 100, 1, 8, serial.STOPBITS_ONE)
 
 cmd = cmd_read_key(0xaa55aa55, Cmd.OTP_READ_KEY, seg_map[segment], index)
 data = struct.pack('', *cmd)
@@ -196,11 +208,7 @@ def otp_write_key(infile, index, segment, uart):
 
 seg_map = {'signature': 0, 'data': 1, 'qspi': 2}
 
-try:
-ser = serial.Serial(port=u

[mynewt-core] branch master updated: hw/mcu/dialog: Fix unitialized variable in hal_timer_stop (#2169)

2020-01-27 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 d4b3e5a  hw/mcu/dialog: Fix unitialized variable in hal_timer_stop 
(#2169)
d4b3e5a is described below

commit d4b3e5a07587ef058a2d3ab0afd7669bf1654e24
Author: wes3 
AuthorDate: Mon Jan 27 12:53:37 2020 -0800

hw/mcu/dialog: Fix unitialized variable in hal_timer_stop (#2169)

The local variable 'reset' was not initialized prior to use.
---
 hw/mcu/dialog/da1469x/src/hal_timer.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/mcu/dialog/da1469x/src/hal_timer.c 
b/hw/mcu/dialog/da1469x/src/hal_timer.c
index 85da329..6476fa0 100644
--- a/hw/mcu/dialog/da1469x/src/hal_timer.c
+++ b/hw/mcu/dialog/da1469x/src/hal_timer.c
@@ -515,6 +515,7 @@ hal_timer_stop(struct hal_timer *timer)
 return 0;
 }
 
+reset = 0;
 tmr = timer->bsp_timer;
 
 __HAL_DISABLE_INTERRUPTS(primask);



[mynewt-core] branch master updated: net/oic: Handle coap error in dispatch_coap_request (#2141)

2020-01-03 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 860d713  net/oic: Handle coap error in dispatch_coap_request (#2141)
860d713 is described below

commit 860d71301cb8d48b7252e4d1aa11499caea85fc1
Author: wes3 
AuthorDate: Fri Jan 3 15:54:50 2020 -0800

net/oic: Handle coap error in dispatch_coap_request (#2141)

If there was an error during cbor processing the code in
dispatch_coap_request() would set an incorrect payload length
of 0x since the return code of -1 was being interpreted as
a length instead of an error. The new code checks for error
from oc_rep_finalize(), and if there is an error, frees the
appropriate buffers and clears and transactions (if any).
---
 net/oic/src/api/oc_client_api.c | 19 ++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/net/oic/src/api/oc_client_api.c b/net/oic/src/api/oc_client_api.c
index 9b7e393..83a305c 100644
--- a/net/oic/src/api/oc_client_api.c
+++ b/net/oic/src/api/oc_client_api.c
@@ -36,7 +36,24 @@ static coap_packet_t oc_c_request[1];
 static bool
 dispatch_coap_request(void)
 {
-int response_length = oc_rep_finalize();
+int response_length;
+
+response_length = oc_rep_finalize();
+if (response_length == -1) {
+/* A return of -1 indicates some cbor error */
+os_mbuf_free_chain(oc_c_rsp);
+oc_c_rsp = NULL;
+if (!oc_c_transaction) {
+if (oc_c_message) {
+os_mbuf_free_chain(oc_c_message);
+oc_c_message = NULL;
+}
+} else {
+coap_clear_transaction(oc_c_transaction);
+oc_c_transaction = NULL;
+}
+return false;
+}
 
 if (response_length) {
 oc_c_request->payload_m = oc_c_rsp;



[mynewt-core] branch master updated (d68ec07 -> dacb464)

2019-12-17 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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


from d68ec07  hw/mcu/nordic: Fix hal_timer firing too early
 add dacb464  hw/drivers/crypto: Add crypto_in_use flag. (#2134)

No new revisions were added by this update.

Summary of changes:
 hw/drivers/crypto/crypto_nrf52/src/crypto_nrf52.c | 49 +++
 hw/drivers/crypto/include/crypto/crypto.h | 11 +
 hw/drivers/crypto/src/crypto.c|  6 +++
 hw/drivers/flash/enc_flash/ef_crypto/pkg.yml  |  3 ++
 4 files changed, 52 insertions(+), 17 deletions(-)



[mynewt-nimble] branch master updated (d2853c9 -> cbaa211)

2019-11-05 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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


from d2853c9  nimble/ll: Fix setting sent_to_host flag
 new 3ab8171  nimble/host: Use os_mbuf_pack_chains
 new ec8ebe6  porting/nimble: os_mbuf_pack_chains
 new cbaa211  Merge pull request #630 from wes3/l2_rxcap_pack_chains

The 3482 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_l2cap.c | 14 +++---
 porting/nimble/include/os/os_mbuf.h | 19 
 porting/nimble/src/os_mbuf.c| 86 +
 3 files changed, 110 insertions(+), 9 deletions(-)



[mynewt-core] branch master updated: kernel/os: Add os_mbuf_pack_chains (#2075)

2019-10-29 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 c5d9068  kernel/os: Add os_mbuf_pack_chains (#2075)
c5d9068 is described below

commit c5d9068cd472f32f0afd89594038a188d9ddf50d
Author: wes3 
AuthorDate: Tue Oct 29 17:52:39 2019 -0700

kernel/os: Add os_mbuf_pack_chains (#2075)

* kernel/os: Add os_mbuf_pack_chains

This commit adds a new API for mbuf handling called os_mbuf_pack_chains.
This API, given two mbuf chains, will concatenate them and copy data
as needed so that each mbuf fully utilizes the data buffer in each mbuf.
Unused mbufs are discarded. This API sacrifices speed for memory and
may cause a lot of copying to occur within the mbuf chains.

Test code has been written for a number of reasonable cases.

* kernel/os: os_mbuf_pack_chains

Fix typo in name of os_mbuf_test_pack_chains_rand.
---
 kernel/os/include/os/os_mbuf.h |  20 ++
 kernel/os/selftest/src/mbuf_test.c |   4 +-
 .../src/testcases/os_mbuf_test_pack_chains.c   | 371 +
 kernel/os/src/os_mbuf.c|  87 +
 4 files changed, 481 insertions(+), 1 deletion(-)

diff --git a/kernel/os/include/os/os_mbuf.h b/kernel/os/include/os/os_mbuf.h
index 40dc16a..53a16c5 100644
--- a/kernel/os/include/os/os_mbuf.h
+++ b/kernel/os/include/os/os_mbuf.h
@@ -644,6 +644,26 @@ struct os_mbuf *os_mbuf_trim_front(struct os_mbuf *om);
  */
 int os_mbuf_widen(struct os_mbuf *om, uint16_t off, uint16_t len);
 
+
+/**
+ * Creates a single chained mbuf from m1 and m2 utilizing all
+ * the available buffer space in all mbufs in the resulting
+ * chain. In other words, ensures there is no leading space in
+ * any mbuf in the resulting chain and trailing space only in
+ * the last mbuf in the chain. Mbufs from either chain may be
+ * freed if not needed. No mbufs are allocated. Note that mbufs
+ * from m2 are added to the end of m1. If m1 has a packet
+ * header, it is retained and length updated. If m2 has a packet
+ * header it is discarded. If m1 is NULL, NULL is returned and
+ * m2 is left untouched.
+ *
+ * @param m1 Pointer to first mbuf chain to pack
+ * @param m2 Pointer to second mbuf chain to pack
+ *
+ * @return struct os_mbuf* Pointer to resulting mbuf chain
+ */
+struct os_mbuf *os_mbuf_pack_chains(struct os_mbuf *m1, struct os_mbuf *m2);
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/kernel/os/selftest/src/mbuf_test.c 
b/kernel/os/selftest/src/mbuf_test.c
index 0a39ba4..ad5bfec 100644
--- a/kernel/os/selftest/src/mbuf_test.c
+++ b/kernel/os/selftest/src/mbuf_test.c
@@ -22,7 +22,7 @@
 #include "testutil/testutil.h"
 #include "os_test_priv.h"
 
-/* 
+/*
  * NOTE: currently, the buffer size cannot be changed as some tests are
  * hard-coded for this size.
  */
@@ -102,6 +102,7 @@ TEST_CASE_DECL(os_mbuf_test_extend)
 TEST_CASE_DECL(os_mbuf_test_adj)
 TEST_CASE_DECL(os_mbuf_test_get_pkthdr)
 TEST_CASE_DECL(os_mbuf_test_widen)
+TEST_CASE_DECL(os_mbuf_test_pack_chains)
 
 TEST_SUITE(os_mbuf_test_suite)
 {
@@ -113,4 +114,5 @@ TEST_SUITE(os_mbuf_test_suite)
 os_mbuf_test_adj();
 os_mbuf_test_get_pkthdr();
 os_mbuf_test_widen();
+os_mbuf_test_pack_chains();
 }
diff --git a/kernel/os/selftest/src/testcases/os_mbuf_test_pack_chains.c 
b/kernel/os/selftest/src/testcases/os_mbuf_test_pack_chains.c
new file mode 100644
index 000..a684506
--- /dev/null
+++ b/kernel/os/selftest/src/testcases/os_mbuf_test_pack_chains.c
@@ -0,0 +1,371 @@
+/*
+ * 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 "os_test_priv.h"
+
+#if MBUF_TEST_POOL_BUF_SIZE != 256
+#error "Test pool buffer size must be 256!"
+#endif
+
+/* This structure is used to create mbuf chains. It contains the length
+   of data that should be in each mbuf in the chain and the amount of
+   leading space in the mbuf */
+struct os_mbtpc_cd
+{
+uint16_t mlen;
+uint16_t leadingspace;
+};
+
+/* The random seed (cho

[mynewt-core] branch master updated: DA1469x UART rx pullup (#2035)

2019-10-11 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 494da43  DA1469x UART rx pullup (#2035)
494da43 is described below

commit 494da43ae4919c4606538f69677302a43b54bba3
Author: wes3 
AuthorDate: Fri Oct 11 09:24:04 2019 -0700

DA1469x UART rx pullup (#2035)

hw/mcu/dialog: Enabling internal pullup on UART rx pin

This commit allows the enabling of an internal pullup on the
UART rx pin. The reason behind this change is that the UART
LCR register cannot be written if the RX line is low as the
UART will be considered busy. If there is no external pullup
on the line, this could cause the initialization to fail.

The current code uses a fixed loop counter to timeout the
polling of the busy state as using a timer is a bit
heavyweight. A future change could be to either make
this configurable and/or read the clock speed to determine
a suitable loop counter.
---
 hw/mcu/dialog/da1469x/include/mcu/da1469x_hal.h |  1 +
 hw/mcu/dialog/da1469x/src/da1469x_periph.c  |  3 ++
 hw/mcu/dialog/da1469x/src/hal_uart.c| 48 +
 hw/mcu/dialog/da1469x/syscfg.yml|  9 +
 4 files changed, 61 insertions(+)

diff --git a/hw/mcu/dialog/da1469x/include/mcu/da1469x_hal.h 
b/hw/mcu/dialog/da1469x/include/mcu/da1469x_hal.h
index 9c99f8e..b8e2ea6 100755
--- a/hw/mcu/dialog/da1469x/include/mcu/da1469x_hal.h
+++ b/hw/mcu/dialog/da1469x/include/mcu/da1469x_hal.h
@@ -54,6 +54,7 @@ struct da1469x_uart_cfg {
 int8_t pin_rx;
 int8_t pin_rts;
 int8_t pin_cts;
+uint8_t rx_pullup;
 };
 
 struct da1469x_hal_i2c_cfg {
diff --git a/hw/mcu/dialog/da1469x/src/da1469x_periph.c 
b/hw/mcu/dialog/da1469x/src/da1469x_periph.c
index 6860670..7685322 100644
--- a/hw/mcu/dialog/da1469x/src/da1469x_periph.c
+++ b/hw/mcu/dialog/da1469x/src/da1469x_periph.c
@@ -86,6 +86,7 @@ static const struct da1469x_uart_cfg os_bsp_uart0_cfg = {
 .pin_rx = MYNEWT_VAL(UART_0_PIN_RX),
 .pin_rts = -1,
 .pin_cts = -1,
+.rx_pullup = MYNEWT_VAL(UART_0_RX_ENABLE_PULLUP)
 };
 #endif
 #if MYNEWT_VAL(UART_1)
@@ -95,6 +96,7 @@ static const struct da1469x_uart_cfg os_bsp_uart1_cfg = {
 .pin_rx = MYNEWT_VAL(UART_1_PIN_RX),
 .pin_rts = MYNEWT_VAL(UART_1_PIN_RTS),
 .pin_cts = MYNEWT_VAL(UART_1_PIN_CTS),
+.rx_pullup = MYNEWT_VAL(UART_1_RX_ENABLE_PULLUP)
 };
 #endif
 #if MYNEWT_VAL(UART_2)
@@ -104,6 +106,7 @@ static const struct da1469x_uart_cfg os_bsp_uart2_cfg = {
 .pin_rx = MYNEWT_VAL(UART_2_PIN_RX),
 .pin_rts = MYNEWT_VAL(UART_2_PIN_RTS),
 .pin_cts = MYNEWT_VAL(UART_2_PIN_CTS),
+.rx_pullup = MYNEWT_VAL(UART_2_RX_ENABLE_PULLUP)
 };
 #endif
 
diff --git a/hw/mcu/dialog/da1469x/src/hal_uart.c 
b/hw/mcu/dialog/da1469x/src/hal_uart.c
index c0cad6b..a89595a 100644
--- a/hw/mcu/dialog/da1469x/src/hal_uart.c
+++ b/hw/mcu/dialog/da1469x/src/hal_uart.c
@@ -40,6 +40,13 @@ struct da1469x_uart {
 volatile uint8_t tx_started : 1;
 volatile uint8_t rx_data;
 
+/*
+ * Stores rx pin func and pointer to cfg. Needed to enable/disable pullup
+ * when the uart is opened/closed
+ */
+mcu_gpio_func rx_pin_func;
+struct da1469x_uart_cfg *cfg;
+
 hal_uart_rx_char rx_func;
 hal_uart_tx_char tx_func;
 hal_uart_tx_done tx_done;
@@ -214,6 +221,8 @@ da1469x_uart_common_isr(struct da1469x_uart *uart)
 case 0x06: /* receiver line status */
 break;
 case 0x07: /* busy detect */
+/* Clear the flag so if assert not defined no infinite loop here */
+(void)regs->UART2_USR_REG;
 assert(0);
 break;
 case 0x0c: /* character timeout */
@@ -403,6 +412,10 @@ hal_uart_init(int port, void *arg)
 uart->regs = regs;
 uart->irqn = irqn;
 
+/* These are for uart open/close to enable a pullup on the rx line */
+uart->rx_pin_func = gpiofunc[1];
+uart->cfg = cfg;
+
 mcu_gpio_set_pin_function(cfg->pin_tx, MCU_GPIO_MODE_OUTPUT, gpiofunc[0]);
 mcu_gpio_set_pin_function(cfg->pin_rx, MCU_GPIO_MODE_INPUT, gpiofunc[1]);
 if (cfg->pin_rts >= 0) {
@@ -429,6 +442,7 @@ hal_uart_config(int port, int32_t baudrate, uint8_t 
databits, uint8_t stopbits,
 UART2_Type *regs;
 uint32_t reg;
 uint32_t baudrate_cfg;
+uint32_t loop_count;
 
 uart = da1469x_uart_resolve(port);
 if (!uart) {
@@ -463,6 +477,34 @@ hal_uart_config(int port, int32_t baudrate, uint8_t 
databits, uint8_t stopbits,
 if (!baudrate_cfg) {
 return SYS_ENOTSUP;
 }
+
+/* Enable pullup if configured */
+if (uart->cfg->rx_pullup) {
+mcu_gpio_set_pin_function(uart->cfg->pin_rx, 
MCU_GPIO_MODE_INPUT_PULLUP,
+

[mynewt-nimble] branch master updated: nimble/ll: Remove unnecessary code

2019-10-04 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 d6710d6  nimble/ll: Remove unnecessary code
 new f7ade6a  Merge pull request #597 from wes3/ll_conn_fix
d6710d6 is described below

commit d6710d6a03d87d6af0a9762f7a2cec808ece6390
Author: Will San Filippo 
AuthorDate: Thu Oct 3 17:41:27 2019 -0700

nimble/ll: Remove unnecessary code

While reviewing code noticed that there was no need to check for
not receiving a terminate indication as that case is already
checked and could thus never be true. Removed the code that was
not needed.
---
 nimble/controller/src/ble_ll_conn.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/nimble/controller/src/ble_ll_conn.c 
b/nimble/controller/src/ble_ll_conn.c
index 416b340..30bb3d9 100644
--- a/nimble/controller/src/ble_ll_conn.c
+++ b/nimble/controller/src/ble_ll_conn.c
@@ -811,7 +811,7 @@ ble_ll_conn_tx_data_pdu(struct ble_ll_conn_sm *connsm)
 
 if (connsm->csmflags.cfbit.terminate_ind_rxd) {
 /* We just received terminate indication.
- * Just sent empty packet as an ACK
+ * Just send empty packet as an ACK
  */
 CONN_F_EMPTY_PDU_TXD(connsm) = 1;
 goto conn_tx_pdu;
@@ -918,8 +918,7 @@ ble_ll_conn_tx_data_pdu(struct ble_ll_conn_sm *connsm)
  * Set the more data data flag if we have more data to send and we
  * have not been asked to terminate
  */
-if ((nextpkthdr || ((cur_offset + cur_txlen) < pktlen)) &&
- !connsm->csmflags.cfbit.terminate_ind_rxd) {
+if (nextpkthdr || ((cur_offset + cur_txlen) < pktlen)) {
 /* Get next event time */
 next_event_time = ble_ll_conn_get_next_sched_time(connsm);
 



[mynewt-core] branch master updated: hw/mcu/dialog: Add helper to enable/disable AMBA clocks (#2024)

2019-10-02 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 1714997  hw/mcu/dialog: Add helper to enable/disable AMBA clocks 
(#2024)
1714997 is described below

commit 17149970d5cfa7ff763cf58e6a54db5f5cef3d11
Author: wes3 
AuthorDate: Wed Oct 2 11:41:39 2019 -0700

hw/mcu/dialog: Add helper to enable/disable AMBA clocks (#2024)

* hw/mcu/dialog: Add helper to enable/disable AMBA clocks

Add a helper to enable/disable AMBA clocks in CRG_TOP->CLK_AMBA_REG.
The code was doing an un-protected read-modify-write and if the
clock is modified inside ISR's this could cause unpredictable
behavior.

* hw/mcu/dialog: Add helper to enable/disable AMBA clocks

Fix function header.

* hw/mcu/dialog: Add helper to enable/disable AMBA clocks

Replace include of cmsis_nvic.h in da1469x_hal.h with mcu.h as
this header file needs to definitions for __get_PRIMASK.
---
 hw/drivers/trng/trng_da1469x/src/trng_da1469x.c   |  9 ---
 hw/mcu/dialog/da1469x/include/mcu/da1469x_clock.h | 31 +++
 hw/mcu/dialog/da1469x/include/mcu/da1469x_hal.h   |  1 +
 hw/mcu/dialog/da1469x/src/system_da1469x.c|  6 +++--
 4 files changed, 41 insertions(+), 6 deletions(-)

diff --git a/hw/drivers/trng/trng_da1469x/src/trng_da1469x.c 
b/hw/drivers/trng/trng_da1469x/src/trng_da1469x.c
index de970b9..8ffa150 100644
--- a/hw/drivers/trng/trng_da1469x/src/trng_da1469x.c
+++ b/hw/drivers/trng/trng_da1469x/src/trng_da1469x.c
@@ -20,6 +20,7 @@
 #include 
 #include 
 #include 
+#include "mcu/da1469x_clock.h"
 
 #define DA1469X_TRNG_FIFO_SIZE  (32 * sizeof(uint32_t))
 #define DA1469X_TRNG_FIFO_ADDR  (0x3005UL)
@@ -41,7 +42,7 @@ da1469x_trng_read(struct trng_dev *trng, void *ptr, size_t 
size)
 words_to_generate = size / sizeof(uint32_t);
 remaining_octets = size % sizeof(uint32_t);
 
-CRG_TOP->CLK_AMBA_REG |= (1U << CRG_TOP_CLK_AMBA_REG_TRNG_CLK_ENABLE_Pos);
+da1469x_clock_amba_enable(CRG_TOP_CLK_AMBA_REG_TRNG_CLK_ENABLE_Msk);
 TRNG->TRNG_CTRL_REG = TRNG_TRNG_CTRL_REG_TRNG_ENABLE_Msk;
 
 if (remaining_octets) {
@@ -64,7 +65,7 @@ da1469x_trng_read(struct trng_dev *trng, void *ptr, size_t 
size)
 }
 
 TRNG->TRNG_CTRL_REG = 0;
-CRG_TOP->CLK_AMBA_REG &= ~(1U << CRG_TOP_CLK_AMBA_REG_TRNG_CLK_ENABLE_Pos);
+da1469x_clock_amba_disable(CRG_TOP_CLK_AMBA_REG_TRNG_CLK_ENABLE_Msk);
 
 return size;
 }
@@ -74,14 +75,14 @@ da1469x_trng_get_u32(struct trng_dev *trng)
 {
 uint32_t ret;
 
-CRG_TOP->CLK_AMBA_REG |= (1U << CRG_TOP_CLK_AMBA_REG_TRNG_CLK_ENABLE_Pos);
+da1469x_clock_amba_enable(CRG_TOP_CLK_AMBA_REG_TRNG_CLK_ENABLE_Msk);
 TRNG->TRNG_CTRL_REG = TRNG_TRNG_CTRL_REG_TRNG_ENABLE_Msk;
 while (TRNG->TRNG_FIFOLVL_REG < 1);
 
 ret = *(uint32_t *)DA1469X_TRNG_FIFO_ADDR;
 
 TRNG->TRNG_CTRL_REG = 0;
-CRG_TOP->CLK_AMBA_REG &= ~(1U << CRG_TOP_CLK_AMBA_REG_TRNG_CLK_ENABLE_Pos);
+da1469x_clock_amba_disable(CRG_TOP_CLK_AMBA_REG_TRNG_CLK_ENABLE_Msk);
 
 return ret;
 }
diff --git a/hw/mcu/dialog/da1469x/include/mcu/da1469x_clock.h 
b/hw/mcu/dialog/da1469x/include/mcu/da1469x_clock.h
index 66bbcab..c76c7a0 100644
--- a/hw/mcu/dialog/da1469x/include/mcu/da1469x_clock.h
+++ b/hw/mcu/dialog/da1469x/include/mcu/da1469x_clock.h
@@ -21,6 +21,7 @@
 #define __MCU_DA1469X_CLOCK_H_
 
 #include 
+#include "mcu/da1469x_hal.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -94,6 +95,36 @@ uint32_t da1469x_clock_lp_rcx_freq_get(void);
  */
 void da1469x_clock_lp_rcx_disable(void);
 
+/**
+ * Enable AMBA clock(s)
+ *
+ * @param mask
+ */
+static inline void
+da1469x_clock_amba_enable(uint32_t mask)
+{
+uint32_t primask;
+
+__HAL_DISABLE_INTERRUPTS(primask);
+CRG_TOP->CLK_AMBA_REG |= mask;
+__HAL_ENABLE_INTERRUPTS(primask);
+}
+
+/**
+ * Disable AMBA clock(s)
+ *
+ * @param uint32_t mask
+ */
+static inline void
+da1469x_clock_amba_disable(uint32_t mask)
+{
+uint32_t primask;
+
+__HAL_DISABLE_INTERRUPTS(primask);
+CRG_TOP->CLK_AMBA_REG &= ~mask;
+__HAL_ENABLE_INTERRUPTS(primask);
+}
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/hw/mcu/dialog/da1469x/include/mcu/da1469x_hal.h 
b/hw/mcu/dialog/da1469x/include/mcu/da1469x_hal.h
index 74f5cd7..9c99f8e 100755
--- a/hw/mcu/dialog/da1469x/include/mcu/da1469x_hal.h
+++ b/hw/mcu/dialog/da1469x/include/mcu/da1469x_hal.h
@@ -21,6 +21,7 @@
 #define __MCU_DA1469X_HAL_H_
 
 #include 
+#include "mcu/mcu.h"
 #include "hal/hal_flash.h"
 
 #ifdef __cplusplus
diff --git a/hw/mcu/dialog/da1469x/src/system_da1469x.c 
b/hw/mcu/dialog/da1469x/src/system_da1469x.c
index 1117228..e75c660 100644
--- a/hw/mcu/dialog/da1469x/src/system_da1469x.c
+++ b/hw/mcu/di

[mynewt-nimble] branch master updated: nimble/controller: Packet counter size in connection incorrect.

2019-08-12 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 943983f  nimble/controller: Packet counter size in connection 
incorrect.
 new e52a1f5  Merge pull request #553 from wes3/conn_pkt_cntr_fix
943983f is described below

commit 943983f5e9c3bd03f70d78137d4b1976f9408eed
Author: Will San Filippo 
AuthorDate: Tue Aug 6 14:47:47 2019 -0700

nimble/controller: Packet counter size in connection incorrect.

The transmit and receive packet counters were incorrectly sized at
16 bits. The specification dictates 39 bits of packet counter. The
fix makes them 32 bits as opposed to the full 39 as we do not think
the chance of there being more than 2^32 packets during a connection
likely and thus does not warrant the additioal RAM usage per
connection (nor the slight addition to code space and speed).
---
 nimble/controller/include/controller/ble_ll_conn.h | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/nimble/controller/include/controller/ble_ll_conn.h 
b/nimble/controller/include/controller/ble_ll_conn.h
index 14a1972..97492af 100644
--- a/nimble/controller/include/controller/ble_ll_conn.h
+++ b/nimble/controller/include/controller/ble_ll_conn.h
@@ -81,14 +81,20 @@ enum conn_enc_state {
 /*
  * Note that the LTK is the key, the SDK is the plain text, and the
  * session key is the cipher text portion of the encryption block.
+ *
+ * NOTE: we have intentionally violated the specification by making the
+ * transmit and receive packet counters 32-bits as opposed to 39 (as per the
+ * specification). We do this to save code space, ram and calculation time. The
+ * only drawback is that any encrypted connection that sends more than 2^32
+ * packets will suffer a MIC failure and thus be disconnected.
  */
 struct ble_ll_conn_enc_data
 {
 uint8_t enc_state;
 uint8_t tx_encrypted;
 uint16_t enc_div;
-uint16_t tx_pkt_cntr;
-uint16_t rx_pkt_cntr;
+uint32_t tx_pkt_cntr;
+uint32_t rx_pkt_cntr;
 uint64_t host_rand_num;
 uint8_t iv[8];
 struct ble_encryption_block enc_block;



[mynewt-core] branch master updated: hw/mcu/dialog: SNC (#1868)

2019-06-19 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 af296c0  hw/mcu/dialog: SNC (#1868)
af296c0 is described below

commit af296c05b67a2fe77d8a8b0651dcfa6757c11185
Author: wes3 
AuthorDate: Wed Jun 19 16:55:39 2019 -0700

hw/mcu/dialog: SNC (#1868)

* hw/mcu/dialog: SNC

Sensor node controller API. This commit allows users to create
SNC programs using the macros in da1469x_snc.h and run them
either under software control or use the PDC to start them. Note
that PDC control of the SNC is not contained here; the PDC api
already contain all that is needed to have the PDC start the
SNC.

Added in this commit is a test program (hosted) that illustrates
how a program can be created and run under software control. The
code for the test program is in hw/mcu/dialong/da1469x/hosttest.
This directory is also intended for other host tests and not
just the SNC test.

* hw/mcu/dialog: SNC

This commit adds interrupt registering and handling code for the SNC. Adds 
additional test cases to test the interrupt handling API. Addressed PR review 
comments as well.

* hw/mcu/dialog/da1469x/hosttest: Add license file to syscfg.yml
---
 .../hosttest/include/da1469x_test/da1469x_test.h   |  43 ++
 hw/mcu/dialog/da1469x/hosttest/pkg.yml |  30 ++
 hw/mcu/dialog/da1469x/hosttest/src/da1469x_test.c  |  42 ++
 .../src/testcases/da1469x_snc_test_cases.c | 467 +++
 hw/mcu/dialog/da1469x/hosttest/syscfg.yml  |  26 ++
 hw/mcu/dialog/da1469x/include/mcu/da1469x_snc.h| 514 +
 hw/mcu/dialog/da1469x/src/da1469x_snc.c| 212 +
 7 files changed, 1334 insertions(+)

diff --git a/hw/mcu/dialog/da1469x/hosttest/include/da1469x_test/da1469x_test.h 
b/hw/mcu/dialog/da1469x/hosttest/include/da1469x_test/da1469x_test.h
new file mode 100644
index 000..a040641
--- /dev/null
+++ b/hw/mcu/dialog/da1469x/hosttest/include/da1469x_test/da1469x_test.h
@@ -0,0 +1,43 @@
+/*
+ * 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 _DA1469X_TEST_H
+#define _DA1469X_TEST_H
+
+#include 
+#include 
+#include 
+#include 
+#include "os/mynewt.h"
+#include "testutil/testutil.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+TEST_CASE_DECL(da1469x_snc_test_case_1);
+TEST_CASE_DECL(da1469x_snc_test_case_2);
+TEST_CASE_DECL(da1469x_snc_test_case_3);
+TEST_SUITE_DECL(da1469x_test_suite);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _DA1469X_TEST_H */
diff --git a/hw/mcu/dialog/da1469x/hosttest/pkg.yml 
b/hw/mcu/dialog/da1469x/hosttest/pkg.yml
new file mode 100644
index 000..c10f645
--- /dev/null
+++ b/hw/mcu/dialog/da1469x/hosttest/pkg.yml
@@ -0,0 +1,30 @@
+# 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: hw/mcu/dialog/da1469x/hosttest
+pkg.type: lib
+pkg.description: "Hosted da1469x unit tests."
+pkg.author: "Apache Mynewt "
+pkg.homepage: "http://mynewt.apache.org/;
+pkg.keywords:
+
+pkg.deps: 
+- "@apache-mynewt-core/test/testutil"
+- "@apache-mynewt-core/hw/mcu/dialog"
+
+pkg.init:
+da1469x_hosttest_init: 'MYNEWT_VAL(DA1469x_HOSTTEST_SYSINIT_STAGE)'
diff

[mynewt-core] branch master updated: [Feature]: Main Task OS Sanity Check (#1838)

2019-05-31 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 02ff200  [Feature]: Main Task OS Sanity Check (#1838)
02ff200 is described below

commit 02ff200534f54a42cbf91b091543dedfe28671dd
Author: brolan-juul <33846322+brolan-j...@users.noreply.github.com>
AuthorDate: Fri May 31 11:22:40 2019 -0700

[Feature]: Main Task OS Sanity Check (#1838)

* Adding os_sanity check to main_task.

* Fixed stylistic issue.
---
 kernel/os/src/os.c   | 18 +-
 kernel/os/syscfg.yml |  5 +
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/kernel/os/src/os.c b/kernel/os/src/os.c
index 5cc9fa4..6ccd95b 100644
--- a/kernel/os/src/os.c
+++ b/kernel/os/src/os.c
@@ -45,8 +45,14 @@ OS_TASK_STACK_DEFINE(g_idle_task_stack, OS_IDLE_STACK_SIZE);
 
 uint32_t g_os_idle_ctr;
 
-static struct os_task os_main_task;
-OS_TASK_STACK_DEFINE(os_main_stack, OS_MAIN_STACK_SIZE);
+struct os_task g_os_main_task;
+OS_TASK_STACK_DEFINE(g_os_main_stack, OS_MAIN_STACK_SIZE);
+
+/*
+ * Double the interval timer to allow proper timer check-in.
+ */
+#define OS_MAIN_TASK_TIMER_TICKS \
+os_time_ms_to_ticks32(MYNEWT_VAL(OS_MAIN_TASK_SANITY_ITVL_MS)) * 2
 
 #if MYNEWT_VAL(OS_WATCHDOG_MONITOR)
 
@@ -227,11 +233,13 @@ os_init(int (*main_fn)(int argc, char **arg))
 assert(err == OS_OK);
 
 if (main_fn) {
-err = os_task_init(_main_task, "main", os_main, main_fn,
-   OS_MAIN_TASK_PRIO, OS_WAIT_FOREVER, os_main_stack,
-   OS_STACK_ALIGN(OS_MAIN_STACK_SIZE));
+err = os_task_init(_os_main_task, "main", os_main, main_fn,
+   OS_MAIN_TASK_PRIO,
+   (OS_MAIN_TASK_TIMER_TICKS == 0) ? OS_WAIT_FOREVER : 
OS_MAIN_TASK_TIMER_TICKS,
+   g_os_main_stack, OS_STACK_ALIGN(OS_MAIN_STACK_SIZE));
 assert(err == 0);
 }
+
 /* Call bsp related OS initializations */
 hal_bsp_init();
 
diff --git a/kernel/os/syscfg.yml b/kernel/os/syscfg.yml
index d9cc89e..746acb0 100644
--- a/kernel/os/syscfg.yml
+++ b/kernel/os/syscfg.yml
@@ -175,6 +175,11 @@ syscfg.defs:
 description: >
 If set, assert callback gets called inside __assert_func()
 value: 0
+OS_MAIN_TASK_SANITY_ITVL_MS:
+description: >
+Interval for sanity check on main task. Setting a 0 will disable
+sanity check on main task. Value is in milliseconds.
+value: 0
 
 syscfg.vals.OS_DEBUG_MODE:
 OS_CRASH_STACKTRACE: 1



[mynewt-core] branch master updated: hw/mcu/nordic: Initialize SCK for SPI in config API (#1823)

2019-05-20 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 89a39f8  hw/mcu/nordic: Initialize SCK for SPI in config API (#1823)
89a39f8 is described below

commit 89a39f82f47a4d5616c2d6b7d670738b55265df0
Author: wes3 
AuthorDate: Mon May 20 09:41:58 2019 -0700

hw/mcu/nordic: Initialize SCK for SPI in config API (#1823)

This commit moves the initialization of the SCK gpio to 
hal_config_spi_master.
This initialization was done in hal_spi_init_master previously. The reason
for moving this is the data mode in the structure does not get set prior to
calling the init function. This could cause the GPIO to be configured in
an incorrect manner. Note that the nordic specification makes specific 
mention
regarding how SPI GPIO should be configured prior to enabling the SPI 
master.
In this case, SCK should be an output with state set same as CONFIG.CPOL
---
 hw/mcu/nordic/nrf52xxx/src/hal_spi.c | 34 ++
 1 file changed, 22 insertions(+), 12 deletions(-)

diff --git a/hw/mcu/nordic/nrf52xxx/src/hal_spi.c 
b/hw/mcu/nordic/nrf52xxx/src/hal_spi.c
index da6c6e9..3146f0b 100644
--- a/hw/mcu/nordic/nrf52xxx/src/hal_spi.c
+++ b/hw/mcu/nordic/nrf52xxx/src/hal_spi.c
@@ -302,10 +302,32 @@ hal_spi_config_master(struct nrf52_hal_spi *spi,
 uint32_t nrf_config;
 uint32_t frequency;
 NRF_SPIM_Type *spim;
+NRF_GPIO_Type *port;
+uint32_t pin;
 
 spim = spi->nhs_spi.spim;
 memcpy(>spi_cfg, settings, sizeof(*settings));
 
+/*
+ * Configure SCK. NOTE: this is done here in the config API as the data
+ * mode is not set at init time so we do it here when we configure the SPI.
+ */
+pin = spim->PSEL.SCK & SPIM_PSEL_SCK_PIN_Msk;
+port = NRF_P0;
+#ifdef NRF52840_XXAA
+if (spim->PSEL.SCK & SPIM_PSEL_SCK_PORT_Msk) {
+port = NRF_P1;
+}
+#endif
+if (settings->data_mode <= HAL_SPI_MODE1) {
+port->OUTCLR = (1UL << pin);
+} else {
+port->OUTSET = (1UL << pin);
+}
+port->PIN_CNF[pin] =
+(GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos) |
+(GPIO_PIN_CNF_INPUT_Disconnect << GPIO_PIN_CNF_INPUT_Pos);
+
 /* Only 8-bit word sizes supported. */
 rc = 0;
 switch (settings->word_size) {
@@ -447,18 +469,6 @@ hal_spi_init_master(struct nrf52_hal_spi *spi,
 NRF_GPIO_Type *port;
 uint32_t pin;
 
-/* Configure SCK */
-port = HAL_GPIO_PORT(cfg->sck_pin);
-pin = HAL_GPIO_INDEX(cfg->sck_pin);
-if (spi->spi_cfg.data_mode <= HAL_SPI_MODE1) {
-port->OUTCLR = (1UL << pin);
-} else {
-port->OUTSET = (1UL << pin);
-}
-port->PIN_CNF[pin] =
-(GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos) |
-(GPIO_PIN_CNF_INPUT_Disconnect << GPIO_PIN_CNF_INPUT_Pos);
-
 /*  Configure MOSI */
 port = HAL_GPIO_PORT(cfg->mosi_pin);
 pin = HAL_GPIO_INDEX(cfg->mosi_pin);



[mynewt-core] branch master updated: Implement low-power support in the LoRa stack (#1670)

2019-05-13 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 ee51a8c  Implement low-power support in the LoRa stack (#1670)
ee51a8c is described below

commit ee51a8cf8d099a2641e971a17776af90c78e6287
Author: amrbekhit 
AuthorDate: Tue May 14 07:03:36 2019 +0300

Implement low-power support in the LoRa stack (#1670)

* Implement low-power support in the LoRa stack and modify the nRF timer 
code to use the HFXO manager.

Use of timers in the LoRa stack has been split into critical and 
non-critial timers. Non-critical timers (such as retry delays) are now 
implemented using the os_cputime functions. The
os_cputime needs to be configured to use a lower power time in the BSP 
(such as is done by the BLE stack via the BLE_LP_CLOCK syscfg). Critical timers 
are only used to time the opening of
the RX windows. These continue to use the hal_timer functions, but require 
that the user implements two callback functions (lora_low_power_enter and 
lora_low_power_exit) to turn the
LORA_MAC_TIMER off and on. This is necessary as turning a timer on is a 
hardware-specific operation that may require that the caller pass in a custom 
configuration struct.

This patch also modifies the nRF timer code to use the HFXO manager found 
in hw/mcu/nordic/nrf52xxx/src/nrf5x_clock.c. This allows multiple different 
timers to be turned on and off
independently and manager will automatically turn the nRF HFXO on and off 
as required. This is necessary in order for the LoRa and BLE stacks to be able 
to run side by side.

* Correct HFXO manager header files.

* Correct calls to to HFXO manager.

* Correct HFXO manager header.

* Make SX1272 DIO3 IRQ optional.

The SX1272 DIO3 IRQ is used during Carrier Detect (CAD). This is neither 
necessary for LoRa operation, nor used in the current driver. Therefore, by 
making this pin optional, an extra GPIO/IRQ can be freed for other tasks.

* -Fixed a bug when calculating the delays for the TX retry timer 
(https://github.com/apache/mynewt-core/pull/1670#discussion_r266275964).
-Resolved minor formatting issues.

* -Reverted the HFXO changes in the hal_system and hal_timer files. These 
will be added to a separate pull request.

* -Modified the low power callbacks so that there is only one rather than 
two: lora_bsp_enable_mac_timer. This is because the hal_timer functions already 
allow application code to disable timers in a hardware-agnostic fashion using
the hal_timer_deinit function. The LoRa code now turns the timer off 
itself, but requires the BSP to implement lora_bsp_enable_mac_timer in order to 
turn the timer on.

* -Modified the b-l072z-lrwan1 and telee02 BSPs to implement the 
lora_bsp_enable_mac_timer function in order to allow CI to pass.
---
 hw/bsp/b-l072z-lrwan1/src/hal_bsp.c  | 19 
 hw/bsp/telee02/src/hal_bsp.c |  9 
 hw/drivers/lora/include/lora/utilities.h |  8 ---
 hw/drivers/lora/src/utilities.c  | 16 ++
 hw/drivers/lora/sx1272/src/sx1272.c  | 84 
 hw/drivers/lora/sx1276/src/sx1276.c  | 74 +---
 net/lora/node/include/node/lora.h|  1 -
 net/lora/node/include/node/lora_priv.h   |  8 +++
 net/lora/node/include/node/utilities.h   |  8 ---
 net/lora/node/src/lora_cli.c | 12 +
 net/lora/node/src/lora_node.c| 28 ++-
 net/lora/node/src/mac/LoRaMac.c  | 56 +
 net/lora/node/src/utilities.c|  6 ---
 net/lora/node/syscfg.yml |  5 ++
 14 files changed, 196 insertions(+), 138 deletions(-)

diff --git a/hw/bsp/b-l072z-lrwan1/src/hal_bsp.c 
b/hw/bsp/b-l072z-lrwan1/src/hal_bsp.c
index a352ae3..46a5281 100644
--- a/hw/bsp/b-l072z-lrwan1/src/hal_bsp.c
+++ b/hw/bsp/b-l072z-lrwan1/src/hal_bsp.c
@@ -175,3 +175,22 @@ hal_bsp_get_nvic_priority(int irq_num, uint32_t pri)
 /* Add any interrupt priorities configured by the bsp here */
 return pri;
 }
+
+#if MYNEWT_VAL(LORA_NODE)
+void lora_bsp_enable_mac_timer(void)
+{
+/* Turn on the LoRa MAC timer. This function is automatically
+ * called by the LoRa stack when exiting low power mode.*/
+#if MYNEWT_VAL(LORA_MAC_TIMER_NUM) == 0
+#define TIMER_INIT  TIM2
+#elif MYNEWT_VAL(LORA_MAC_TIMER_NUM) == 1
+#define TIMER_INIT  TIM3
+#elif MYNEWT_VAL(LORA_MAC_TIMER_NUM) == 2
+#define TIMER_INIT  TIM21
+#else
+#error "Invalid LORA_MAC_TIMER_NUM"
+#endif
+
+hal_timer_init(MYNEWT_VAL(LORA_MAC_TIMER_NUM), TIMER_INIT);
+}
+#endif
diff --git a/hw/bsp/telee02/src/hal_bsp.c b/hw/bsp/telee02/src/hal_bsp.c
index 464d2a4..abaf113 100644
--- a/hw/bsp/telee02/src/hal_bsp.c
++

[mynewt-core] branch master updated: sys/log: Add setting for maximum log entry size when writing. (#1782)

2019-04-26 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 59e54ad  sys/log: Add setting for maximum log entry size when writing. 
(#1782)
59e54ad is described below

commit 59e54ad46417ae57c5fd436d5fd1882b2b5e7978
Author: wes3 
AuthorDate: Fri Apr 26 12:36:42 2019 -0700

sys/log: Add setting for maximum log entry size when writing. (#1782)

* sys/log: Add setting for maximum log entry size when writing.

This commit adds the ability to set a maximum log entry for a given log. By 
default, the log maximum entry length is set to 0. A value of 0 for this field 
means that no check should be made for maximum log entry length. If set to a 
non-zero value, the log write routine will check the log body length (does nt 
include the size of the log entry header) and if it exceeds the maximum, 
OS_ENOMEM will be returned and the too_long log stat will be incremented. A new 
API was added named log_se [...]

* sys/log: Add setting for maximum log entry size when writing.

Address review comment (inconsistent error checking of 
log_chk_max_entry_len return code).
---
 sys/log/full/include/log/log.h | 13 ++
 sys/log/full/src/log.c | 59 ++
 sys/log/stub/include/log/log.h | 15 +++
 3 files changed, 87 insertions(+)

diff --git a/sys/log/full/include/log/log.h b/sys/log/full/include/log/log.h
index f1162b4..ca34162 100644
--- a/sys/log/full/include/log/log.h
+++ b/sys/log/full/include/log/log.h
@@ -180,6 +180,7 @@ STATS_SECT_START(logs)
 STATS_SECT_ENTRY(drops)
 STATS_SECT_ENTRY(errs)
 STATS_SECT_ENTRY(lost)
+STATS_SECT_ENTRY(too_long)
 STATS_SECT_END
 
 #define LOG_STATS_INC(log, name)STATS_INC(log->l_stats, name)
@@ -196,6 +197,7 @@ struct log {
 STAILQ_ENTRY(log) l_next;
 log_append_cb *l_append_cb;
 uint8_t l_level;
+uint16_t l_max_entry_len;   /* Log body length; if 0 disables check. */
 #if MYNEWT_VAL(LOG_STATS)
 STATS_SECT_DECL(logs) l_stats;
 #endif
@@ -626,6 +628,17 @@ void log_set_level(struct log *log, uint8_t level);
  */
 uint8_t log_get_level(const struct log *log);
 
+/**
+ * @brief Set maximum length of an entry in the log. If set to
+ *0, no check will be made for maximum write length.
+ *Note that this is maximum log body length; the log
+ *entry header is not included in the check.
+ *
+ * @param log   Log to set max entry length
+ * @param level New max entry length
+ */
+void log_set_max_entry_len(struct log *log, uint16_t max_entry_len);
+
 #if MYNEWT_VAL(LOG_STORAGE_INFO)
 /**
  * Return information about log storage
diff --git a/sys/log/full/src/log.c b/sys/log/full/src/log.c
index 8dd58d6..d3773c6 100644
--- a/sys/log/full/src/log.c
+++ b/sys/log/full/src/log.c
@@ -69,6 +69,7 @@ STATS_NAME_START(logs)
   STATS_NAME(logs, drops)
   STATS_NAME(logs, errs)
   STATS_NAME(logs, lost)
+  STATS_NAME(logs, too_long)
 STATS_NAME_END(logs)
 #endif
 
@@ -345,6 +346,7 @@ log_register(char *name, struct log *log, const struct 
log_handler *lh,
 log->l_arg = arg;
 log->l_level = level;
 log->l_append_cb = NULL;
+log->l_max_entry_len = 0;
 
 if (!log_registered(log)) {
 STAILQ_INSERT_TAIL(_log_list, log, l_next);
@@ -408,6 +410,22 @@ log_chk_type(uint8_t etype)
 }
 
 static int
+log_chk_max_entry_len(struct log *log, uint16_t len)
+{
+int rc;
+
+rc = OS_OK;
+if (log->l_max_entry_len != 0) {
+if (len > log->l_max_entry_len) {
+LOG_STATS_INC(log, too_long);
+rc = OS_ENOMEM;
+}
+}
+
+return rc;
+}
+
+static int
 log_append_prepare(struct log *log, uint8_t module, uint8_t level,
uint8_t etype, struct log_entry_hdr *ue)
 {
@@ -501,6 +519,11 @@ log_append_typed(struct log *log, uint8_t module, uint8_t 
level, uint8_t etype,
 
 LOG_STATS_INC(log, writes);
 
+rc = log_chk_max_entry_len(log, len);
+if (rc != OS_OK) {
+goto err;
+}
+
 hdr = (struct log_entry_hdr *)data;
 rc = log_append_prepare(log, module, level, etype, hdr);
 if (rc != 0) {
@@ -529,6 +552,12 @@ log_append_body(struct log *log, uint8_t module, uint8_t 
level, uint8_t etype,
 int rc;
 
 LOG_STATS_INC(log, writes);
+
+rc = log_chk_max_entry_len(log, body_len);
+if (rc != OS_OK) {
+return rc;
+}
+
 rc = log_append_prepare(log, module, level, etype, );
 if (rc != 0) {
 LOG_STATS_INC(log, drops);
@@ -552,6 +581,7 @@ log_append_mbuf_typed_no_free(struct log *log, uint8_t 
module, uint8_t level,
 {
 struct log_entry_hdr *hdr;
 struct os_mbuf *om;
+uint16_t len;
 int rc;
 
 /* Remove a loyer of indirection for convenien

[mynewt-core] branch master updated: sys/log/full: Allow for limiting size of newtmgr log response (#1778)

2019-04-23 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 466b10c  sys/log/full: Allow for limiting size of newtmgr log response 
(#1778)
466b10c is described below

commit 466b10c5ee5b7dc57a227f674c2eef14a468796c
Author: wes3 
AuthorDate: Tue Apr 23 12:50:39 2019 -0700

sys/log/full: Allow for limiting size of newtmgr log response (#1778)

* sys/log/full: Allow for limiting size of newtmgr log response

Add a syscfg value (LOG_NMGR_MAX_RSP_LEN) which will limit the size of a 
newtmgr log response. If the response exceeds this limit and there is only one 
entry in the response the entry type is set to string and the message "error: 
entry too large (xxx bytes)" is encoded as in the message portion of the 
response. If the response contains multiple entries the code is unchanged (the 
additional entry is not added and the encode function returns OS_ENOMEM).

Note that the previous code had a hard-coded limit of 400 bytes for a 
newtmgr log response but this was not applied to a response with a single log 
entry in it. This fix applies the same limit to a response with one or more 
entries in it.

* sys/log/full: Allow for limiting size of newtmgr log response

Address review comments. Fix set but not used variable for LOG_VERSION <= 2 
and remove un-needed code.

* sys/log/full: Allow for limiting size of newtmgr log response

Fix unused variable warning for LOG_VERSION <= 2.
---
 sys/log/full/src/log_nmgr.c | 76 +++--
 sys/log/full/syscfg.yml | 16 +-
 2 files changed, 75 insertions(+), 17 deletions(-)

diff --git a/sys/log/full/src/log_nmgr.c b/sys/log/full/src/log_nmgr.c
index 647c772..ba1f334 100644
--- a/sys/log/full/src/log_nmgr.c
+++ b/sys/log/full/src/log_nmgr.c
@@ -79,6 +79,7 @@ log_nmgr_encode_entry(struct log *log, struct log_offset 
*log_offset,
 uint8_t data[128];
 int rc;
 int rsp_len;
+bool too_long;
 CborError g_err = CborNoError;
 struct log_encode_data *ed = log_offset->lo_arg;
 CborEncoder rsp;
@@ -87,6 +88,7 @@ log_nmgr_encode_entry(struct log *log, struct log_offset 
*log_offset,
 #if MYNEWT_VAL(LOG_VERSION) > 2
 CborEncoder str_encoder;
 int off;
+uint8_t etype;
 #endif
 rc = OS_OK;
 
@@ -146,6 +148,12 @@ log_nmgr_encode_entry(struct log *log, struct log_offset 
*log_offset,
 return MGMT_ERR_ECORRUPT;
 }
 
+/*
+ * Copy the type from the header type. This may get changed to type
+ * string if a single entry is too long.
+ */
+etype = ueh->ue_etype;
+
 g_err |= cbor_encode_text_stringz(, "msg");
 
 /*
@@ -179,20 +187,41 @@ log_nmgr_encode_entry(struct log *log, struct log_offset 
*log_offset,
 g_err |= cbor_encode_uint(,  ueh->ue_module);
 g_err |= cbor_encoder_close_container(_encoder, );
 rsp_len += cbor_encode_bytes_written(_encoder);
+
 /*
- * Make sure that at least single entry is returned, even in case response
- * exceeds this magic value. This is to make sure we can read long log
- * entries, even if they have to be read one by one.
+ * Check if the response is too long. If more than one entry is in the
+ * response we will not add the current one and will return ENOMEM. If this
+ * is just a single entry we add the generic too long message text.
  */
-if ((rsp_len > 400) && (ed->counter > 0)) {
-rc = OS_ENOMEM;
-goto err;
+too_long = false;
+if (rsp_len > MYNEWT_VAL(LOG_NMGR_MAX_RSP_LEN)) {
+/*
+ * Is this just a single entry? If so, encode the generic error
+ * message in the "msg" field of the response
+ */
+if (ed->counter == 0) {
+#if MYNEWT_VAL(LOG_VERSION) > 2
+etype = LOG_ETYPE_STRING;
+#endif
+too_long = true;
+} else {
+rc = OS_ENOMEM;
+goto err;
+}
 }
+
+/*
+ * If a single entry is too long the response length (rsp_len) is not
+ * correct. However, this is not an issue since we only use lo_data_len
+ * when encoding multiple entries. Therefore, there is no need to try
+ * and do a dummy encoding with the generic too long entry message simply
+ * to calculate a response size that will not be used.
+ */
 log_offset->lo_data_len = rsp_len;
 
 g_err |= cbor_encoder_create_map(ed->enc, , CborIndefiniteLength);
 #if MYNEWT_VAL(LOG_VERSION) > 2
-switch (ueh->ue_etype) {
+switch (etype) {
 case LOG_ETYPE_CBOR:
 g_err |= cbor_encode_text_stringz(, "type");
 g_err |= cbor_encode_text_stringz(, "cbor");
@@ -220,18 +249,27 @@ 

[mynewt-nimble] branch master updated: fix crash caused by OS_ENTER_CRITICAL, OS_EXIT_CRITICAL placement

2019-04-22 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 b9c400d  fix crash caused by OS_ENTER_CRITICAL, OS_EXIT_CRITICAL 
placement
 new 6104f25  Merge pull request #426 from JustineKH/fix/ble_ll_dtm_rx_start
b9c400d is described below

commit b9c400d849db02b6f22df41c7a43deda1105a6b8
Author: JustineKH 
AuthorDate: Fri Apr 19 17:25:24 2019 -0700

fix crash caused by OS_ENTER_CRITICAL, OS_EXIT_CRITICAL placement
---
 nimble/controller/src/ble_ll_dtm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/nimble/controller/src/ble_ll_dtm.c 
b/nimble/controller/src/ble_ll_dtm.c
index 253a7e2..70ea4fc 100644
--- a/nimble/controller/src/ble_ll_dtm.c
+++ b/nimble/controller/src/ble_ll_dtm.c
@@ -383,11 +383,11 @@ ble_ll_dtm_rx_start(void)
 ble_ll_state_set(BLE_LL_STATE_DTM);
 
 #ifdef BLE_XCVR_RFCLK
+OS_ENTER_CRITICAL(sr);
 if (ble_ll_xcvr_rfclk_state() == BLE_RFCLK_STATE_OFF) {
-OS_ENTER_CRITICAL(sr);
 ble_ll_xcvr_rfclk_start_now(os_cputime_get32());
-OS_EXIT_CRITICAL(sr);
 }
+OS_EXIT_CRITICAL(sr);
 #endif
 
 return 0;



[mynewt-core] branch master updated (0912330 -> de05960)

2019-04-15 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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


from 0912330  boot: Init watchdog
 new a4313a8  Obtaining more information on reasons why it is resetting. 
Adding wake up from system off.
 new 40b124e  Fixed spacing after if statement.
 new 0bc5885  Updated nrf51 to have the same reset cause as nrf52.
 new de05960  Merge pull request #1762 from 
JuulLabs/feature/nrf51_additional_info

The 8814 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/mcu/nordic/nrf51xxx/src/hal_reset_cause.c | 2 ++
 1 file changed, 2 insertions(+)



[mynewt-core] branch master updated (b022c78 -> 280bf99)

2019-04-11 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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


from b022c78  moved away from deprecated XTAL_32768
 new f53f8cd  LED_2 is used by the blemesh example application (and 
possibly others). Unfortunately there is only 1 LED that can be controlled by a 
GPIO on the DA1469x development kit boards (daughter plus motherboard). 
Therefore LED_2 is defined to to use the same GPIO as LED_1, which will be ok 
as long as they are not both used by the same application...
 new 30dfe9c  LED_2 defined to use a GPIO not used on either the DA1469x 
mother or daugther board, but one that is brought out to an expansion header 
allowing an external LED to be easily connected.
 new 280bf99  Merge pull request #1750 from iandmorris/ian-dev1

The 8777 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/dialog_da1469x-dk-pro/include/bsp/bsp.h | 1 +
 1 file changed, 1 insertion(+)



[mynewt-core] branch master updated: kernel/os: MSYS memory pool not in mempool list

2019-03-25 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 284ed41  kernel/os: MSYS memory pool not in mempool list
 new 9b5fbe5  Merge pull request #1724 from wes3/msys_in_mempool_list
284ed41 is described below

commit 284ed4113558f84fc73ddb444f79e926db47705e
Author: Will San Filippo 
AuthorDate: Mon Mar 25 18:15:39 2019 -0700

kernel/os: MSYS memory pool not in mempool list

Change the order of os_msys_init() and os_mempool_module_init() so that 
memory pools allocated by msys show up in the mempool list.
---
 kernel/os/src/os.c | 2 +-
 kernel/os/src/os_mempool.c | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/kernel/os/src/os.c b/kernel/os/src/os.c
index a4b4de8..5cc9fa4 100644
--- a/kernel/os/src/os.c
+++ b/kernel/os/src/os.c
@@ -286,8 +286,8 @@ os_pkg_init(void)
 err = os_dev_initialize_all(OS_DEV_INIT_KERNEL);
 assert(err == OS_OK);
 
-os_msys_init();
 os_mempool_module_init();
+os_msys_init();
 }
 
 /**
diff --git a/kernel/os/src/os_mempool.c b/kernel/os/src/os_mempool.c
index 60c6799..0b70208 100644
--- a/kernel/os/src/os_mempool.c
+++ b/kernel/os/src/os_mempool.c
@@ -36,8 +36,7 @@
 #define OS_MEMPOOL_TRUE_BLOCK_SIZE(mp) 
OS_MEM_TRUE_BLOCK_SIZE(mp->mp_block_size)
 #endif
 
-STAILQ_HEAD(, os_mempool) g_os_mempool_list =
-STAILQ_HEAD_INITIALIZER(g_os_mempool_list);
+STAILQ_HEAD(, os_mempool) g_os_mempool_list;
 
 #if MYNEWT_VAL(OS_MEMPOOL_POISON)
 static uint32_t os_mem_poison = 0xde7ec7ed;



[mynewt-core] branch master updated: hw/mcu/nordic/nrf52xxx: Do not use END_START shortcut for SPIM

2019-03-05 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 7c77377  hw/mcu/nordic/nrf52xxx: Do not use END_START shortcut for SPIM
 new 285d414  Merge pull request #1672 from wes3/nrf52_spim_no_shortcuts
7c77377 is described below

commit 7c77377ec91bf9bbd1a7d3cf5abf78b2b5bd6df0
Author: William San Filippo 
AuthorDate: Sat Mar 2 16:40:02 2019 -0800

hw/mcu/nordic/nrf52xxx: Do not use END_START shortcut for SPIM

Revert change that used END_START shortcut and EVENTS_STARTED
interrupt for SPIM interface. The reason behind reverting back
to the previous method is if interrupts are disabled/delayed too
long it is possible to transmit unexpected bytes on the SPI
interface. This method adds latency but insures a valid transfer.
See issue #1667.
---
 hw/mcu/nordic/nrf52xxx/src/hal_spi.c | 80 +---
 1 file changed, 28 insertions(+), 52 deletions(-)

diff --git a/hw/mcu/nordic/nrf52xxx/src/hal_spi.c 
b/hw/mcu/nordic/nrf52xxx/src/hal_spi.c
index a203b84..c0fd2d2 100644
--- a/hw/mcu/nordic/nrf52xxx/src/hal_spi.c
+++ b/hw/mcu/nordic/nrf52xxx/src/hal_spi.c
@@ -70,6 +70,8 @@ struct nrf52_hal_spi
 uint8_t spi_xfr_flag;   /* Master only */
 uint8_t dummy_rx;   /* Master only */
 uint8_t slave_state;/* Slave only */
+uint16_t nhs_buflen;
+uint16_t nhs_bytes_txd;
 struct hal_spi_settings spi_cfg; /* Slave and master */
 
 /* Pointer to HW registers */
@@ -81,10 +83,9 @@ struct nrf52_hal_spi
 /* IRQ number */
 IRQn_Type irq_num;
 
-uint8_t *nhs_txbuf; /* Pointer to TX buffer */
-uint8_t *nhs_rxbuf; /* Pointer to RX buffer */
-uint16_t nhs_buflen;/* Length of buffer */
-uint16_t nhs_bytes_txq; /* Number of bytes queued for TX */
+/* Pointers to tx/rx buffers */
+uint8_t *nhs_txbuf;
+uint8_t *nhs_rxbuf;
 
 /* Callback and arguments */
 hal_spi_txrx_cb txrx_cb_func;
@@ -136,59 +137,41 @@ nrf52_irqm_handler(struct nrf52_hal_spi *spi)
 {
 NRF_SPIM_Type *spim;
 uint16_t xfr_bytes;
-uint16_t next_len;
+uint16_t len;
 
 spim = spi->nhs_spi.spim;
+if (spim->EVENTS_END) {
+spim->EVENTS_END = 0;
 
-/* Should not occur but if no transfer just leave  */
-if (spi->spi_xfr_flag == 0) {
-return;
-}
-
-if ((spim->EVENTS_STARTED) && (spim->INTENSET & 
SPIM_INTENSET_STARTED_Msk)) {
-spim->EVENTS_STARTED = 0;
-
-xfr_bytes = spim->TXD.MAXCNT;
-spi->nhs_bytes_txq += xfr_bytes;
+/* Should not occur but if no transfer just leave  */
+if (spi->spi_xfr_flag == 0) {
+return;
+}
 
-if (spi->nhs_bytes_txq < spi->nhs_buflen) {
+/* Are there more bytes to send? */
+xfr_bytes = spim->TXD.AMOUNT;
+spi->nhs_bytes_txd += xfr_bytes;
+if (spi->nhs_bytes_txd < spi->nhs_buflen) {
 spi->nhs_txbuf += xfr_bytes;
-
-next_len = min(SPIM_TXD_MAXCNT_MAX,
-   spi->nhs_buflen - spi->nhs_bytes_txq);
-
+len = spi->nhs_buflen - spi->nhs_bytes_txd;
+len = min(SPIM_TXD_MAXCNT_MAX, len);
 spim->TXD.PTR = (uint32_t)spi->nhs_txbuf;
-spim->TXD.MAXCNT = next_len;
+spim->TXD.MAXCNT = (uint8_t)len;
 
-/* If no RX buffer was provided, we already set it to dummy one */
+/* If no rxbuf, we need to set rxbuf and maxcnt to 1 */
 if (spi->nhs_rxbuf) {
 spi->nhs_rxbuf += xfr_bytes;
-spim->RXD.PTR = (uint32_t)spi->nhs_rxbuf;
-spim->RXD.MAXCNT = next_len;
+spim->RXD.PTR= (uint32_t)spi->nhs_rxbuf;
+spim->RXD.MAXCNT = (uint8_t)len;
 }
-
-spim->SHORTS |= SPIM_SHORTS_END_START_Msk;
-spim->INTENSET = SPIM_INTENSET_STARTED_Msk;
-spim->INTENCLR = SPIM_INTENSET_END_Msk;
+spim->TASKS_START = 1;
 } else {
-spim->SHORTS &= ~SPIM_SHORTS_END_START_Msk;
-spim->INTENSET = SPIM_INTENSET_END_Msk;
-spim->INTENCLR = SPIM_INTENSET_STARTED_Msk;
-}
-}
-
-if (spim->EVENTS_END) {
-spim->EVENTS_END = 0;
-
-if (spim->INTENSET & SPIM_INTENSET_END_Msk) {
 if (spi->txrx_cb_func) {
 spi->txrx_cb_func(spi->txrx_cb_arg, spi->nhs_buflen);
-}
 
+}
 spi->spi_xfr_flag = 0;
-
-spim->SHORTS &= ~SPIM_SHORTS_END_START_Msk;
-spim->INTENCLR = SPIM_INTENSET_STARTED_Msk | SPIM_INTENSET_END_Ms

[mynewt-core] branch master updated: hw/mcu/nordic/nrf52xxx: Fix possible SPI lockup

2019-03-01 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

wes3 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 64470d8  hw/mcu/nordic/nrf52xxx: Fix possible SPI lockup
 new 0a8b781  Merge pull request #1669 from wes3/nrf52_hal_spim_lockup_fix
64470d8 is described below

commit 64470d8abcd8778e92c2f898b0fbc270c199e20f
Author: Will San Filippo 
AuthorDate: Thu Feb 28 22:00:25 2019 -0800

hw/mcu/nordic/nrf52xxx: Fix possible SPI lockup

When switching between the blocking and non-blocking interfaces
it is possible to lockup the SPI in hal_spi_stop_transfer() if
the SPI master is enabled but no transfer started as setting
TASKS_STOP will not always generate an EVENTS_STOPPED. Calling
hal_spi_disable() will check to see if the xfr_flag is set before
calling hal_spi_stop_transfer().
---
 hw/mcu/nordic/nrf52xxx/src/hal_spi.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/hw/mcu/nordic/nrf52xxx/src/hal_spi.c 
b/hw/mcu/nordic/nrf52xxx/src/hal_spi.c
index 4a2c5b5..a203b84 100644
--- a/hw/mcu/nordic/nrf52xxx/src/hal_spi.c
+++ b/hw/mcu/nordic/nrf52xxx/src/hal_spi.c
@@ -941,9 +941,7 @@ hal_spi_txrx(int spi_num, void *txbuf, void *rxbuf, int len)
 spim = hal_spi->nhs_spi.spim;
 enabled = spim->ENABLE;
 if (enabled == SPIM_ENABLE_ENABLE_Enabled) {
-spim->INTENCLR = NRF_SPI_IRQ_DISABLE_ALL;
-hal_spi_stop_transfer(spim);
-spim->ENABLE = 0;
+hal_spi_disable(spi_num);
 enabled = 0;
 }
 



[mynewt-core] branch master updated (56b7eba -> 74996e6)

2019-02-14 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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


from 56b7eba  kernel/os: Track most recent event in debug builds
 new 6a4a9b6  Added shutdown command to the timer to achieve low power mode.
 new 0cd6924  Using SHUTDOWN only, as it is cleaner and more concise. Clear 
timers before starting them up again.
 new 8aaa589  Clearing RTC timer for consistency in function with HW timers.
 new 74996e6  Merge pull request #1645 from JuulLabs/timer_shutdown

The 8538 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/mcu/nordic/nrf52xxx/src/hal_timer.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)



[mynewt-core] branch FWBB_644_MB_psense_not_present deleted (was 848dbe1)

2019-01-28 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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


 was 848dbe1  FWBB-644: MB psense not present

This change permanently discards the following revisions:

 discard 848dbe1  FWBB-644: MB psense not present



[mynewt-nimble] branch master updated (c2b2eeb -> dc97268)

2018-12-03 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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


from c2b2eeb  Merge pull request #255 from wes3/slave_conn_upd_fix
 add 7467821  net/nimble/drivers: Fix compile error if BLE_XTAL_SETTLE_TIME 
= 0
 new dc97268  Merge pull request #257 from wes3/hfxo_settle_time_zero_fix

The 1 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/nrf51/src/ble_phy.c | 2 --
 nimble/drivers/nrf52/src/ble_phy.c | 3 +--
 2 files changed, 1 insertion(+), 4 deletions(-)



[mynewt-nimble] 01/01: Merge pull request #257 from wes3/hfxo_settle_time_zero_fix

2018-12-03 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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

commit dc9726835151912a5d2eac998af19083b4c1582d
Merge: c2b2eeb 7467821
Author: wes3 
AuthorDate: Mon Dec 3 13:24:39 2018 -0800

Merge pull request #257 from wes3/hfxo_settle_time_zero_fix

net/nimble/drivers: Fix compile error if BLE_XTAL_SETTLE_TIME = 0

 nimble/drivers/nrf51/src/ble_phy.c | 2 --
 nimble/drivers/nrf52/src/ble_phy.c | 3 +--
 2 files changed, 1 insertion(+), 4 deletions(-)



[mynewt-nimble] branch master updated (c9fa044 -> c2b2eeb)

2018-12-03 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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


from c9fa044  BLE_MESH_SYSINIT_STAGE_2 --> BLE_MESH_SYSINIT_STAGE_SHELL
 add 111b86f  net/nimble/controller Slave connection update fix
 new c2b2eeb  Merge pull request #255 from wes3/slave_conn_upd_fix

The 1 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/controller/src/ble_ll_ctrl.c | 23 +++
 1 file changed, 19 insertions(+), 4 deletions(-)



[mynewt-nimble] 01/01: Merge pull request #255 from wes3/slave_conn_upd_fix

2018-12-03 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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

commit c2b2eebea0662797c79f17278a4c269cc958e174
Merge: c9fa044 111b86f
Author: wes3 
AuthorDate: Mon Dec 3 10:35:13 2018 -0800

Merge pull request #255 from wes3/slave_conn_upd_fix

net/nimble/controller: Slave connection update fix

 nimble/controller/src/ble_ll_ctrl.c | 23 +++
 1 file changed, 19 insertions(+), 4 deletions(-)



[mynewt-core] 01/01: Merge pull request #1503 from wes3/nrf_hfxo_request

2018-11-13 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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

commit 91b3b74d81224ee971487350731bd3a8a8bc631d
Merge: c480706 662148e
Author: wes3 
AuthorDate: Tue Nov 13 16:11:30 2018 -0800

Merge pull request #1503 from wes3/nrf_hfxo_request

hw/mcu/nordic: Add hfxo request/release API

 hw/mcu/nordic/nrf51xxx/include/mcu/nrf51_clock.h   | 51 +++
 hw/mcu/nordic/nrf51xxx/src/nrf51_clock.c   | 75 ++
 .../nrf52xxx-compat/include/mcu/nrf52_clock.h  | 50 +++
 hw/mcu/nordic/nrf52xxx-compat/src/nrf52_clock.c| 75 ++
 hw/mcu/nordic/nrf52xxx/include/mcu/nrf52_clock.h   | 50 +++
 hw/mcu/nordic/nrf52xxx/src/nrf52_clock.c   | 75 ++
 6 files changed, 376 insertions(+)



[mynewt-core] branch master updated (c480706 -> 91b3b74)

2018-11-13 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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


from c480706  net/lora/node/src/lora_node.c: crash fix
 add fa628ef  hw/mcu/nordic: Add hfxo request/release API
 add 662148e  hw/mcu/nordic: Add hfxo request/release API
 new 91b3b74  Merge pull request #1503 from wes3/nrf_hfxo_request

The 1 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:
 .../mcu/nordic/nrf51xxx/include/mcu/nrf51_clock.h  | 32 -
 hw/mcu/nordic/nrf51xxx/src/nrf51_clock.c   | 75 ++
 .../nrf52xxx-compat/include/mcu/nrf52_clock.h  | 31 -
 hw/mcu/nordic/nrf52xxx-compat/src/nrf52_clock.c| 75 ++
 .../mcu/nordic/nrf52xxx/include/mcu/nrf52_clock.h  | 31 -
 hw/mcu/nordic/nrf52xxx/src/nrf52_clock.c   | 75 ++
 6 files changed, 274 insertions(+), 45 deletions(-)
 copy net/oic/include/oic/port/mynewt/ble.h => 
hw/mcu/nordic/nrf51xxx/include/mcu/nrf51_clock.h (60%)
 create mode 100644 hw/mcu/nordic/nrf51xxx/src/nrf51_clock.c
 copy net/oic/include/oic/port/mynewt/ble.h => 
hw/mcu/nordic/nrf52xxx-compat/include/mcu/nrf52_clock.h (60%)
 create mode 100644 hw/mcu/nordic/nrf52xxx-compat/src/nrf52_clock.c
 copy net/oic/include/oic/port/mynewt/ble.h => 
hw/mcu/nordic/nrf52xxx/include/mcu/nrf52_clock.h (60%)
 create mode 100644 hw/mcu/nordic/nrf52xxx/src/nrf52_clock.c



[mynewt-nimble] 01/01: Merge pull request #237 from wes3/nrf_hfxo_request

2018-11-13 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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

commit dc9fb25e1f00acbbf58c06a3acfa764eec5b221f
Merge: 29ef0b0 7ebe68f
Author: wes3 
AuthorDate: Tue Nov 13 16:10:55 2018 -0800

Merge pull request #237 from wes3/nrf_hfxo_request

nimble/ll: Request/release hfxo using mynewt API

 nimble/controller/src/ble_ll_xcvr.c | 12 
 nimble/drivers/nrf51/src/ble_phy.c  | 32 +++-
 nimble/drivers/nrf52/src/ble_phy.c  | 29 -
 3 files changed, 43 insertions(+), 30 deletions(-)



[mynewt-nimble] branch master updated (29ef0b0 -> dc9fb25)

2018-11-13 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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


from 29ef0b0  nimble/host: Allow auto-start to be disabled
 add 4df479f  nimble/ll: Request/release hfxo using mynewt API
 add 7ebe68f  nimble/ll: Add hfxo request/release API
 new dc9fb25  Merge pull request #237 from wes3/nrf_hfxo_request

The 1 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/controller/src/ble_ll_xcvr.c | 12 
 nimble/drivers/nrf51/src/ble_phy.c  | 32 +++-
 nimble/drivers/nrf52/src/ble_phy.c  | 29 -
 3 files changed, 43 insertions(+), 30 deletions(-)



[mynewt-core] 01/01: Merge pull request #1432 from wes3/nrfx_saadc_mod

2018-10-01 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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

commit 47fa0078a51e5f7124425a7b47462ba9de6fc20a
Merge: 8d9a0d4 578734a
Author: wes3 
AuthorDate: Mon Oct 1 10:54:25 2018 -0700

Merge pull request #1432 from wes3/nrfx_saadc_mod

Add enable/disable SAADC channel to nordic SDK

 .../src/nrfx_saadc_mod.c}  | 31 ++
 .../nrfx_saadc.c => nrf52xxx/src/nrfx_saadc_mod.c} | 31 ++
 hw/mcu/nordic/pkg.yml  |  1 +
 .../nordic/src/ext/nrfx/drivers/src/nrfx_saadc.c   | 26 ++
 4 files changed, 74 insertions(+), 15 deletions(-)



[mynewt-core] branch master updated (8d9a0d4 -> 47fa007)

2018-10-01 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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


from 8d9a0d4  Merge pull request #1436 from vrahane/lp5523_fix
 add 5b605a8  hw/mcu/nordic: Add enable/disable ADC channel functions
 add 578734a  hw/mcu/nordic: Add enable/disable SAADC channel functions
 new 47fa007  Merge pull request #1432 from wes3/nrfx_saadc_mod

The 1 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:
 .../src/nrfx_saadc_mod.c}  | 31 ++
 .../nrfx_saadc.c => nrf52xxx/src/nrfx_saadc_mod.c} | 31 ++
 hw/mcu/nordic/pkg.yml  |  1 +
 .../nordic/src/ext/nrfx/drivers/src/nrfx_saadc.c   | 26 ++
 4 files changed, 74 insertions(+), 15 deletions(-)
 copy hw/mcu/nordic/{src/ext/nrfx/drivers/src/nrfx_saadc.c => 
nrf52xxx-compat/src/nrfx_saadc_mod.c} (97%)
 copy hw/mcu/nordic/{src/ext/nrfx/drivers/src/nrfx_saadc.c => 
nrf52xxx/src/nrfx_saadc_mod.c} (97%)



[mynewt-core] 01/01: Merge pull request #1293 from JuulLabs/bq27z561_init_check_updated

2018-07-25 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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

commit 330ade6afe89a4884c15bd49abba5f68743f11f9
Merge: c2714c2 9088061
Author: wes3 
AuthorDate: Wed Jul 25 15:21:45 2018 -0700

Merge pull request #1293 from JuulLabs/bq27z561_init_check_updated

checking device initialization register for init completed

 hw/drivers/bq27z561/include/bq27z561/bq27z561.h | 11 
 hw/drivers/bq27z561/src/bq27z561.c  | 35 +
 2 files changed, 46 insertions(+)



[mynewt-core] branch master updated (c2714c2 -> 330ade6)

2018-07-25 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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


from c2714c2  Allow timer for serial booting
 add 0ab7e6d  checking device inititalization register for init completed
 add 244992b  cleaned up
 add 9088061  Changing inititalization check to first initialization
 new 330ade6  Merge pull request #1293 from 
JuulLabs/bq27z561_init_check_updated

The 1 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/drivers/bq27z561/include/bq27z561/bq27z561.h | 11 
 hw/drivers/bq27z561/src/bq27z561.c  | 35 +
 2 files changed, 46 insertions(+)



[mynewt-core] 01/01: Merge pull request #1292 from wes3/batt_poll_fix

2018-07-25 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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

commit 4685c8f4463cf25c341b1e61a443d651f19e3f10
Merge: 6d47099 7b763d3
Author: wes3 
AuthorDate: Wed Jul 25 08:43:24 2018 -0700

Merge pull request #1292 from wes3/batt_poll_fix

hw/battery: Fix incorrect os_time comparisons

 hw/battery/src/battery.c | 30 --
 1 file changed, 16 insertions(+), 14 deletions(-)



[mynewt-core] branch master updated (6d47099 -> 4685c8f)

2018-07-25 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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


from 6d47099  Make NRFX work with POF to setup an interrupt (#1291)
 add 7b763d3  hw/battery: Fix incorrect comparisons to os_time
 new 4685c8f  Merge pull request #1292 from wes3/batt_poll_fix

The 1 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/battery/src/battery.c | 30 --
 1 file changed, 16 insertions(+), 14 deletions(-)



[mynewt-core] 01/01: Merge pull request #1253 from wes3/nrf_gpio

2018-07-11 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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

commit 1c238e7ba43fcfd9ff8288651e8e2c87fd4c0437
Merge: 6662f0f 1cdfc02
Author: wes3 
AuthorDate: Wed Jul 11 14:11:02 2018 -0700

Merge pull request #1253 from wes3/nrf_gpio

hw/mcu/nordic: Disconnect input buffer when gpio made an output.

 hw/mcu/nordic/nrf51xxx/src/hal_gpio.c | 3 ++-
 hw/mcu/nordic/nrf52xxx/src/hal_gpio.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)



[mynewt-core] branch master updated (6662f0f -> 1c238e7)

2018-07-11 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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


from 6662f0f  Merge pull request #1249 from ccollins476ad/log-to-modlog
 add 1cdfc02  hw/mcu/nordic: Disconnect input buffer when gpio made an 
output.
 new 1c238e7  Merge pull request #1253 from wes3/nrf_gpio

The 1 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/mcu/nordic/nrf51xxx/src/hal_gpio.c | 3 ++-
 hw/mcu/nordic/nrf52xxx/src/hal_gpio.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)



[mynewt-core] 01/01: Merge pull request #1105 from wes3/tlc5971drv

2018-05-18 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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

commit b61097f703e9d295f881cfa2d73175c53e320910
Merge: a7f4d8c c266d0f
Author: wes3 <wi...@runtime.io>
AuthorDate: Fri May 18 13:48:29 2018 -0700

Merge pull request #1105 from wes3/tlc5971drv

hw/drivers: Add TLC5971 driver

 hw/drivers/tlc5971/include/tlc5971/tlc5971.h | 208 ++
 hw/drivers/tlc5971/pkg.yml   |  30 +++
 hw/drivers/tlc5971/src/tlc5971.c | 305 +++
 3 files changed, 543 insertions(+)

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.


[mynewt-core] branch master updated (a7f4d8c -> b61097f)

2018-05-18 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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


from a7f4d8c  Merge pull request #1112 from mlaz/pwm_fixes
 add 5c01f15  hw/drivers: Add TLC5971 driver
 add c266d0f  hw/drivers/tlc5971: Address code review comments.
 new b61097f  Merge pull request #1105 from wes3/tlc5971drv

The 1 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/drivers/tlc5971/include/tlc5971/tlc5971.h | 208 ++
 hw/drivers/{lora/sx1272 => tlc5971}/pkg.yml  |  16 +-
 hw/drivers/tlc5971/src/tlc5971.c | 305 +++
 3 files changed, 520 insertions(+), 9 deletions(-)
 create mode 100755 hw/drivers/tlc5971/include/tlc5971/tlc5971.h
 copy hw/drivers/{lora/sx1272 => tlc5971}/pkg.yml (82%)
 create mode 100755 hw/drivers/tlc5971/src/tlc5971.c

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.


[mynewt-core] 01/01: Merge pull request #1073 from wes3/lora_stop_rx_bug

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

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

commit 3a68537bb0dffd4f74672ca38d4a9ac566bc215f
Merge: 3532ba2 3935f83
Author: wes3 <wi...@runtime.io>
AuthorDate: Mon May 7 11:51:38 2018 -0700

Merge pull request #1073 from wes3/lora_stop_rx_bug

net/lora: Fix issue with radio stop receiving

 net/lora/node/src/mac/LoRaMac.c | 13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.


[mynewt-core] branch master updated (b859325 -> 3981383)

2018-05-04 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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


from b859325  Merge pull request #995 from andrzej-kaczmarek/log-cbor-update
 add e387089  Fix build when charge_control is enabled
 new 3981383  Merge pull request #1071 from kasjer/charge-control-fix

The 1 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/charge-control/include/charge-control/charge_control.h | 1 +
 hw/charge-control/syscfg.yml  | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.


[mynewt-core] 01/01: Merge pull request #1071 from kasjer/charge-control-fix

2018-05-04 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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

commit 39813830672b7740e133e46ff85433424ae21ac9
Merge: b859325 e387089
Author: wes3 <wi...@runtime.io>
AuthorDate: Fri May 4 14:54:56 2018 -0700

Merge pull request #1071 from kasjer/charge-control-fix

Fix build when charge_control is enabled

 hw/charge-control/include/charge-control/charge_control.h | 1 +
 hw/charge-control/syscfg.yml  | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.


[mynewt-core] 01/01: Merge pull request #1059 from wes3/newlora

2018-05-02 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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

commit b958461852d8681af3b976e5f8d8d0e0dd3dd662
Merge: 227f79f 5b951e1
Author: wes3 <wi...@runtime.io>
AuthorDate: Wed May 2 13:41:13 2018 -0700

Merge pull request #1059 from wes3/newlora

Add region support to lora code

 apps/lora_app_shell/src/las_cmd.c  |  121 +-
 apps/lora_app_shell/src/main.c |2 +-
 hw/drivers/lora/sx1272/include/radio/radio.h   |  132 +-
 hw/drivers/lora/sx1272/src/sx1272-board.c  |   10 +-
 hw/drivers/lora/sx1272/src/sx1272-board.h  |7 +
 hw/drivers/lora/sx1272/src/sx1272.c|   35 +-
 hw/drivers/lora/sx1272/src/sx1272.h|   18 +-
 hw/drivers/lora/sx1276/include/radio/radio.h   |  132 +-
 hw/drivers/lora/sx1276/src/sx1276-board.c  |   10 +-
 hw/drivers/lora/sx1276/src/sx1276-board.h  |2 +-
 hw/drivers/lora/sx1276/src/sx1276.c|   36 +-
 hw/drivers/lora/sx1276/src/sx1276.h|   38 +-
 net/lora/node/include/node/lora.h  |   10 +-
 net/lora/node/include/node/lora_band.h |   61 +-
 net/lora/node/include/node/lora_priv.h |  136 +-
 .../node/include/node/mac/LoRaMac-definitions.h|  610 ---
 net/lora/node/include/node/mac/LoRaMac.h   |  457 ++-
 net/lora/node/include/node/mac/Region.h| 1479 +++
 net/lora/node/include/node/utilities.h |  101 +-
 net/lora/node/pkg.yml  |6 +-
 net/lora/node/src/lora_cli.c   |  152 +-
 net/lora/node/src/lora_node.c  |   12 +-
 net/lora/node/src/mac/LoRaMac.c| 4247 +++-
 net/lora/node/src/mac/region/Region.c  | 1036 +
 net/lora/node/src/mac/region/RegionAS923.c | 1094 +
 net/lora/node/src/mac/region/RegionAS923.h |  505 +++
 net/lora/node/src/mac/region/RegionAU915.c |  854 
 net/lora/node/src/mac/region/RegionAU915.h |  457 +++
 net/lora/node/src/mac/region/RegionCN470.c |  774 
 net/lora/node/src/mac/region/RegionCN470.h |  443 ++
 net/lora/node/src/mac/region/RegionCN779.c | 1013 +
 net/lora/node/src/mac/region/RegionCN779.h |  467 +++
 net/lora/node/src/mac/region/RegionCommon.c|  373 ++
 net/lora/node/src/mac/region/RegionCommon.h|  370 ++
 net/lora/node/src/mac/region/RegionEU433.c | 1013 +
 net/lora/node/src/mac/region/RegionEU433.h |  468 +++
 net/lora/node/src/mac/region/RegionEU868.c | 1050 +
 net/lora/node/src/mac/region/RegionEU868.h |  489 +++
 net/lora/node/src/mac/region/RegionIN865.c | 1033 +
 net/lora/node/src/mac/region/RegionIN865.h |  470 +++
 net/lora/node/src/mac/region/RegionKR920.c | 1014 +
 net/lora/node/src/mac/region/RegionKR920.h |  480 +++
 net/lora/node/src/mac/region/RegionUS915-Hybrid.c  |  956 +
 net/lora/node/src/mac/region/RegionUS915-Hybrid.h  |  450 +++
 net/lora/node/src/mac/region/RegionUS915.c |  863 
 net/lora/node/src/mac/region/RegionUS915.h |  450 +++
 net/lora/node/src/utilities.c  |   14 +-
 net/lora/node/syscfg.yml   |   35 +-
 48 files changed, 20165 insertions(+), 3820 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.


[mynewt-core] branch master updated (227f79f -> b958461)

2018-05-02 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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


from 227f79f  Merge pull request #919 from rymanluk/mesh_sim_fix
 add f758125  net/lora: Add new region support
 add 4268d08  net/lora Change public/private network default setting to 
private.
 add 918bce8  net/lora Fix incorrect elapsed time when sending join requests
 add 5b951e1  net/lora: Add lora node cli debug command.
 new b958461  Merge pull request #1059 from wes3/newlora

The 1 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:
 apps/lora_app_shell/src/las_cmd.c  |  121 +-
 apps/lora_app_shell/src/main.c |2 +-
 hw/drivers/lora/sx1272/include/radio/radio.h   |  132 +-
 hw/drivers/lora/sx1272/src/sx1272-board.c  |   10 +-
 hw/drivers/lora/sx1272/src/sx1272-board.h  |7 +
 hw/drivers/lora/sx1272/src/sx1272.c|   35 +-
 hw/drivers/lora/sx1272/src/sx1272.h|   18 +-
 hw/drivers/lora/sx1276/include/radio/radio.h   |  132 +-
 hw/drivers/lora/sx1276/src/sx1276-board.c  |   10 +-
 hw/drivers/lora/sx1276/src/sx1276-board.h  |2 +-
 hw/drivers/lora/sx1276/src/sx1276.c|   36 +-
 hw/drivers/lora/sx1276/src/sx1276.h|   38 +-
 net/lora/node/include/node/lora.h  |   10 +-
 net/lora/node/include/node/lora_band.h |   61 +-
 net/lora/node/include/node/lora_priv.h |  136 +-
 .../node/include/node/mac/LoRaMac-definitions.h|  610 ---
 net/lora/node/include/node/mac/LoRaMac.h   |  457 ++-
 net/lora/node/include/node/mac/Region.h| 1479 +++
 net/lora/node/include/node/utilities.h |  101 +-
 net/lora/node/pkg.yml  |6 +-
 net/lora/node/src/lora_cli.c   |  152 +-
 net/lora/node/src/lora_node.c  |   12 +-
 net/lora/node/src/mac/LoRaMac.c| 4247 +++-
 net/lora/node/src/mac/region/Region.c  | 1036 +
 net/lora/node/src/mac/region/RegionAS923.c | 1094 +
 net/lora/node/src/mac/region/RegionAS923.h |  505 +++
 net/lora/node/src/mac/region/RegionAU915.c |  854 
 net/lora/node/src/mac/region/RegionAU915.h |  457 +++
 net/lora/node/src/mac/region/RegionCN470.c |  774 
 net/lora/node/src/mac/region/RegionCN470.h |  443 ++
 net/lora/node/src/mac/region/RegionCN779.c | 1013 +
 net/lora/node/src/mac/region/RegionCN779.h |  467 +++
 net/lora/node/src/mac/region/RegionCommon.c|  373 ++
 net/lora/node/src/mac/region/RegionCommon.h|  370 ++
 net/lora/node/src/mac/region/RegionEU433.c | 1013 +
 net/lora/node/src/mac/region/RegionEU433.h |  468 +++
 net/lora/node/src/mac/region/RegionEU868.c | 1050 +
 net/lora/node/src/mac/region/RegionEU868.h |  489 +++
 net/lora/node/src/mac/region/RegionIN865.c | 1033 +
 net/lora/node/src/mac/region/RegionIN865.h |  470 +++
 net/lora/node/src/mac/region/RegionKR920.c | 1014 +
 net/lora/node/src/mac/region/RegionKR920.h |  480 +++
 net/lora/node/src/mac/region/RegionUS915-Hybrid.c  |  956 +
 net/lora/node/src/mac/region/RegionUS915-Hybrid.h  |  450 +++
 net/lora/node/src/mac/region/RegionUS915.c |  863 
 net/lora/node/src/mac/region/RegionUS915.h |  450 +++
 net/lora/node/src/utilities.c  |   14 +-
 net/lora/node/syscfg.yml   |   35 +-
 48 files changed, 20165 insertions(+), 3820 deletions(-)
 delete mode 100644 net/lora/node/include/node/mac/LoRaMac-definitions.h
 create mode 100644 net/lora/node/include/node/mac/Region.h
 create mode 100644 net/lora/node/src/mac/region/Region.c
 create mode 100644 net/lora/node/src/mac/region/RegionAS923.c
 create mode 100644 net/lora/node/src/mac/region/RegionAS923.h
 create mode 100644 net/lora/node/src/mac/region/RegionAU915.c
 create mode 100644 net/lora/node/src/mac/region/RegionAU915.h
 create mode 100644 net/lora/node/src/mac/region/RegionCN470.c
 create mode 100644 net/lora/node/src/mac/region/RegionCN470.h
 create mode 100644 net/lora/node/src/mac/region/RegionCN779.c
 create mode 100644 net/lora/node/src/mac/region/RegionCN779.h
 create mode 100644 net/lora/node/src/mac/region/RegionCommon.c
 create mode 100644 net/lora/node/src/mac/region/RegionCommon.h
 create mode 100644 net/lora/node/src/mac/region/RegionEU433.c
 create mode 100644 net/lora/node/src/mac/region/RegionEU433.h
 create mode 100644 net/lora/node/src/mac/region/RegionEU868.c
 create mode 100644 net/lora

[mynewt-core] branch master updated (e8e155d -> 941eee7)

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

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


from e8e155d  Fix imgmgr to follow flash write alignment
 add 7e5f499  net/lora Add command to dump lora node log in lora_app_shell
 new 941eee7  Merge pull request #970 from wes3/loralog

The 1 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:
 apps/lora_app_shell/src/las_cmd.c  | 95 ++
 net/lora/node/include/node/lora_priv.h | 13 +
 net/lora/node/src/lora_node.c  | 13 +
 3 files changed, 110 insertions(+), 11 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.


[mynewt-core] branch master updated (3d689da -> 61c7df4)

2018-03-15 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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


from 3d689da  Fixing build due to bsp -> mcu
 add 06e4b83  hw/drivers/lora: Add MYNEWT_VALs to select PA_BOOST or RFO
 new 61c7df4  Merge pull request #917 from wes3/sx1272_tx_pwr

The 1 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/drivers/lora/sx1272/src/sx1272-board.c |  4 
 hw/drivers/lora/sx1272/syscfg.yml | 16 ++--
 hw/drivers/lora/sx1276/src/sx1276-board.c | 19 ---
 hw/drivers/lora/sx1276/syscfg.yml |  8 
 4 files changed, 38 insertions(+), 9 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.


[mynewt-core] 01/01: Merge pull request #917 from wes3/sx1272_tx_pwr

2018-03-15 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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

commit 61c7df4f18aecfcd7a266a176dc4599ed1087d2e
Merge: 3d689da 06e4b83
Author: wes3 <wi...@runtime.io>
AuthorDate: Thu Mar 15 09:57:42 2018 -0700

Merge pull request #917 from wes3/sx1272_tx_pwr

hw/drivers/lora: Add MYNEWT_VALs to select PA_BOOST or RFO

 hw/drivers/lora/sx1272/src/sx1272-board.c |  4 
 hw/drivers/lora/sx1272/syscfg.yml | 16 ++--
 hw/drivers/lora/sx1276/src/sx1276-board.c | 19 ---
 hw/drivers/lora/sx1276/syscfg.yml |  8 
 4 files changed, 38 insertions(+), 9 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.


[mynewt-core] 01/01: Merge pull request #909 from wes3/lora_cs

2018-03-14 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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

commit 447c54c68b74b1afdf95c70e67a7a4511ae4a18a
Merge: 3b078c4 e1af97d
Author: wes3 <wi...@runtime.io>
AuthorDate: Wed Mar 14 11:47:46 2018 -0700

Merge pull request #909 from wes3/lora_cs

lora coding style changes

 hw/drivers/lora/sx1272/src/sx1272-board.c|  132 +-
 hw/drivers/lora/sx1272/src/sx1272-board.h|   20 +-
 hw/drivers/lora/sx1272/src/sx1272.c  | 3242 --
 hw/drivers/lora/sx1272/src/sx1272.h  |  786 +++
 hw/drivers/lora/sx1272/src/sx1272Regs-Fsk.h  | 2268 +-
 hw/drivers/lora/sx1272/src/sx1272Regs-LoRa.h | 1090 -
 hw/drivers/lora/sx1276/src/sx1276-board.c|   46 +-
 hw/drivers/lora/sx1276/src/sx1276-board.h|   20 +-
 hw/drivers/lora/sx1276/src/sx1276.c  | 2068 
 hw/drivers/lora/sx1276/src/sx1276.h  |   92 +-
 10 files changed, 4738 insertions(+), 5026 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.


[mynewt-core] branch master updated (3b078c4 -> 447c54c)

2018-03-14 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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


from 3b078c4  Merge pull request #915 from 
ncasaril/expose_datetime_functions
 add c33187b  net/lora: Coding style changes.
 add e1af97d  hw/drivers/sx1272: Fix bug in code when HAS_ANT_SW defined.
 new 447c54c  Merge pull request #909 from wes3/lora_cs

The 1 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/drivers/lora/sx1272/src/sx1272-board.c|  132 +-
 hw/drivers/lora/sx1272/src/sx1272-board.h|   20 +-
 hw/drivers/lora/sx1272/src/sx1272.c  | 3242 --
 hw/drivers/lora/sx1272/src/sx1272.h  |  786 +++
 hw/drivers/lora/sx1272/src/sx1272Regs-Fsk.h  | 2268 +-
 hw/drivers/lora/sx1272/src/sx1272Regs-LoRa.h | 1090 -
 hw/drivers/lora/sx1276/src/sx1276-board.c|   46 +-
 hw/drivers/lora/sx1276/src/sx1276-board.h|   20 +-
 hw/drivers/lora/sx1276/src/sx1276.c  | 2068 
 hw/drivers/lora/sx1276/src/sx1276.h  |   92 +-
 10 files changed, 4738 insertions(+), 5026 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.


[mynewt-core] branch master updated (23c507e -> 5a38381)

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

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


from 23c507e  Update README to document minimal console
 add 2241e9d  net/lora: Update sx1272 to latest semtech code.
 new 5a38381  Merge pull request #887 from wes3/sx1272_update

The 1 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/drivers/lora/sx1272/src/sx1272.c | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.


[mynewt-core] 01/01: Merge pull request #887 from wes3/sx1272_update

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

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

commit 5a38381d21900d7d3ad07509c2a78ef9b7c779dc
Merge: 23c507e 2241e9d
Author: wes3 <wi...@runtime.io>
AuthorDate: Wed Mar 7 13:32:11 2018 -0800

Merge pull request #887 from wes3/sx1272_update

net/lora: Update sx1272 to latest semtech code.

 hw/drivers/lora/sx1272/src/sx1272.c | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.


[mynewt-core] branch master updated (52acffc -> e587dd4)

2018-03-05 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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


from 52acffc  blecent and blesplit remove set g_dev_addr (#860)
 add b1fd0ae  adding DWM1001-DEV board
 new e587dd4  Merge pull request #869 from sdalu/master

The 1 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/{vbluno52 => dwm1001-dev}/boot-nrf52xxaa.ld |  0
 hw/bsp/{nrf52dk => dwm1001-dev}/bsp.yml| 14 ++--
 .../dwm1001-dev_debug.cmd} |  0
 .../dwm1001-dev_debug.sh}  |  0
 .../dwm1001-dev_download.cmd}  |  0
 .../dwm1001-dev_download.sh}   |  0
 .../dwm1001-dev_no_boot.ld}|  0
 .../{nrf52dk => dwm1001-dev}/include/bsp/boards.h  |  0
 hw/bsp/dwm1001-dev/include/bsp/bsp.h   | 96 ++
 .../include/bsp/cmsis_nvic.h   |  0
 hw/bsp/{vbluno52 => dwm1001-dev}/nrf52xxaa.ld  |  0
 hw/bsp/{rb-nano2 => dwm1001-dev}/pkg.yml   |  7 +-
 .../split-dwm1001-dev.ld}  |  0
 .../src/arch/cortex_m4/gcc_startup_nrf52.s |  0
 .../src/arch/cortex_m4/gcc_startup_nrf52_split.s   |  0
 hw/bsp/{nrf52dk => dwm1001-dev}/src/hal_bsp.c  | 33 ++--
 hw/bsp/{vbluno52 => dwm1001-dev}/src/sbrk.c|  0
 hw/bsp/{ruuvi_tag_revb2 => dwm1001-dev}/syscfg.yml | 62 +++---
 18 files changed, 163 insertions(+), 49 deletions(-)
 copy hw/bsp/{vbluno52 => dwm1001-dev}/boot-nrf52xxaa.ld (100%)
 copy hw/bsp/{nrf52dk => dwm1001-dev}/bsp.yml (79%)
 copy hw/bsp/{vbluno52/vbluno52_download.cmd => 
dwm1001-dev/dwm1001-dev_debug.cmd} (100%)
 copy hw/bsp/{telee02/telee02_debug.sh => dwm1001-dev/dwm1001-dev_debug.sh} 
(100%)
 copy hw/bsp/{vbluno52/vbluno52_download.cmd => 
dwm1001-dev/dwm1001-dev_download.cmd} (100%)
 copy hw/bsp/{telee02/telee02_download.sh => 
dwm1001-dev/dwm1001-dev_download.sh} (100%)
 copy hw/bsp/{vbluno52/vbluno52_no_boot.ld => 
dwm1001-dev/dwm1001-dev_no_boot.ld} (100%)
 copy hw/bsp/{nrf52dk => dwm1001-dev}/include/bsp/boards.h (100%)
 create mode 100644 hw/bsp/dwm1001-dev/include/bsp/bsp.h
 copy hw/bsp/{vbluno52 => dwm1001-dev}/include/bsp/cmsis_nvic.h (100%)
 copy hw/bsp/{vbluno52 => dwm1001-dev}/nrf52xxaa.ld (100%)
 copy hw/bsp/{rb-nano2 => dwm1001-dev}/pkg.yml (97%)
 copy hw/bsp/{vbluno52/split-vbluno52.ld => dwm1001-dev/split-dwm1001-dev.ld} 
(100%)
 copy hw/bsp/{vbluno52 => dwm1001-dev}/src/arch/cortex_m4/gcc_startup_nrf52.s 
(100%)
 copy hw/bsp/{vbluno52 => 
dwm1001-dev}/src/arch/cortex_m4/gcc_startup_nrf52_split.s (100%)
 copy hw/bsp/{nrf52dk => dwm1001-dev}/src/hal_bsp.c (89%)
 copy hw/bsp/{vbluno52 => dwm1001-dev}/src/sbrk.c (100%)
 copy hw/bsp/{ruuvi_tag_revb2 => dwm1001-dev}/syscfg.yml (77%)

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.


[mynewt-core] 01/01: Merge pull request #869 from sdalu/master

2018-03-05 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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

commit e587dd458afe63aa5dbdc80215a905d487cb64a7
Merge: 52acffc b1fd0ae
Author: wes3 <wi...@runtime.io>
AuthorDate: Mon Mar 5 15:44:34 2018 -0800

Merge pull request #869 from sdalu/master

hw/bsp: DWM1001-DEV board

 hw/bsp/dwm1001-dev/boot-nrf52xxaa.ld   |  25 ++
 hw/bsp/dwm1001-dev/bsp.yml |  64 
 hw/bsp/dwm1001-dev/dwm1001-dev_debug.cmd   |  22 ++
 hw/bsp/dwm1001-dev/dwm1001-dev_debug.sh|  46 +++
 hw/bsp/dwm1001-dev/dwm1001-dev_download.cmd|  22 ++
 hw/bsp/dwm1001-dev/dwm1001-dev_download.sh |  40 +++
 hw/bsp/dwm1001-dev/dwm1001-dev_no_boot.ld  | 191 
 hw/bsp/dwm1001-dev/include/bsp/boards.h|  19 ++
 hw/bsp/dwm1001-dev/include/bsp/bsp.h   |  96 ++
 hw/bsp/dwm1001-dev/include/bsp/cmsis_nvic.h|  29 ++
 hw/bsp/dwm1001-dev/nrf52xxaa.ld|  25 ++
 hw/bsp/dwm1001-dev/pkg.yml | 133 +
 hw/bsp/dwm1001-dev/split-dwm1001-dev.ld| 208 +
 .../src/arch/cortex_m4/gcc_startup_nrf52.s | 301 +++
 .../src/arch/cortex_m4/gcc_startup_nrf52_split.s   | 166 +++
 hw/bsp/dwm1001-dev/src/hal_bsp.c   | 324 +
 hw/bsp/dwm1001-dev/src/sbrk.c  |  59 
 hw/bsp/dwm1001-dev/syscfg.yml  | 132 +
 18 files changed, 1902 insertions(+)

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.


[mynewt-core] 01/01: Merge pull request #857 from wes3/issue856

2018-02-28 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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

commit d46cdb11734f25cd29a819c4816d116b427a9672
Merge: 55967c4 40eb21f
Author: wes3 <wi...@runtime.io>
AuthorDate: Wed Feb 28 10:41:39 2018 -0800

Merge pull request #857 from wes3/issue856

hw/mcu/nordic/nrf52xxx: HAL spi broken for 52840.

 hw/mcu/nordic/nrf52xxx/include/mcu/nrf52_hal.h | 29 +++
 hw/mcu/nordic/nrf52xxx/src/hal_gpio.c  | 30 +--
 hw/mcu/nordic/nrf52xxx/src/hal_spi.c   | 40 +++---
 3 files changed, 59 insertions(+), 40 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.


[mynewt-core] branch master updated (bca0ddc -> 588a483)

2018-02-26 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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


from bca0ddc  Merge pull request #854 from PaxLabs/bma253_set_config
 add 32e9b10  lora: Add single pole antenna switch to sx1272 and fix 
initial sx1276 state
 new 588a483  Merge pull request #846 from wes3/lora_ant_sw

The 1 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/drivers/lora/sx1272/src/sx1272-board.c | 626 +++---
 hw/drivers/lora/sx1276/src/sx1276-board.c |   2 +-
 2 files changed, 317 insertions(+), 311 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.


[mynewt-core] 01/01: Merge pull request #846 from wes3/lora_ant_sw

2018-02-26 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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

commit 588a4830d567d7c99419e1710ad918af5eefd4fa
Merge: bca0ddc 32e9b10
Author: wes3 <wi...@runtime.io>
AuthorDate: Mon Feb 26 23:57:58 2018 -0800

Merge pull request #846 from wes3/lora_ant_sw

lora: Add single pole antenna switch to sx1272 and fix initial sx1276…

 hw/drivers/lora/sx1272/src/sx1272-board.c | 626 +++---
 hw/drivers/lora/sx1276/src/sx1276-board.c |   2 +-
 2 files changed, 317 insertions(+), 311 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.


[mynewt-core] 01/01: Merge pull request #828 from wes3/nrf52840_uart

2018-02-21 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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

commit 6d55bf7d9820009c8f22b8e94fa41a9634ec23c6
Merge: 3b58dde be19af0
Author: wes3 <wi...@runtime.io>
AuthorDate: Wed Feb 21 07:51:17 2018 -0800

Merge pull request #828 from wes3/nrf52840_uart

hal/uart: Fix nrf52840 (and nrf52) uart1 addition.

 hw/drivers/uart/uart_hal/src/uart_hal.c |  7 +++--
 hw/mcu/nordic/nrf52xxx/src/hal_uart.c   | 50 -
 2 files changed, 42 insertions(+), 15 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.


[mynewt-core] 01/01: Merge pull request #817 from wes3/nrf52840_uart

2018-02-17 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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

commit d1d83e1f4963a07bc147c5fe4d1ba480774eec15
Merge: fd3ffef 449ade0
Author: wes3 <wi...@runtime.io>
AuthorDate: Sat Feb 17 15:59:37 2018 -0800

Merge pull request #817 from wes3/nrf52840_uart

mcu/nrf52xx: Modify hal_uart so that UARTE1 can be used.

 hw/mcu/nordic/nrf52xxx/src/hal_uart.c | 190 +-
 1 file changed, 142 insertions(+), 48 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.


[mynewt-core] branch master updated (fd3ffef -> d1d83e1)

2018-02-17 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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


from fd3ffef  Merge pull request #816 from wes3/lora_irq_fix
 add 449ade0  mcu/nrf52xx: Modify hal_uart so that UARTE1 can be used.
 new d1d83e1  Merge pull request #817 from wes3/nrf52840_uart

The 1 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/mcu/nordic/nrf52xxx/src/hal_uart.c | 190 +-
 1 file changed, 142 insertions(+), 48 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.


[mynewt-core] branch master updated (2f5ebaf -> fd3ffef)

2018-02-17 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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


from 2f5ebaf  Merge pull request #812 from 
andrzej-kaczmarek/btshell-nomalloc
 add 29f3bdc  lora: Do not enable an IRQ if no handler present.
 new fd3ffef  Merge pull request #816 from wes3/lora_irq_fix

The 1 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/drivers/lora/sx1272/src/sx1272-board.c | 82 -
 hw/drivers/lora/sx1276/src/sx1276-board.c | 86 ---
 2 files changed, 113 insertions(+), 55 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.


[mynewt-core] 01/01: Merge pull request #813 from wes3/sx1272

2018-02-15 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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

commit 5f6451ae75b3fb72019085a31298bdcce94f0fc9
Merge: 917aa3f 78467ec
Author: wes3 <wi...@runtime.io>
AuthorDate: Thu Feb 15 09:11:54 2018 -0800

Merge pull request #813 from wes3/sx1272

lora: Initial version of sx1272 driver

 hw/drivers/lora/sx1272/LICENSE.txt   |   25 +
 hw/drivers/lora/sx1272/include/radio/radio.h |  337 ++
 hw/drivers/lora/sx1272/pkg.yml   |   32 +
 hw/drivers/lora/sx1272/src/sx1272-board.c|  278 +
 hw/drivers/lora/sx1272/src/sx1272-board.h|  127 ++
 hw/drivers/lora/sx1272/src/sx1272.c  | 1660 ++
 hw/drivers/lora/sx1272/src/sx1272.h  |  393 ++
 hw/drivers/lora/sx1272/src/sx1272Regs-Fsk.h  | 1134 ++
 hw/drivers/lora/sx1272/src/sx1272Regs-LoRa.h |  545 +
 hw/drivers/lora/sx1272/syscfg.yml|   44 +
 10 files changed, 4575 insertions(+)

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.


[mynewt-core] branch master updated (917aa3f -> 5f6451a)

2018-02-15 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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


from 917aa3f  Merge pull request #811 from andrzej-kaczmarek/nrf52-2m-phy
 add 78467ec  lora: Initial version of sx1272 driver
 new 5f6451a  Merge pull request #813 from wes3/sx1272

The 1 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:
 .../node => hw/drivers/lora/sx1272}/LICENSE.txt|0
 .../lora/{sx1276 => sx1272}/include/radio/radio.h  |0
 hw/drivers/lora/{sx1276 => sx1272}/pkg.yml |5 +-
 hw/drivers/lora/sx1272/src/sx1272-board.c  |  278 
 .../sx1276-board.h => sx1272/src/sx1272-board.h}   |   54 +-
 hw/drivers/lora/sx1272/src/sx1272.c| 1660 
 .../{sx1276/src/sx1276.h => sx1272/src/sx1272.h}   |  792 +-
 .../src/sx1272Regs-Fsk.h}  |  214 +--
 .../src/sx1272Regs-LoRa.h} |  176 +--
 hw/drivers/lora/{sx1276 => sx1272}/syscfg.yml  |   16 +-
 10 files changed, 2556 insertions(+), 639 deletions(-)
 copy {net/lora/node => hw/drivers/lora/sx1272}/LICENSE.txt (100%)
 copy hw/drivers/lora/{sx1276 => sx1272}/include/radio/radio.h (100%)
 copy hw/drivers/lora/{sx1276 => sx1272}/pkg.yml (89%)
 create mode 100644 hw/drivers/lora/sx1272/src/sx1272-board.c
 copy hw/drivers/lora/{sx1276/src/sx1276-board.h => sx1272/src/sx1272-board.h} 
(70%)
 create mode 100644 hw/drivers/lora/sx1272/src/sx1272.c
 copy hw/drivers/lora/{sx1276/src/sx1276.h => sx1272/src/sx1272.h} (79%)
 copy hw/drivers/lora/{sx1276/src/sx1276Regs-Fsk.h => 
sx1272/src/sx1272Regs-Fsk.h} (88%)
 copy hw/drivers/lora/{sx1276/src/sx1276Regs-LoRa.h => 
sx1272/src/sx1272Regs-LoRa.h} (77%)
 copy hw/drivers/lora/{sx1276 => sx1272}/syscfg.yml (75%)

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.


[mynewt-core] branch master updated (86b320e -> 1c204ba)

2018-02-11 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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


from 86b320e  Merge pull request #798 from mkiiskila/oic_client_rsp_ep
 add 99c229c  lora: make the lora driver not dependent on lora node
 new 1c204ba  Merge pull request #793 from wes3/lora_node_ind

The 1 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:
 apps/loraping/pkg.yml|   1 -
 apps/loraping/src/main.c |   6 +-
 apps/{lora_app_shell => loraping}/syscfg.yml |  14 +-
 hw/drivers/lora/sx1276/include/radio/radio.h | 324 -
 hw/drivers/lora/sx1276/pkg.yml   |   3 +-
 hw/drivers/lora/sx1276/src/sx1276-board.c|   2 +-
 hw/drivers/lora/sx1276/src/sx1276.c  |  40 ++--
 hw/drivers/lora/sx1276/src/sx1276.h  |  17 +-
 net/lora/node/include/node/radio.h   | 337 ---
 net/lora/node/src/lora_node.c|  15 --
 net/lora/node/src/mac/LoRaMac.c  |   9 +-
 net/lora/node/src/utilities.c|  24 --
 12 files changed, 379 insertions(+), 413 deletions(-)
 copy apps/{lora_app_shell => loraping}/syscfg.yml (78%)
 delete mode 100644 net/lora/node/include/node/radio.h

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.


[mynewt-core] 01/01: Merge pull request #793 from wes3/lora_node_ind

2018-02-11 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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

commit 1c204baa205ac863c2d1f201e1b0ae6e6b9fe9fa
Merge: 86b320e 99c229c
Author: wes3 <wi...@runtime.io>
AuthorDate: Sun Feb 11 17:15:30 2018 -0800

Merge pull request #793 from wes3/lora_node_ind

lora: make the lora driver not dependent on lora node

 apps/loraping/pkg.yml  |   1 -
 apps/loraping/src/main.c   |   6 +-
 .../sx1276/pkg.yml => apps/loraping/syscfg.yml |  26 +-
 hw/drivers/lora/sx1276/include/radio/radio.h   | 324 +++-
 hw/drivers/lora/sx1276/pkg.yml |   3 +-
 hw/drivers/lora/sx1276/src/sx1276-board.c  |   2 +-
 hw/drivers/lora/sx1276/src/sx1276.c|  40 ++-
 hw/drivers/lora/sx1276/src/sx1276.h|  17 +-
 net/lora/node/include/node/radio.h | 337 -
 net/lora/node/src/lora_node.c  |  15 -
 net/lora/node/src/mac/LoRaMac.c|   9 +-
 net/lora/node/src/utilities.c  |  24 --
 12 files changed, 383 insertions(+), 421 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.


[mynewt-core] 01/01: Merge pull request #711 from wes3/initarc

2018-01-18 Thread wes3
This is an automated email from the ASF dual-hosted git repository.

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

commit 03b9f29b54ae0019c31f9f0efb4b5319d9a718f1
Merge: 1ce6bb0 7fd53ee
Author: wes3 <wi...@runtime.io>
AuthorDate: Thu Jan 18 09:54:30 2018 -0800

Merge pull request #711 from wes3/initarc

Initial ARCv2 port of mynewt

 LICENSE|4 +
 compiler/arc/compiler.yml  |   36 +
 compiler/arc/pkg.yml   |   27 +
 hw/bsp/embarc_emsk/arc_core.ld |  128 ++
 hw/bsp/embarc_emsk/bsp.yml |   62 +
 hw/bsp/embarc_emsk/include/bsp/arc_core_config.h   |  179 +++
 hw/bsp/embarc_emsk/include/bsp/bsp.h   |   39 +
 hw/bsp/embarc_emsk/include/bsp/embARC_BSP_config.h |   66 +
 hw/bsp/embarc_emsk/pkg.yml |   33 +
 hw/bsp/embarc_emsk/src/board.c |   50 +
 hw/bsp/embarc_emsk/src/hal_bsp.c   |  109 ++
 hw/bsp/embarc_emsk/src/sbrk.c  |   60 +
 hw/bsp/embarc_emsk/syscfg.yml  |   42 +
 hw/mcu/arc/pkg.yml |   39 +
 hw/mcu/arc/snps/include/mcu/mcu_arc.h  |   35 +
 hw/mcu/arc/snps/pkg.yml|   29 +
 hw/mcu/arc/snps/src/arch/arc/arc_startup.S |  264 
 hw/mcu/arc/snps/src/hal_os_tick.c  |  103 ++
 hw/mcu/arc/snps/src/hal_system.c   |   68 +
 hw/mcu/arc/snps/src/hal_timer.c|  199 +++
 hw/mcu/arc/snps/src/hal_watchdog.c |   39 +
 hw/mcu/arc/snps/syscfg.yml |   19 +
 hw/mcu/arc/src/ext/sdk/README.md   |   22 +
 hw/mcu/arc/src/ext/sdk/arc/arc_cache.c |  420 ++
 hw/mcu/arc/src/ext/sdk/arc/arc_exc_asm.S   |  202 +++
 hw/mcu/arc/src/ext/sdk/arc/arc_exception.c |  514 +++
 hw/mcu/arc/src/ext/sdk/arc/arc_timer.c |  211 +++
 .../arc/src/ext/sdk/arc/startup/arc_cxx_support.c  |  168 +++
 hw/mcu/arc/src/ext/sdk/arc/startup/arc_startup.S   |  266 
 hw/mcu/arc/src/ext/sdk/board/board.h   |   68 +
 .../arc/src/ext/sdk/board/emsk/common/emsk_init.c  |  116 ++
 .../arc/src/ext/sdk/board/emsk/common/emsk_timer.c |  189 +++
 .../arc/src/ext/sdk/board/emsk/common/emsk_timer.h |   63 +
 hw/mcu/arc/src/ext/sdk/board/emsk/common/mux.c |  116 ++
 hw/mcu/arc/src/ext/sdk/board/emsk/common/mux.h |  186 +++
 hw/mcu/arc/src/ext/sdk/board/emsk/common/mux_hal.h |   69 +
 hw/mcu/arc/src/ext/sdk/board/emsk/emsk.h   |  128 ++
 hw/mcu/arc/src/ext/sdk/board/emsk/emsk_hardware.h  |  119 ++
 .../arc/src/ext/sdk/board/emsk/gpio/dw_gpio_obj.c  |  379 +
 .../arc/src/ext/sdk/board/emsk/gpio/dw_gpio_obj.h  |   90 ++
 hw/mcu/arc/src/ext/sdk/board/emsk/gpio/emsk_gpio.c |  199 +++
 hw/mcu/arc/src/ext/sdk/board/emsk/gpio/emsk_gpio.h |   96 ++
 hw/mcu/arc/src/ext/sdk/board/emsk/iic/dw_iic_obj.c |  302 
 hw/mcu/arc/src/ext/sdk/board/emsk/iic/dw_iic_obj.h |   83 +
 hw/mcu/arc/src/ext/sdk/board/emsk/spi/dw_spi_obj.c |  322 
 hw/mcu/arc/src/ext/sdk/board/emsk/spi/dw_spi_obj.h |   82 +
 .../arc/src/ext/sdk/board/emsk/uart/dw_uart_obj.c  |  266 
 .../arc/src/ext/sdk/board/emsk/uart/dw_uart_obj.h  |   89 ++
 hw/mcu/arc/src/ext/sdk/common/console_io.c |  164 ++
 hw/mcu/arc/src/ext/sdk/common/console_io.h |   57 +
 hw/mcu/arc/src/ext/sdk/common/xprintf.c|  391 +
 hw/mcu/arc/src/ext/sdk/common/xprintf.h|   48 +
 .../src/ext/sdk/device/designware/gpio/dw_gpio.c   |  481 ++
 .../src/ext/sdk/device/designware/gpio/dw_gpio.h   |  145 ++
 .../arc/src/ext/sdk/device/designware/iic/dw_iic.c | 1584 
 .../arc/src/ext/sdk/device/designware/iic/dw_iic.h |  242 +++
 .../src/ext/sdk/device/designware/iic/dw_iic_hal.h |  186 +++
 .../ext/sdk/device/designware/iic/dw_iic_hal_cfg.h |   82 +
 .../arc/src/ext/sdk/device/designware/spi/dw_spi.c | 1337 +
 .../arc/src/ext/sdk/device/designware/spi/dw_spi.h |  190 +++
 .../src/ext/sdk/device/designware/spi/dw_spi_hal.h |  141 ++
 .../ext/sdk/device/designware/spi/dw_spi_hal_cfg.h |   58 +
 .../src/ext/sdk/device/designware/uart/dw_uart.c   |  956 
 .../src/ext/sdk/device/designware/uart/dw_uart.h   |  141 ++
 .../ext/sdk/device/designware/uart/dw_uart_hal.h   |  253 
 .../src/ext/sdk/device/device_hal/inc/dev_common.h |  173 +++
 .../src/ext/sdk/device/device_hal/inc/dev_gpio.h   |  424 ++
 .../src/ext/sdk/device/device_hal/inc/dev_iic.h|  526 +++
 .../src/ext/sdk/device/device_hal/inc/dev_spi.h|  577 +++
 .../src/ext/sdk/device/device_hal/inc/dev_uart.h   |  475 ++
 hw/mcu/arc/src/ext/sdk/inc/arc/arc.h   |  436 ++
 hw/mcu/arc/src/ext/sdk/inc/arc/arc_asm_common.h|  541 +++
 hw/mcu/arc/src/ext/sdk/i

[mynewt-core] branch master updated (add6d20 -> eb3d264)

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

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


from add6d20  Merge pull request #716 from wes3/lora_ant_sw
 add 8a36be7  Revert "MYNEWT-879: fixup incorrect comment."
 add 9c98520  Revert "MYNEWT-879: OS scheduler issues with 
TAILQ_INSERT_TAIL"
 new eb3d264  Merge pull request #717 from wes3/myn879

The 1 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/src/os_sched.c | 33 -
 1 file changed, 8 insertions(+), 25 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
['"commits@mynewt.apache.org" <commits@mynewt.apache.org>'].


  1   2   >