You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/10/20 16:18:33 UTC

[3/4] incubator-mynewt-core git commit: sample apps - initialize nimble host log.

sample apps - initialize nimble host log.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/b2b72da0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/b2b72da0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/b2b72da0

Branch: refs/heads/develop
Commit: b2b72da0fa1525ef1d21273a38e42ed1665ae013
Parents: 4ae25f3
Author: Christopher Collins <cc...@apache.org>
Authored: Thu Oct 20 09:08:51 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Thu Oct 20 09:08:51 2016 -0700

----------------------------------------------------------------------
 apps/blecent/src/main.c      | 1 +
 apps/bleprph/src/main.c      | 1 +
 apps/bletest/src/main.c      | 2 ++
 apps/bletiny/src/main.c      | 1 +
 apps/bleuart/src/main.c      | 1 +
 apps/ocf_sample/src/main.c   | 1 +
 net/nimble/host/src/ble_hs.c | 7 -------
 7 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/b2b72da0/apps/blecent/src/main.c
----------------------------------------------------------------------
diff --git a/apps/blecent/src/main.c b/apps/blecent/src/main.c
index 0033e51..4ffc1aa 100755
--- a/apps/blecent/src/main.c
+++ b/apps/blecent/src/main.c
@@ -518,6 +518,7 @@ main(void)
                  blecent_stack, BLECENT_STACK_SIZE);
 
     /* Configure the host. */
+    log_register("ble_hs", &ble_hs_log, &log_console_handler, NULL, LOG_SYSLEVEL);
     ble_hs_cfg.parent_evq = &blecent_evq;
     ble_hs_cfg.reset_cb = blecent_on_reset;
     ble_hs_cfg.sync_cb = blecent_on_sync;

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/b2b72da0/apps/bleprph/src/main.c
----------------------------------------------------------------------
diff --git a/apps/bleprph/src/main.c b/apps/bleprph/src/main.c
index 40680f4..ce54e99 100755
--- a/apps/bleprph/src/main.c
+++ b/apps/bleprph/src/main.c
@@ -318,6 +318,7 @@ main(void)
                  bleprph_stack, BLEPRPH_STACK_SIZE);
 
     /* Initialize the NimBLE host configuration. */
+    log_register("ble_hs", &ble_hs_log, &log_console_handler, NULL, LOG_SYSLEVEL);
     ble_hs_cfg.parent_evq = &bleprph_evq;
     ble_hs_cfg.reset_cb = bleprph_on_reset;
     ble_hs_cfg.sync_cb = bleprph_on_sync;

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/b2b72da0/apps/bletest/src/main.c
----------------------------------------------------------------------
diff --git a/apps/bletest/src/main.c b/apps/bletest/src/main.c
index f626c2b..eb555ac 100755
--- a/apps/bletest/src/main.c
+++ b/apps/bletest/src/main.c
@@ -1061,6 +1061,8 @@ main(void)
     g_bletest_cur_peer_addr[5] = 0x08;
 #endif
 
+    log_register("ble_hs", &ble_hs_log, &log_console_handler, NULL, LOG_SYSLEVEL);
+
     /* Set the NimBLE host's parent event queue. */
     ble_hs_cfg.parent_evq = &g_bletest_evq;
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/b2b72da0/apps/bletiny/src/main.c
----------------------------------------------------------------------
diff --git a/apps/bletiny/src/main.c b/apps/bletiny/src/main.c
index fcb94fa..6a8275d 100755
--- a/apps/bletiny/src/main.c
+++ b/apps/bletiny/src/main.c
@@ -1636,6 +1636,7 @@ main(void)
                  bletiny_stack, BLETINY_STACK_SIZE);
 
     /* Initialize the NimBLE host configuration. */
+    log_register("ble_hs", &ble_hs_log, &log_console_handler, NULL, LOG_SYSLEVEL);
     ble_hs_cfg.parent_evq = &bletiny_evq;
     ble_hs_cfg.reset_cb = bletiny_on_reset;
     ble_hs_cfg.store_read_cb = ble_store_ram_read;

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/b2b72da0/apps/bleuart/src/main.c
----------------------------------------------------------------------
diff --git a/apps/bleuart/src/main.c b/apps/bleuart/src/main.c
index 932f1fc..5dc01e9 100755
--- a/apps/bleuart/src/main.c
+++ b/apps/bleuart/src/main.c
@@ -244,6 +244,7 @@ main(void)
                  bleuart_stack, bleuart_STACK_SIZE);
 
     /* Initialize the BLE host. */
+    log_register("ble_hs", &ble_hs_log, &log_console_handler, NULL, LOG_SYSLEVEL);
     ble_hs_cfg.parent_evq = &bleuart_evq;
     ble_hs_cfg.sync_cb = bleuart_on_sync;
     ble_hs_cfg.store_read_cb = ble_store_ram_read;

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/b2b72da0/apps/ocf_sample/src/main.c
----------------------------------------------------------------------
diff --git a/apps/ocf_sample/src/main.c b/apps/ocf_sample/src/main.c
index 037774c..bdd24a4 100644
--- a/apps/ocf_sample/src/main.c
+++ b/apps/ocf_sample/src/main.c
@@ -302,6 +302,7 @@ main(int argc, char **argv)
     assert(rc == 0);
 
     /* Initialize the BLE host. */
+    log_register("ble_hs", &ble_hs_log, &log_console_handler, NULL, LOG_SYSLEVEL);
     ble_hs_cfg.parent_evq = ev;
 #endif
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/b2b72da0/net/nimble/host/src/ble_hs.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_hs.c b/net/nimble/host/src/ble_hs.c
index 9b65984..dc9d0e5 100644
--- a/net/nimble/host/src/ble_hs.c
+++ b/net/nimble/host/src/ble_hs.c
@@ -563,13 +563,6 @@ ble_hs_init(void)
     int rc;
 
     log_init();
-#if 0
-    /*
-     * XXX This call to log_register should either move to an app or
-     * be configured in the BSP
-     */
-    log_register("ble_hs", &ble_hs_log, &log_console_handler, NULL, LOG_SYSLEVEL);
-#endif
 
     /* Create memory pool of OS events */
     rc = os_mempool_init(&ble_hs_hci_ev_pool, BLE_HS_HCI_EVT_COUNT,