You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2018/11/05 13:36:39 UTC

[mynewt-nimble] branch master updated (7e17a05 -> ef58876)

This is an automated email from the ASF dual-hosted git repository.

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


    from 7e17a05  Fix links in README.md
     new d15edf1  [build] Adjust makefiles to support autotools integration.
     new 22e1e79  [linux] Cleanup npl layer in linux port.
     new ef58876  [linux] resolve merge conflict.  Default to providing access to psm for l2cap coc connections.

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


Summary of changes:
 porting/examples/linux/include/syscfg/syscfg.h   |  2 +-
 porting/nimble/Makefile.controller               |  2 ++
 porting/nimble/Makefile.defs                     |  5 ++++
 porting/nimble/Makefile.mesh                     |  2 ++
 porting/nimble/Makefile.tinycrypt                |  2 ++
 porting/npl/linux/include/nimble/nimble_npl_os.h |  6 +----
 porting/npl/linux/src/npl_osal.h                 | 29 ------------------------
 porting/npl/linux/src/os_atomic.c                |  2 +-
 porting/npl/linux/src/os_callout.c               |  3 +--
 porting/npl/linux/src/os_eventq.cc               |  2 +-
 porting/npl/linux/src/os_mutex.c                 |  1 +
 porting/npl/linux/src/os_sem.c                   |  1 +
 porting/npl/linux/src/os_task.c                  |  6 +++++
 porting/npl/linux/src/os_time.c                  |  1 +
 porting/npl/linux/src/os_types.h                 |  4 ++--
 15 files changed, 27 insertions(+), 41 deletions(-)
 delete mode 100644 porting/npl/linux/src/npl_osal.h


[mynewt-nimble] 02/03: [linux] Cleanup npl layer in linux port.

Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 22e1e79295e3c045e100e889738cbf7f3a8e17b6
Author: Martin Turon <mt...@nestlabs.com>
AuthorDate: Thu Aug 23 18:39:33 2018 -0700

    [linux] Cleanup npl layer in linux port.
---
 porting/npl/linux/include/nimble/nimble_npl_os.h |  6 +----
 porting/npl/linux/src/npl_osal.h                 | 29 ------------------------
 porting/npl/linux/src/os_atomic.c                |  2 +-
 porting/npl/linux/src/os_callout.c               |  3 +--
 porting/npl/linux/src/os_eventq.cc               |  2 +-
 porting/npl/linux/src/os_mutex.c                 |  1 +
 porting/npl/linux/src/os_sem.c                   |  1 +
 porting/npl/linux/src/os_task.c                  |  6 +++++
 porting/npl/linux/src/os_time.c                  |  1 +
 porting/npl/linux/src/os_types.h                 |  4 ++--
 10 files changed, 15 insertions(+), 40 deletions(-)

diff --git a/porting/npl/linux/include/nimble/nimble_npl_os.h b/porting/npl/linux/include/nimble/nimble_npl_os.h
index 15f7820..bdd3988 100644
--- a/porting/npl/linux/include/nimble/nimble_npl_os.h
+++ b/porting/npl/linux/include/nimble/nimble_npl_os.h
@@ -24,7 +24,7 @@
 #include <stdint.h>
 #include <string.h>
 
-#include "npl_osal.h"
+#include "os_types.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -34,10 +34,6 @@ extern "C" {
 
 #define BLE_NPL_TIME_FOREVER    INT32_MAX
 
-/* This should be compatible with TickType_t */
-typedef uint32_t ble_npl_time_t;
-typedef int32_t ble_npl_stime_t;
-
 #define SYSINIT_PANIC_MSG(msg) __assert_fail(msg, __FILE__, __LINE__, __func__)
 
 #define SYSINIT_PANIC_ASSERT_MSG(rc, msg) do \
diff --git a/porting/npl/linux/src/npl_osal.h b/porting/npl/linux/src/npl_osal.h
deleted file mode 100644
index 2d6efed..0000000
--- a/porting/npl/linux/src/npl_osal.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#ifndef _NPL_OSAL_H
-#define _NPL_OSAL_H
-
-#include "os_types.h"
-
-#include "nimble/nimble_npl.h"
-
-#include "os/os.h"
-
-#endif // _NPL_OSAL_H
\ No newline at end of file
diff --git a/porting/npl/linux/src/os_atomic.c b/porting/npl/linux/src/os_atomic.c
index 5704707..3aaec08 100644
--- a/porting/npl/linux/src/os_atomic.c
+++ b/porting/npl/linux/src/os_atomic.c
@@ -20,7 +20,7 @@
 #include <stdint.h>
 #include <pthread.h>
 
-#include "npl_osal.h"
+#include "nimble/nimble_npl.h"
 
 static pthread_mutex_t s_mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
 
diff --git a/porting/npl/linux/src/os_callout.c b/porting/npl/linux/src/os_callout.c
index ead7ff1..1804705 100644
--- a/porting/npl/linux/src/os_callout.c
+++ b/porting/npl/linux/src/os_callout.c
@@ -25,7 +25,7 @@
 #include <time.h>
 #include <signal.h>
 
-#include "npl_osal.h"
+#include "nimble/nimble_npl.h"
 
 static void
 ble_npl_callout_timer_cb(union sigval sv)
@@ -40,7 +40,6 @@ ble_npl_callout_timer_cb(union sigval sv)
     }
 }
 
-
 void ble_npl_callout_init(struct ble_npl_callout *c, 
                           struct ble_npl_eventq *evq,
                           ble_npl_event_fn *ev_cb, 
diff --git a/porting/npl/linux/src/os_eventq.cc b/porting/npl/linux/src/os_eventq.cc
index a1459bd..0415836 100644
--- a/porting/npl/linux/src/os_eventq.cc
+++ b/porting/npl/linux/src/os_eventq.cc
@@ -21,7 +21,7 @@
 #include <stdint.h>
 #include <string.h>
 
-#include "npl_osal.h"
+#include "nimble/nimble_npl.h"
 #include "wqueue.h"
 
 extern "C" {
diff --git a/porting/npl/linux/src/os_mutex.c b/porting/npl/linux/src/os_mutex.c
index f4bcf65..bdc254c 100644
--- a/porting/npl/linux/src/os_mutex.c
+++ b/porting/npl/linux/src/os_mutex.c
@@ -21,6 +21,7 @@
 #include <stdint.h>
 #include <string.h>
 #include "os/os.h"
+#include "nimble/nimble_npl.h"
 
 #include <pthread.h>
 
diff --git a/porting/npl/linux/src/os_sem.c b/porting/npl/linux/src/os_sem.c
index 46701ac..bec0039 100644
--- a/porting/npl/linux/src/os_sem.c
+++ b/porting/npl/linux/src/os_sem.c
@@ -21,6 +21,7 @@
 #include <stdint.h>
 #include <string.h>
 #include "os/os.h"
+#include "nimble/nimble_npl.h"
 
 #include <errno.h>
 #include <pthread.h>
diff --git a/porting/npl/linux/src/os_task.c b/porting/npl/linux/src/os_task.c
index 959ab0e..2ba7432 100644
--- a/porting/npl/linux/src/os_task.c
+++ b/porting/npl/linux/src/os_task.c
@@ -18,6 +18,7 @@
  */
 
 #include "os/os.h"
+#include "nimble/nimble_npl.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -105,6 +106,11 @@ bool ble_npl_os_started(void)
     return true;
 }
 
+void ble_npl_task_yield(void)
+{
+    pthread_yield();
+}
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/porting/npl/linux/src/os_time.c b/porting/npl/linux/src/os_time.c
index 55cbb61..613e299 100644
--- a/porting/npl/linux/src/os_time.c
+++ b/porting/npl/linux/src/os_time.c
@@ -21,6 +21,7 @@
 #include <stdint.h>
 #include <string.h>
 #include "os/os.h"
+#include "nimble/nimble_npl.h"
 
 #include <time.h>
 
diff --git a/porting/npl/linux/src/os_types.h b/porting/npl/linux/src/os_types.h
index 5b978af..c88a3e8 100644
--- a/porting/npl/linux/src/os_types.h
+++ b/porting/npl/linux/src/os_types.h
@@ -38,8 +38,6 @@ typedef int32_t ble_npl_stime_t;
 //typedef int os_sr_t;
 typedef int ble_npl_stack_t;
 
-struct ble_npl_event;
-typedef void ble_npl_event_fn(struct ble_npl_event *ev);
 
 struct ble_npl_event {
     uint8_t                 ev_queued;
@@ -82,4 +80,6 @@ int ble_npl_task_remove(struct ble_npl_task *t);
 
 uint8_t ble_npl_task_count(void);
 
+void ble_npl_task_yield(void);
+
 #endif // _NPL_OS_TYPES_H


[mynewt-nimble] 01/03: [build] Adjust makefiles to support autotools integration.

Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit d15edf1282a9b0046989d97c2d4f8f86a61fb1c5
Author: Martin Turon <mt...@nestlabs.com>
AuthorDate: Thu Aug 23 18:39:33 2018 -0700

    [build] Adjust makefiles to support autotools integration.
---
 porting/nimble/Makefile.controller | 2 ++
 porting/nimble/Makefile.defs       | 5 +++++
 porting/nimble/Makefile.mesh       | 2 ++
 porting/nimble/Makefile.tinycrypt  | 2 ++
 4 files changed, 11 insertions(+)

diff --git a/porting/nimble/Makefile.controller b/porting/nimble/Makefile.controller
index b6e2ce4..8bc2c2a 100644
--- a/porting/nimble/Makefile.controller
+++ b/porting/nimble/Makefile.controller
@@ -22,6 +22,7 @@ NIMBLE_INCLUDE += \
 	$(NIMBLE_ROOT)/nimble/transport/ram/include \
 	$(NIMBLE_ROOT)/nimble/controller/include \
 	$(NIMBLE_ROOT)/nimble/drivers/nrf52/include \
+	$(NULL)
 
 NIMBLE_SRC += \
 	$(NIMBLE_ROOT)/nimble/transport/ram/src/ble_hci_ram.c \
@@ -45,3 +46,4 @@ NIMBLE_SRC += \
 	$(NIMBLE_ROOT)/porting/nimble/src/os_cputime.c \
 	$(NIMBLE_ROOT)/porting/nimble/src/os_cputime_pwr2.c \
 	$(NIMBLE_ROOT)/porting/nimble/src/hal_timer.c \
+	$(NULL)
diff --git a/porting/nimble/Makefile.defs b/porting/nimble/Makefile.defs
index 87e1cc7..3e0f7be 100644
--- a/porting/nimble/Makefile.defs
+++ b/porting/nimble/Makefile.defs
@@ -35,6 +35,7 @@ NIMBLE_INCLUDE := \
 	$(NIMBLE_ROOT)/nimble/host/store/ram/include \
 	$(NIMBLE_ROOT)/nimble/host/util/include \
 	$(NIMBLE_ROOT)/porting/nimble/include \
+	$(NULL)
 
 NIMBLE_SRC := \
 	$(NIMBLE_ROOT)/nimble/host/src/ble_att.c \
@@ -87,10 +88,13 @@ NIMBLE_SRC := \
 	$(NIMBLE_ROOT)/nimble/host/store/ram/src/ble_store_ram.c \
 	$(NIMBLE_ROOT)/nimble/host/util/src/addr.c \
 	$(NIMBLE_ROOT)/nimble/src/ble_util.c \
+	$(NIMBLE_ROOT)/nimble/src/hci_common.c \
+        $(NULL)
 
 # Few utils and data structures copied from Mynewt
 NIMBLE_SRC += \
 	$(NIMBLE_ROOT)/porting/nimble/src/nimble_port.c \
+	$(NULL)
 
 # Few utils and data structures copied from Mynewt
 NIMBLE_SRC += \
@@ -99,6 +103,7 @@ NIMBLE_SRC += \
 	$(NIMBLE_ROOT)/porting/nimble/src/os_mbuf.c \
 	$(NIMBLE_ROOT)/porting/nimble/src/os_mempool.c \
 	$(NIMBLE_ROOT)/porting/nimble/src/os_msys_init.c \
+	$(NULL)
 
 ifneq (,$(NIMBLE_CFG_CONTROLLER))
 include $(NIMBLE_ROOT)/porting/nimble/Makefile.controller
diff --git a/porting/nimble/Makefile.mesh b/porting/nimble/Makefile.mesh
index e4a8d47..2f47a78 100644
--- a/porting/nimble/Makefile.mesh
+++ b/porting/nimble/Makefile.mesh
@@ -17,6 +17,7 @@
 
 NIMBLE_INCLUDE += \
 	$(NIMBLE_ROOT)/nimble/host/mesh/include \
+	$(NULL)
 
 NIMBLE_SRC += \
 	$(NIMBLE_ROOT)/nimble/host/mesh/src/access.c \
@@ -40,3 +41,4 @@ NIMBLE_SRC += \
 	$(NIMBLE_ROOT)/nimble/host/mesh/src/shell.c \
 	$(NIMBLE_ROOT)/nimble/host/mesh/src/testing.c \
 	$(NIMBLE_ROOT)/nimble/host/mesh/src/transport.c \
+	$(NULL)
diff --git a/porting/nimble/Makefile.tinycrypt b/porting/nimble/Makefile.tinycrypt
index d074748..2acc131 100644
--- a/porting/nimble/Makefile.tinycrypt
+++ b/porting/nimble/Makefile.tinycrypt
@@ -19,6 +19,7 @@ TINYCRYPT_CFLAGS := -std=c99
 
 TINYCRYPT_INCLUDE := \
 	$(NIMBLE_ROOT)/ext/tinycrypt/include \
+	$(NULL)
 
 TINYCRYPT_SRC := \
 	$(NIMBLE_ROOT)/ext/tinycrypt/src/aes_decrypt.c \
@@ -27,3 +28,4 @@ TINYCRYPT_SRC := \
 	$(NIMBLE_ROOT)/ext/tinycrypt/src/ecc.c \
 	$(NIMBLE_ROOT)/ext/tinycrypt/src/ecc_dh.c \
 	$(NIMBLE_ROOT)/ext/tinycrypt/src/utils.c \
+	$(NULL)


[mynewt-nimble] 03/03: [linux] resolve merge conflict. Default to providing access to psm for l2cap coc connections.

Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit ef58876024218e488dcbc15c8631db016241ab1f
Author: Martin Turon <mt...@google.com>
AuthorDate: Mon Oct 29 14:55:43 2018 -0700

    [linux] resolve merge conflict.  Default to providing access to psm for l2cap coc connections.
---
 porting/examples/linux/include/syscfg/syscfg.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/porting/examples/linux/include/syscfg/syscfg.h b/porting/examples/linux/include/syscfg/syscfg.h
index 766d133..da4dd52 100644
--- a/porting/examples/linux/include/syscfg/syscfg.h
+++ b/porting/examples/linux/include/syscfg/syscfg.h
@@ -598,7 +598,7 @@
 #endif
 
 #ifndef MYNEWT_VAL_BLE_L2CAP_COC_MAX_NUM
-#define MYNEWT_VAL_BLE_L2CAP_COC_MAX_NUM (0)
+#define MYNEWT_VAL_BLE_L2CAP_COC_MAX_NUM (1)
 #endif
 
 #ifndef MYNEWT_VAL_BLE_L2CAP_JOIN_RX_FRAGS