From 95ce01c7bfaabbc54976e55d0b5d0603f440d97a Mon Sep 17 00:00:00 2001 From: Deomid Ryabkov Date: Sun, 16 Dec 2018 13:21:30 +0000 Subject: [PATCH] mJS wrapper for GATTC API Plus some tweaks to APIs to make them more consistent CL: mJS wrapper for GATTC API PUBLISHED_FROM=844b56505fa25c180c04b91103a3b14e7fe224b8 --- src/mgos_rpc_channel_gatts.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mgos_rpc_channel_gatts.c b/src/mgos_rpc_channel_gatts.c index 1223aa1..463e611 100644 --- a/src/mgos_rpc_channel_gatts.c +++ b/src/mgos_rpc_channel_gatts.c @@ -156,7 +156,7 @@ static enum mgos_bt_gatt_status mgos_bt_rpc_svc_ev(struct mgos_bt_gatts_conn *c, ch->ev_handler(ch, MG_RPC_CHANNEL_OPEN, NULL); return MGOS_BT_GATT_STATUS_OK; } - case MGOS_BT_GATTS_EV_CLOSE: { + case MGOS_BT_GATTS_EV_DISCONNECT: { struct mg_rpc_channel *ch = (struct mg_rpc_channel *) c->user_data; struct mg_rpc_gatts_ch_data *chd = (struct mg_rpc_gatts_ch_data *) ch->channel_data; @@ -300,17 +300,17 @@ static enum mgos_bt_gatt_status mgos_bt_rpc_tx_ctl_ev( static const struct mgos_bt_gatts_char_def s_rpc_svc_def[] = { { .uuid = "5f6d4f53-5f52-5043-5f64-6174615f5f5f", /* _mOS_RPC_data___ */ - .prop = MGOS_BT_GATTS_PROP_RWNI(1, 1, 0, 0), + .prop = MGOS_BT_GATT_PROP_RWNI(1, 1, 0, 0), .handler = mgos_bt_rpc_data_ev, }, { .uuid = "5f6d4f53-5f52-5043-5f72-785f63746c5f", /* _mOS_RPC_rx_ctl_ */ - .prop = MGOS_BT_GATTS_PROP_RWNI(1, 0, 1, 1), + .prop = MGOS_BT_GATT_PROP_RWNI(1, 0, 1, 1), .handler = mgos_bt_rpc_rx_ctl_ev, }, { .uuid = "5f6d4f53-5f52-5043-5f74-785f63746c5f", /* _mOS_RPC_tx_ctl_ */ - .prop = MGOS_BT_GATTS_PROP_RWNI(0, 1, 0, 0), + .prop = MGOS_BT_GATT_PROP_RWNI(0, 1, 0, 0), .handler = mgos_bt_rpc_tx_ctl_ev, }, {.uuid = NULL},