mynewt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject [01/13] incubator-mynewt-core git commit: nimble/host: Add generic BD address type
Date Wed, 08 Feb 2017 21:49:37 GMT
Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop 1d2d46b82 -> 4719b3f50


nimble/host: Add generic BD address type

Just a few minor fixes as the BLE_ADDR_TYPE_xxx macros were renamed BLE_ADDR_xxx
but not updated in all files.


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

Branch: refs/heads/develop
Commit: 6f99c8cc14f41a4381ebf5fcb035f6ac66e94c8e
Parents: ad4050f
Author: William San Filippo <wills@runtime.io>
Authored: Wed Feb 1 14:50:52 2017 -0800
Committer: William San Filippo <wills@runtime.io>
Committed: Wed Feb 1 14:50:52 2017 -0800

----------------------------------------------------------------------
 apps/blesplit/src/main.c             | 2 +-
 apps/bletest/src/main.c              | 2 +-
 apps/ocf_sample/src/ocf_ble.c        | 2 +-
 hw/drivers/nimble/nrf51/src/ble_hw.c | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/6f99c8cc/apps/blesplit/src/main.c
----------------------------------------------------------------------
diff --git a/apps/blesplit/src/main.c b/apps/blesplit/src/main.c
index 4643e1c..020934f 100755
--- a/apps/blesplit/src/main.c
+++ b/apps/blesplit/src/main.c
@@ -127,7 +127,7 @@ blesplit_advertise(void)
     memset(&adv_params, 0, sizeof adv_params);
     adv_params.conn_mode = BLE_GAP_CONN_MODE_UND;
     adv_params.disc_mode = BLE_GAP_DISC_MODE_GEN;
-    rc = ble_gap_adv_start(BLE_ADDR_TYPE_PUBLIC, 0, NULL, BLE_HS_FOREVER,
+    rc = ble_gap_adv_start(BLE_ADDR_PUBLIC, 0, NULL, BLE_HS_FOREVER,
                            &adv_params, blesplit_gap_event, NULL);
     if (rc != 0) {
         BLESPLIT_LOG(ERROR, "error enabling advertisement; rc=%d\n", rc);

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/6f99c8cc/apps/bletest/src/main.c
----------------------------------------------------------------------
diff --git a/apps/bletest/src/main.c b/apps/bletest/src/main.c
index 79f7e98..d56ec2b 100755
--- a/apps/bletest/src/main.c
+++ b/apps/bletest/src/main.c
@@ -649,7 +649,7 @@ bletest_init_scanner(void)
 #endif
         if (add_whitelist & 1) {
             rc = bletest_hci_le_add_to_whitelist(g_bletest_cur_peer_addr,
-                                                 BLE_ADDR_TYPE_RANDOM);
+                                                 BLE_ADDR_RANDOM);
             assert(rc == 0);
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/6f99c8cc/apps/ocf_sample/src/ocf_ble.c
----------------------------------------------------------------------
diff --git a/apps/ocf_sample/src/ocf_ble.c b/apps/ocf_sample/src/ocf_ble.c
index 21e015a..e52155d 100644
--- a/apps/ocf_sample/src/ocf_ble.c
+++ b/apps/ocf_sample/src/ocf_ble.c
@@ -145,7 +145,7 @@ ocf_ble_advertise(void)
     memset(&adv_params, 0, sizeof adv_params);
     adv_params.conn_mode = BLE_GAP_CONN_MODE_UND;
     adv_params.disc_mode = BLE_GAP_DISC_MODE_GEN;
-    rc = ble_gap_adv_start(BLE_ADDR_TYPE_PUBLIC, 0, NULL, BLE_HS_FOREVER,
+    rc = ble_gap_adv_start(BLE_ADDR_PUBLIC, 0, NULL, BLE_HS_FOREVER,
                            &adv_params, ocf_ble_gap_event, NULL);
     if (rc != 0) {
         OCF_BLE_LOG(ERROR, "error enabling advertisement; rc=%d\n", rc);

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/6f99c8cc/hw/drivers/nimble/nrf51/src/ble_hw.c
----------------------------------------------------------------------
diff --git a/hw/drivers/nimble/nrf51/src/ble_hw.c b/hw/drivers/nimble/nrf51/src/ble_hw.c
index bbd2a50..9f268cc 100644
--- a/hw/drivers/nimble/nrf51/src/ble_hw.c
+++ b/hw/drivers/nimble/nrf51/src/ble_hw.c
@@ -88,7 +88,7 @@ ble_hw_whitelist_add(uint8_t *addr, uint8_t addr_type)
         if ((mask & g_ble_hw_whitelist_mask) == 0) {
             NRF_RADIO->DAB[i] = get_le32(addr);
             NRF_RADIO->DAP[i] = get_le16(addr + 4);
-            if (addr_type == BLE_ADDR_TYPE_RANDOM) {
+            if (addr_type == BLE_ADDR_RANDOM) {
                 NRF_RADIO->DACNF |= (mask << 8);
             }
             g_ble_hw_whitelist_mask |= mask;
@@ -126,7 +126,7 @@ ble_hw_whitelist_rmv(uint8_t *addr, uint8_t addr_type)
         if (mask & g_ble_hw_whitelist_mask) {
             if ((dab == NRF_RADIO->DAB[i]) && (dap == NRF_RADIO->DAP[i])) {
                 cfg_addr = txadd & mask;
-                if (addr_type == BLE_ADDR_TYPE_RANDOM) {
+                if (addr_type == BLE_ADDR_RANDOM) {
                     if (cfg_addr != 0) {
                         break;
                     }


Mime
View raw message