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 2017/02/02 22:12:23 UTC
incubator-mynewt-core git commit: blesplit - Fix compiler errs after
host API chg.
Repository: incubator-mynewt-core
Updated Branches:
refs/heads/1_0_0_b2_dev 6f99c8cc1 -> 0d848ae98
blesplit - Fix compiler errs after host API chg.
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/0d848ae9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/0d848ae9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/0d848ae9
Branch: refs/heads/1_0_0_b2_dev
Commit: 0d848ae98a5ec8b222814c59e7fb3d51d370072b
Parents: 6f99c8c
Author: Christopher Collins <cc...@apache.org>
Authored: Thu Feb 2 14:12:00 2017 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Thu Feb 2 14:12:00 2017 -0800
----------------------------------------------------------------------
apps/blesplit/src/main.c | 34 ++++++++++++++++++----------------
1 file changed, 18 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/0d848ae9/apps/blesplit/src/main.c
----------------------------------------------------------------------
diff --git a/apps/blesplit/src/main.c b/apps/blesplit/src/main.c
index 020934f..711803f 100755
--- a/apps/blesplit/src/main.c
+++ b/apps/blesplit/src/main.c
@@ -51,24 +51,24 @@ static void
blesplit_print_conn_desc(struct ble_gap_conn_desc *desc)
{
BLESPLIT_LOG(INFO, "handle=%d our_ota_addr_type=%d our_ota_addr=",
- desc->conn_handle, desc->our_ota_addr_type);
- print_addr(desc->our_ota_addr);
+ desc->conn_handle, desc->our_ota_addr.type);
+ print_addr(desc->our_ota_addr.val);
BLESPLIT_LOG(INFO, " our_id_addr_type=%d our_id_addr=",
- desc->our_id_addr_type);
- print_addr(desc->our_id_addr);
+ desc->our_id_addr.type);
+ print_addr(desc->our_id_addr.val);
BLESPLIT_LOG(INFO, " peer_ota_addr_type=%d peer_ota_addr=",
- desc->peer_ota_addr_type);
- print_addr(desc->peer_ota_addr);
+ desc->peer_ota_addr.type);
+ print_addr(desc->peer_ota_addr.val);
BLESPLIT_LOG(INFO, " peer_id_addr_type=%d peer_id_addr=",
- desc->peer_id_addr_type);
- print_addr(desc->peer_id_addr);
+ desc->peer_id_addr.type);
+ print_addr(desc->peer_id_addr.val);
BLESPLIT_LOG(INFO, " conn_itvl=%d conn_latency=%d supervision_timeout=%d "
- "encrypted=%d authenticated=%d bonded=%d\n",
- desc->conn_itvl, desc->conn_latency,
- desc->supervision_timeout,
- desc->sec_state.encrypted,
- desc->sec_state.authenticated,
- desc->sec_state.bonded);
+ "encrypted=%d authenticated=%d bonded=%d\n",
+ desc->conn_itvl, desc->conn_latency,
+ desc->supervision_timeout,
+ desc->sec_state.encrypted,
+ desc->sec_state.authenticated,
+ desc->sec_state.bonded);
}
/**
@@ -113,7 +113,9 @@ blesplit_advertise(void)
fields.name_len = strlen(name);
fields.name_is_complete = 1;
- fields.uuids16 = (uint16_t[]){ GATT_SVR_SVC_ALERT_UUID };
+ fields.uuids16 = (ble_uuid16_t[]){
+ BLE_UUID16_INIT(GATT_SVR_SVC_ALERT_UUID)
+ };
fields.num_uuids16 = 1;
fields.uuids16_is_complete = 1;
@@ -127,7 +129,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_PUBLIC, 0, NULL, BLE_HS_FOREVER,
+ rc = ble_gap_adv_start(BLE_ADDR_PUBLIC, NULL, BLE_HS_FOREVER,
&adv_params, blesplit_gap_event, NULL);
if (rc != 0) {
BLESPLIT_LOG(ERROR, "error enabling advertisement; rc=%d\n", rc);