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/11/11 01:53:15 UTC

[1/3] incubator-mynewt-core git commit: ble_store_ram - Set the persist callbacks on init.

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/1_0_0_b1_dev 8fe1c8fbd -> 1b415207d


ble_store_ram - Set the persist callbacks on init.

Before this change, the app had to set the callbacks manually.  Now, the
callbacks get set automatically by sysinit.


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/f6992258
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/f6992258
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/f6992258

Branch: refs/heads/1_0_0_b1_dev
Commit: f6992258335baea527a48f28a3b543c286993828
Parents: 2567006
Author: Christopher Collins <cc...@apache.org>
Authored: Thu Nov 10 17:48:42 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Thu Nov 10 17:53:05 2016 -0800

----------------------------------------------------------------------
 net/nimble/host/store/ram/pkg.yml             | 3 +++
 net/nimble/host/store/ram/src/ble_store_ram.c | 7 +++++++
 2 files changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/f6992258/net/nimble/host/store/ram/pkg.yml
----------------------------------------------------------------------
diff --git a/net/nimble/host/store/ram/pkg.yml b/net/nimble/host/store/ram/pkg.yml
index f43e7a5..afa638f 100644
--- a/net/nimble/host/store/ram/pkg.yml
+++ b/net/nimble/host/store/ram/pkg.yml
@@ -29,3 +29,6 @@ pkg.keywords:
 
 pkg.deps:
     - net/nimble/host
+
+pkg.init_function: ble_store_ram_init
+pkg.init_stage: 5

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/f6992258/net/nimble/host/store/ram/src/ble_store_ram.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/store/ram/src/ble_store_ram.c b/net/nimble/host/store/ram/src/ble_store_ram.c
index e9142c7..b346f14 100644
--- a/net/nimble/host/store/ram/src/ble_store_ram.c
+++ b/net/nimble/host/store/ram/src/ble_store_ram.c
@@ -371,3 +371,10 @@ ble_store_ram_write(int obj_type, union ble_store_value *val)
         return BLE_HS_ENOTSUP;
     }
 }
+
+void
+ble_store_ram_init(void)
+{
+    ble_hs_cfg.store_read_cb = ble_store_ram_read;
+    ble_hs_cfg.store_write_cb = ble_store_ram_write;
+}


[3/3] incubator-mynewt-core git commit: ble apps - Don't set store callbacks manually.

Posted by cc...@apache.org.
ble apps - Don't set store callbacks manually.

These callbacks now get set automatically by sysinit; no need to set
them manually.


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/1b415207
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/1b415207
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/1b415207

Branch: refs/heads/1_0_0_b1_dev
Commit: 1b415207dd7f6e20ad5639c217bd6d2d3ca17ea4
Parents: f699225
Author: Christopher Collins <cc...@apache.org>
Authored: Thu Nov 10 17:51:46 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Thu Nov 10 17:53:06 2016 -0800

----------------------------------------------------------------------
 apps/blecent/src/main.c | 5 -----
 apps/bletiny/src/main.c | 5 -----
 apps/bleuart/src/main.c | 5 -----
 3 files changed, 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/1b415207/apps/blecent/src/main.c
----------------------------------------------------------------------
diff --git a/apps/blecent/src/main.c b/apps/blecent/src/main.c
index 4d52a0f..73be9bf 100755
--- a/apps/blecent/src/main.c
+++ b/apps/blecent/src/main.c
@@ -32,9 +32,6 @@
 /* RAM HCI transport. */
 #include "transport/ram/ble_hci_ram.h"
 
-/* RAM persistence layer. */
-#include "store/ram/ble_store_ram.h"
-
 /* Mandatory services. */
 #include "services/gap/ble_svc_gap.h"
 #include "services/gatt/ble_svc_gatt.h"
@@ -502,8 +499,6 @@ main(void)
                  LOG_SYSLEVEL);
     ble_hs_cfg.reset_cb = blecent_on_reset;
     ble_hs_cfg.sync_cb = blecent_on_sync;
-    ble_hs_cfg.store_read_cb = ble_store_ram_read;
-    ble_hs_cfg.store_write_cb = ble_store_ram_write;
 
     /* Initialize data structures to track connected peers. */
     rc = peer_init(MYNEWT_VAL(BLE_MAX_CONNECTIONS), 64, 64, 64);

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/1b415207/apps/bletiny/src/main.c
----------------------------------------------------------------------
diff --git a/apps/bletiny/src/main.c b/apps/bletiny/src/main.c
index 048a3c7..4ec6d5d 100755
--- a/apps/bletiny/src/main.c
+++ b/apps/bletiny/src/main.c
@@ -50,9 +50,6 @@
 /* RAM HCI transport. */
 #include "transport/ram/ble_hci_ram.h"
 
-/* RAM persistence layer. */
-#include "store/ram/ble_store_ram.h"
-
 /* Mandatory services. */
 #include "services/gap/ble_svc_gap.h"
 #include "services/gatt/ble_svc_gatt.h"
@@ -1623,8 +1620,6 @@ main(void)
     log_register("ble_hs", &ble_hs_log, &log_console_handler, NULL,
                  LOG_SYSLEVEL);
     ble_hs_cfg.reset_cb = bletiny_on_reset;
-    ble_hs_cfg.store_read_cb = ble_store_ram_read;
-    ble_hs_cfg.store_write_cb = ble_store_ram_write;
     ble_hs_cfg.gatts_register_cb = gatt_svr_register_cb;
 
     rc = gatt_svr_init();

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/1b415207/apps/bleuart/src/main.c
----------------------------------------------------------------------
diff --git a/apps/bleuart/src/main.c b/apps/bleuart/src/main.c
index d6fed4d..9772026 100755
--- a/apps/bleuart/src/main.c
+++ b/apps/bleuart/src/main.c
@@ -43,9 +43,6 @@
 /* RAM HCI transport. */
 #include "transport/ram/ble_hci_ram.h"
 
-/* RAM persistence layer. */
-#include "store/ram/ble_store_ram.h"
-
 /* Mandatory services. */
 #include "services/gap/ble_svc_gap.h"
 #include "services/gatt/ble_svc_gatt.h"
@@ -221,8 +218,6 @@ main(void)
     log_register("ble_hs", &ble_hs_log, &log_console_handler, NULL,
                  LOG_SYSLEVEL);
     ble_hs_cfg.sync_cb = bleuart_on_sync;
-    ble_hs_cfg.store_read_cb = ble_store_ram_read;
-    ble_hs_cfg.store_write_cb = ble_store_ram_write;
 
     rc = bleuart_gatt_svr_init();
     assert(rc == 0);


[2/3] incubator-mynewt-core git commit: bleprph - Remove unnecessary #include.

Posted by cc...@apache.org.
bleprph - Remove unnecessary #include.


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/25670062
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/25670062
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/25670062

Branch: refs/heads/1_0_0_b1_dev
Commit: 256700626a348501e87c1bbfa373021449275dc9
Parents: 8fe1c8f
Author: Christopher Collins <cc...@apache.org>
Authored: Thu Nov 10 17:48:04 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Thu Nov 10 17:53:05 2016 -0800

----------------------------------------------------------------------
 apps/bleprph/src/main.c | 2 --
 1 file changed, 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/25670062/apps/bleprph/src/main.c
----------------------------------------------------------------------
diff --git a/apps/bleprph/src/main.c b/apps/bleprph/src/main.c
index 3e0a818..a2fd879 100755
--- a/apps/bleprph/src/main.c
+++ b/apps/bleprph/src/main.c
@@ -37,8 +37,6 @@
 /* Application-specified header. */
 #include "bleprph.h"
 
-#include "nmgrble/newtmgr_ble.h"
-
 /** Log data. */
 struct log bleprph_log;