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/07/18 18:38:38 UTC

[1/2] incubator-mynewt-core git commit: BLE Host - Only enable GATT procs for centrals.

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop 9e1b52051 -> 8e930a76d


BLE Host - Only enable GATT procs for centrals.


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

Branch: refs/heads/develop
Commit: 96c5e008a22617bd2c056ad717f1461d3d16f7fb
Parents: 9e1b520
Author: Christopher Collins <cc...@apache.org>
Authored: Mon Jul 18 11:26:01 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Mon Jul 18 11:26:01 2016 -0700

----------------------------------------------------------------------
 net/nimble/include/nimble/nimble_opt.h | 36 ++++++++++++++++-------------
 1 file changed, 20 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/96c5e008/net/nimble/include/nimble/nimble_opt.h
----------------------------------------------------------------------
diff --git a/net/nimble/include/nimble/nimble_opt.h b/net/nimble/include/nimble/nimble_opt.h
index f8b08cc..dd007e2 100644
--- a/net/nimble/include/nimble/nimble_opt.h
+++ b/net/nimble/include/nimble/nimble_opt.h
@@ -64,66 +64,70 @@
 #define NIMBLE_OPT_SM_SC                        0
 #endif
 
-/** HOST: Supported GATT procedures.  By default, all are enabled. */
+/**
+ * HOST: Supported GATT procedures.  By default:
+ *     o Notify and indicate are enabled;
+ *     o All other procedures are enabled for centrals.
+ */
 
 #ifndef NIMBLE_OPT_GATT_DISC_ALL_SVCS
-#define NIMBLE_OPT_GATT_DISC_ALL_SVCS           1
+#define NIMBLE_OPT_GATT_DISC_ALL_SVCS           NIMBLE_OPT_ROLE_CENTRAL
 #endif
 
 #ifndef NIMBLE_OPT_GATT_DISC_SVC_UUID
-#define NIMBLE_OPT_GATT_DISC_SVC_UUID           1
+#define NIMBLE_OPT_GATT_DISC_SVC_UUID           NIMBLE_OPT_ROLE_CENTRAL
 #endif
 
 #ifndef NIMBLE_OPT_GATT_FIND_INC_SVCS
-#define NIMBLE_OPT_GATT_FIND_INC_SVCS           1
+#define NIMBLE_OPT_GATT_FIND_INC_SVCS           NIMBLE_OPT_ROLE_CENTRAL
 #endif
 
 #ifndef NIMBLE_OPT_GATT_DISC_ALL_CHRS
-#define NIMBLE_OPT_GATT_DISC_ALL_CHRS           1
+#define NIMBLE_OPT_GATT_DISC_ALL_CHRS           NIMBLE_OPT_ROLE_CENTRAL
 #endif
 
 #ifndef NIMBLE_OPT_GATT_DISC_CHR_UUID
-#define NIMBLE_OPT_GATT_DISC_CHR_UUID           1
+#define NIMBLE_OPT_GATT_DISC_CHR_UUID           NIMBLE_OPT_ROLE_CENTRAL
 #endif
 
 #ifndef NIMBLE_OPT_GATT_DISC_ALL_DSCS
-#define NIMBLE_OPT_GATT_DISC_ALL_DSCS           1
+#define NIMBLE_OPT_GATT_DISC_ALL_DSCS           NIMBLE_OPT_ROLE_CENTRAL
 #endif
 
 #ifndef NIMBLE_OPT_GATT_READ
-#define NIMBLE_OPT_GATT_READ                    1
+#define NIMBLE_OPT_GATT_READ                    NIMBLE_OPT_ROLE_CENTRAL
 #endif
 
 #ifndef NIMBLE_OPT_GATT_READ_UUID
-#define NIMBLE_OPT_GATT_READ_UUID               1
+#define NIMBLE_OPT_GATT_READ_UUID               NIMBLE_OPT_ROLE_CENTRAL
 #endif
 
 #ifndef NIMBLE_OPT_GATT_READ_LONG
-#define NIMBLE_OPT_GATT_READ_LONG               1
+#define NIMBLE_OPT_GATT_READ_LONG               NIMBLE_OPT_ROLE_CENTRAL
 #endif
 
 #ifndef NIMBLE_OPT_GATT_READ_MULT
-#define NIMBLE_OPT_GATT_READ_MULT               1
+#define NIMBLE_OPT_GATT_READ_MULT               NIMBLE_OPT_ROLE_CENTRAL
 #endif
 
 #ifndef NIMBLE_OPT_GATT_WRITE_NO_RSP
-#define NIMBLE_OPT_GATT_WRITE_NO_RSP            1
+#define NIMBLE_OPT_GATT_WRITE_NO_RSP            NIMBLE_OPT_ROLE_CENTRAL
 #endif
 
 #ifndef NIMBLE_OPT_GATT_SIGNED_WRITE
-#define NIMBLE_OPT_GATT_SIGNED_WRITE            1
+#define NIMBLE_OPT_GATT_SIGNED_WRITE            NIMBLE_OPT_ROLE_CENTRAL
 #endif
 
 #ifndef NIMBLE_OPT_GATT_WRITE
-#define NIMBLE_OPT_GATT_WRITE                   1
+#define NIMBLE_OPT_GATT_WRITE                   NIMBLE_OPT_ROLE_CENTRAL
 #endif
 
 #ifndef NIMBLE_OPT_GATT_WRITE_LONG
-#define NIMBLE_OPT_GATT_WRITE_LONG              1
+#define NIMBLE_OPT_GATT_WRITE_LONG              NIMBLE_OPT_ROLE_CENTRAL
 #endif
 
 #ifndef NIMBLE_OPT_GATT_WRITE_RELIABLE
-#define NIMBLE_OPT_GATT_WRITE_RELIABLE          1
+#define NIMBLE_OPT_GATT_WRITE_RELIABLE          NIMBLE_OPT_ROLE_CENTRAL
 #endif
 
 #ifndef NIMBLE_OPT_GATT_NOTIFY


[2/2] incubator-mynewt-core git commit: bleprph - Compile out debug log / unused features.

Posted by cc...@apache.org.
bleprph - Compile out debug log / unused features.


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

Branch: refs/heads/develop
Commit: 8e930a76dfb515e0c08a8000a1bb418a1528a829
Parents: 96c5e00
Author: Christopher Collins <cc...@apache.org>
Authored: Mon Jul 18 11:37:45 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Mon Jul 18 11:37:45 2016 -0700

----------------------------------------------------------------------
 apps/bleprph/pkg.yml | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8e930a76/apps/bleprph/pkg.yml
----------------------------------------------------------------------
diff --git a/apps/bleprph/pkg.yml b/apps/bleprph/pkg.yml
index a63f8ea..4b0c0b3 100644
--- a/apps/bleprph/pkg.yml
+++ b/apps/bleprph/pkg.yml
@@ -31,3 +31,14 @@ pkg.deps:
     - net/nimble/host/store/ram
     - libs/console/full
     - libs/baselibc
+
+pkg.cflags:
+    # Use INFO log level to reduce code size.  DEBUG is too large for nRF51.
+    - "-DLOG_LEVEL=1"
+
+    # Disable unused roles; bleprph is a peripheral-only app.
+    - "-DNIMBLE_OPT_ROLE_OBSERVER=0"
+    - "-DNIMBLE_OPT_ROLE_CENTRAL=0"
+
+    # Disable unused eddystone feature.
+    - "-DNIMBLE_OPT_EDDYSTONE=0"