Change GATT notify/indicate from gattc to gatts

This commit is contained in:
baohongde
2022-03-21 10:06:09 +01:00
committed by Szymon Janc
parent 336eff834e
commit ade6169bb2
15 changed files with 98 additions and 39 deletions
+2 -2
View File
@@ -264,7 +264,7 @@ gatt_svr_chr_access_sc_control_point(uint16_t conn_handle,
} }
#endif #endif
rc = ble_gattc_indicate_custom(conn_handle, csc_control_point_handle, rc = ble_gatts_indicate_custom(conn_handle, csc_control_point_handle,
om_indication); om_indication);
return rc; return rc;
@@ -321,7 +321,7 @@ gatt_svr_chr_notify_csc_measurement(uint16_t conn_handle)
om = ble_hs_mbuf_from_flat(data_buf, data_offset); om = ble_hs_mbuf_from_flat(data_buf, data_offset);
rc = ble_gattc_notify_custom(conn_handle, csc_measurement_handle, om); rc = ble_gatts_notify_custom(conn_handle, csc_measurement_handle, om);
return rc; return rc;
} }
+1 -1
View File
@@ -146,7 +146,7 @@ blehr_tx_hrate(struct os_event *ev)
om = ble_hs_mbuf_from_flat(hrm, sizeof(hrm)); om = ble_hs_mbuf_from_flat(hrm, sizeof(hrm));
rc = ble_gattc_notify_custom(conn_handle, hrs_hrm_handle, om); rc = ble_gatts_notify_custom(conn_handle, hrs_hrm_handle, om);
assert(rc == 0); assert(rc == 0);
blehr_tx_hrate_reset(); blehr_tx_hrate_reset();
+4 -4
View File
@@ -1005,7 +1005,7 @@ rx_stress_12_gap_event(struct ble_gap_event *event, void *arg)
rx_stress_ctx->begin_us = os_get_uptime_usec(); rx_stress_ctx->begin_us = os_get_uptime_usec();
om = os_msys_get_pkthdr(om_len, 0); om = os_msys_get_pkthdr(om_len, 0);
stress_fill_mbuf_with_pattern(om, om_len); stress_fill_mbuf_with_pattern(om, om_len);
rc = ble_gattc_indicate_custom(rx_stress_ctx->conn_handle, hrs_hrm_handle, rc = ble_gatts_indicate_custom(rx_stress_ctx->conn_handle, hrs_hrm_handle,
om); om);
assert(rc == 0); assert(rc == 0);
return 0; return 0;
@@ -1020,7 +1020,7 @@ rx_stress_13_notify_ev_func(struct ble_npl_event *ev)
int rc; int rc;
om = ble_hs_mbuf_from_flat(test_6_pattern, 10); om = ble_hs_mbuf_from_flat(test_6_pattern, 10);
rc = ble_gattc_notify_custom(rx_stress_ctx->conn_handle, rc = ble_gatts_notify_custom(rx_stress_ctx->conn_handle,
hrs_hrm_handle, om); hrs_hrm_handle, om);
assert(rc == 0); assert(rc == 0);
@@ -1142,7 +1142,7 @@ rx_stress_14_gap_event(struct ble_gap_event *event, void *arg)
/* Notify data pattern */ /* Notify data pattern */
om = ble_hs_mbuf_from_flat(test_6_pattern, bytes_num); om = ble_hs_mbuf_from_flat(test_6_pattern, bytes_num);
rc = ble_gattc_notify_custom(rx_stress_ctx->conn_handle, rc = ble_gatts_notify_custom(rx_stress_ctx->conn_handle,
hrs_hrm_handle, om); hrs_hrm_handle, om);
assert(rc == 0); assert(rc == 0);
@@ -1459,7 +1459,7 @@ rx_stress_main_task_fn(void *arg)
if (i == 7 || i == 8 || i == 13) { if (i == 7 || i == 8 || i == 13) {
/* 7,8: PHY update tests cause that the device during the next test /* 7,8: PHY update tests cause that the device during the next test
* will stuck somewhere and will reset. Skip them for now. * will stuck somewhere and will reset. Skip them for now.
* 13: Should work after fixing ble_gattc_notify_custom (nimble issue on GitHub)*/ * 13: Should work after fixing ble_gatts_notify_custom (nimble issue on GitHub)*/
continue; continue;
} }
/* Start test. */ /* Start test. */
+2 -2
View File
@@ -1978,12 +1978,12 @@ void notify_test(struct os_event *ev)
om = ble_hs_mbuf_from_flat(ntf, sizeof(ntf)); om = ble_hs_mbuf_from_flat(ntf, sizeof(ntf));
if (notify_state) { if (notify_state) {
rc = ble_gattc_notify_custom(myconn_handle, notify_handle, om); rc = ble_gatts_notify_custom(myconn_handle, notify_handle, om);
assert(rc == 0); assert(rc == 0);
} }
if (indicate_state) { if (indicate_state) {
rc = ble_gattc_indicate_custom(myconn_handle, notify_handle, om); rc = ble_gatts_indicate_custom(myconn_handle, notify_handle, om);
assert(rc == 0); assert(rc == 0);
} }
} }
+21
View File
@@ -470,6 +470,12 @@ int ble_gattc_write_reliable(uint16_t conn_handle,
* *
* @return 0 on success; nonzero on failure. * @return 0 on success; nonzero on failure.
*/ */
int ble_gatts_notify_custom(uint16_t conn_handle, uint16_t att_handle,
struct os_mbuf *om);
/**
* Deprecated. Should not be used. Use ble_gatts_notify_custom instead.
*/
int ble_gattc_notify_custom(uint16_t conn_handle, uint16_t att_handle, int ble_gattc_notify_custom(uint16_t conn_handle, uint16_t att_handle,
struct os_mbuf *om); struct os_mbuf *om);
@@ -485,6 +491,11 @@ int ble_gattc_notify_custom(uint16_t conn_handle, uint16_t att_handle,
* *
* @return 0 on success; nonzero on failure. * @return 0 on success; nonzero on failure.
*/ */
int ble_gatts_notify(uint16_t conn_handle, uint16_t chr_val_handle);
/**
* Deprecated. Should not be used. Use ble_gatts_notify instead.
*/
int ble_gattc_notify(uint16_t conn_handle, uint16_t chr_val_handle); int ble_gattc_notify(uint16_t conn_handle, uint16_t chr_val_handle);
/** /**
@@ -501,6 +512,11 @@ int ble_gattc_notify(uint16_t conn_handle, uint16_t chr_val_handle);
* *
* @return 0 on success; nonzero on failure. * @return 0 on success; nonzero on failure.
*/ */
int ble_gatts_indicate_custom(uint16_t conn_handle, uint16_t chr_val_handle,
struct os_mbuf *txom);
/**
* Deprecated. Should not be used. Use ble_gatts_indicate_custom instead.
*/
int ble_gattc_indicate_custom(uint16_t conn_handle, uint16_t chr_val_handle, int ble_gattc_indicate_custom(uint16_t conn_handle, uint16_t chr_val_handle,
struct os_mbuf *txom); struct os_mbuf *txom);
@@ -516,6 +532,11 @@ int ble_gattc_indicate_custom(uint16_t conn_handle, uint16_t chr_val_handle,
* *
* @return 0 on success; nonzero on failure. * @return 0 on success; nonzero on failure.
*/ */
int ble_gatts_indicate(uint16_t conn_handle, uint16_t chr_val_handle);
/**
* Deprecated. Should not be used. Use ble_gatts_indicate instead.
*/
int ble_gattc_indicate(uint16_t conn_handle, uint16_t chr_val_handle); int ble_gattc_indicate(uint16_t conn_handle, uint16_t chr_val_handle);
int ble_gattc_init(void); int ble_gattc_init(void);
+1 -1
View File
@@ -409,7 +409,7 @@ static int gatt_send(uint16_t conn_handle,
BT_DBG("%u bytes: %s", len, bt_hex(data, len)); BT_DBG("%u bytes: %s", len, bt_hex(data, len));
om = ble_hs_mbuf_from_flat(data, len); om = ble_hs_mbuf_from_flat(data, len);
assert(om); assert(om);
err = ble_gattc_notify_custom(conn_handle, svc_handles.prov_data_out_h, om); err = ble_gatts_notify_custom(conn_handle, svc_handles.prov_data_out_h, om);
notify_complete(); notify_complete();
if (!err) { if (!err) {
+1 -1
View File
@@ -875,7 +875,7 @@ static int proxy_send(uint16_t conn_handle,
om = ble_hs_mbuf_from_flat(data, len); om = ble_hs_mbuf_from_flat(data, len);
assert(om); assert(om);
err = ble_gattc_notify_custom(conn_handle, svc_handles.proxy_data_out_h, om); err = ble_gatts_notify_custom(conn_handle, svc_handles.proxy_data_out_h, om);
notify_complete(); notify_complete();
if (!err) { if (!err) {
+2 -2
View File
@@ -390,7 +390,7 @@ ble_svc_ans_new_alert_notify(uint8_t cat_id, const char * info_str)
memcpy(&ble_svc_ans_new_alert_val[2], info_str, info_str_len); memcpy(&ble_svc_ans_new_alert_val[2], info_str, info_str_len);
} }
} }
return ble_gattc_notify(ble_svc_ans_conn_handle, return ble_gatts_notify(ble_svc_ans_conn_handle,
ble_svc_ans_new_alert_val_handle); ble_svc_ans_new_alert_val_handle);
} }
@@ -407,7 +407,7 @@ ble_svc_ans_unr_alert_notify(uint8_t cat_id)
{ {
ble_svc_ans_unr_alert_stat[0] = cat_id; ble_svc_ans_unr_alert_stat[0] = cat_id;
ble_svc_ans_unr_alert_stat[1] = ble_svc_ans_unr_alert_cnt[cat_id]; ble_svc_ans_unr_alert_stat[1] = ble_svc_ans_unr_alert_cnt[cat_id];
return ble_gattc_notify(ble_svc_ans_conn_handle, return ble_gatts_notify(ble_svc_ans_conn_handle,
ble_svc_ans_unr_alert_val_handle); ble_svc_ans_unr_alert_val_handle);
} }
+1 -1
View File
@@ -165,7 +165,7 @@ bleuart_uart_read(void)
if (!om) { if (!om) {
return; return;
} }
ble_gattc_notify_custom(g_console_conn_handle, ble_gatts_notify_custom(g_console_conn_handle,
g_bleuart_attr_read_handle, om); g_bleuart_attr_read_handle, om);
off = 0; off = 0;
break; break;
+1 -1
View File
@@ -952,7 +952,7 @@ ble_att_clt_rx_indicate(uint16_t conn_handle, struct os_mbuf **rxom)
#endif #endif
/* No payload. */ /* No payload. */
ble_gattc_rx_indicate_rsp(conn_handle); ble_gatts_rx_indicate_rsp(conn_handle);
return 0; return 0;
} }
+1 -1
View File
@@ -125,7 +125,7 @@ void ble_gattc_rx_prep_write_rsp(uint16_t conn_handle, int status,
uint16_t handle, uint16_t offset, uint16_t handle, uint16_t offset,
struct os_mbuf **rxom); struct os_mbuf **rxom);
void ble_gattc_rx_exec_write_rsp(uint16_t conn_handle, int status); void ble_gattc_rx_exec_write_rsp(uint16_t conn_handle, int status);
void ble_gattc_rx_indicate_rsp(uint16_t conn_handle); void ble_gatts_rx_indicate_rsp(uint16_t conn_handle);
void ble_gattc_rx_find_info_idata(uint16_t conn_handle, void ble_gattc_rx_find_info_idata(uint16_t conn_handle,
struct ble_att_find_info_idata *idata); struct ble_att_find_info_idata *idata);
void ble_gattc_rx_find_info_complete(uint16_t conn_handle, int status); void ble_gattc_rx_find_info_complete(uint16_t conn_handle, int status);
+52 -14
View File
@@ -233,7 +233,7 @@ static ble_gattc_err_fn ble_gattc_read_mult_err;
static ble_gattc_err_fn ble_gattc_write_err; static ble_gattc_err_fn ble_gattc_write_err;
static ble_gattc_err_fn ble_gattc_write_long_err; static ble_gattc_err_fn ble_gattc_write_long_err;
static ble_gattc_err_fn ble_gattc_write_reliable_err; static ble_gattc_err_fn ble_gattc_write_reliable_err;
static ble_gattc_err_fn ble_gattc_indicate_err; static ble_gattc_err_fn ble_gatts_indicate_err;
static ble_gattc_err_fn * const ble_gattc_err_dispatch[BLE_GATT_OP_CNT] = { static ble_gattc_err_fn * const ble_gattc_err_dispatch[BLE_GATT_OP_CNT] = {
[BLE_GATT_OP_MTU] = ble_gattc_mtu_err, [BLE_GATT_OP_MTU] = ble_gattc_mtu_err,
@@ -250,7 +250,7 @@ static ble_gattc_err_fn * const ble_gattc_err_dispatch[BLE_GATT_OP_CNT] = {
[BLE_GATT_OP_WRITE] = ble_gattc_write_err, [BLE_GATT_OP_WRITE] = ble_gattc_write_err,
[BLE_GATT_OP_WRITE_LONG] = ble_gattc_write_long_err, [BLE_GATT_OP_WRITE_LONG] = ble_gattc_write_long_err,
[BLE_GATT_OP_WRITE_RELIABLE] = ble_gattc_write_reliable_err, [BLE_GATT_OP_WRITE_RELIABLE] = ble_gattc_write_reliable_err,
[BLE_GATT_OP_INDICATE] = ble_gattc_indicate_err, [BLE_GATT_OP_INDICATE] = ble_gatts_indicate_err,
}; };
/** /**
@@ -308,7 +308,7 @@ static ble_gattc_tmo_fn ble_gattc_read_mult_tmo;
static ble_gattc_tmo_fn ble_gattc_write_tmo; static ble_gattc_tmo_fn ble_gattc_write_tmo;
static ble_gattc_tmo_fn ble_gattc_write_long_tmo; static ble_gattc_tmo_fn ble_gattc_write_long_tmo;
static ble_gattc_tmo_fn ble_gattc_write_reliable_tmo; static ble_gattc_tmo_fn ble_gattc_write_reliable_tmo;
static ble_gattc_tmo_fn ble_gattc_indicate_tmo; static ble_gattc_tmo_fn ble_gatts_indicate_tmo;
static ble_gattc_tmo_fn * const static ble_gattc_tmo_fn * const
ble_gattc_tmo_dispatch[BLE_GATT_OP_CNT] = { ble_gattc_tmo_dispatch[BLE_GATT_OP_CNT] = {
@@ -326,7 +326,7 @@ ble_gattc_tmo_dispatch[BLE_GATT_OP_CNT] = {
[BLE_GATT_OP_WRITE] = ble_gattc_write_tmo, [BLE_GATT_OP_WRITE] = ble_gattc_write_tmo,
[BLE_GATT_OP_WRITE_LONG] = ble_gattc_write_long_tmo, [BLE_GATT_OP_WRITE_LONG] = ble_gattc_write_long_tmo,
[BLE_GATT_OP_WRITE_RELIABLE] = ble_gattc_write_reliable_tmo, [BLE_GATT_OP_WRITE_RELIABLE] = ble_gattc_write_reliable_tmo,
[BLE_GATT_OP_INDICATE] = ble_gattc_indicate_tmo, [BLE_GATT_OP_INDICATE] = ble_gatts_indicate_tmo,
}; };
/** /**
@@ -4153,7 +4153,7 @@ done:
*****************************************************************************/ *****************************************************************************/
int int
ble_gattc_notify_custom(uint16_t conn_handle, uint16_t chr_val_handle, ble_gatts_notify_custom(uint16_t conn_handle, uint16_t chr_val_handle,
struct os_mbuf *txom) struct os_mbuf *txom)
{ {
#if !MYNEWT_VAL(BLE_GATT_NOTIFY) #if !MYNEWT_VAL(BLE_GATT_NOTIFY)
@@ -4203,8 +4203,18 @@ done:
return rc; return rc;
} }
/**
* Deprecated. Should not be used. Use ble_gatts_notify_custom instead.
*/
int int
ble_gattc_notify(uint16_t conn_handle, uint16_t chr_val_handle) ble_gattc_notify_custom(uint16_t conn_handle, uint16_t chr_val_handle,
struct os_mbuf *txom)
{
return ble_gatts_notify_custom(conn_handle, chr_val_handle, txom);
}
int
ble_gatts_notify(uint16_t conn_handle, uint16_t chr_val_handle)
{ {
#if !MYNEWT_VAL(BLE_GATT_NOTIFY) #if !MYNEWT_VAL(BLE_GATT_NOTIFY)
return BLE_HS_ENOTSUP; return BLE_HS_ENOTSUP;
@@ -4212,11 +4222,20 @@ ble_gattc_notify(uint16_t conn_handle, uint16_t chr_val_handle)
int rc; int rc;
rc = ble_gattc_notify_custom(conn_handle, chr_val_handle, NULL); rc = ble_gatts_notify_custom(conn_handle, chr_val_handle, NULL);
return rc; return rc;
} }
/**
* Deprecated. Should not be used. Use ble_gatts_notify instead.
*/
int
ble_gattc_notify(uint16_t conn_handle, uint16_t chr_val_handle)
{
return ble_gatts_notify(conn_handle, chr_val_handle);
}
/***************************************************************************** /*****************************************************************************
* $indicate * * $indicate *
*****************************************************************************/ *****************************************************************************/
@@ -4228,7 +4247,7 @@ ble_gattc_notify(uint16_t conn_handle, uint16_t chr_val_handle)
* error status to the application. * error status to the application.
*/ */
static void static void
ble_gattc_indicate_err(struct ble_gattc_proc *proc, int status, ble_gatts_indicate_err(struct ble_gattc_proc *proc, int status,
uint16_t att_handle) uint16_t att_handle)
{ {
int rc; int rc;
@@ -4252,7 +4271,7 @@ ble_gattc_indicate_err(struct ble_gattc_proc *proc, int status,
} }
static void static void
ble_gattc_indicate_tmo(struct ble_gattc_proc *proc) ble_gatts_indicate_tmo(struct ble_gattc_proc *proc)
{ {
BLE_HS_DBG_ASSERT(!ble_hs_locked_by_cur_task()); BLE_HS_DBG_ASSERT(!ble_hs_locked_by_cur_task());
ble_gattc_dbg_assert_proc_not_inserted(proc); ble_gattc_dbg_assert_proc_not_inserted(proc);
@@ -4266,7 +4285,7 @@ ble_gattc_indicate_tmo(struct ble_gattc_proc *proc)
* proc. * proc.
*/ */
static void static void
ble_gattc_indicate_rx_rsp(struct ble_gattc_proc *proc) ble_gatts_indicate_rx_rsp(struct ble_gattc_proc *proc)
{ {
int rc; int rc;
@@ -4297,7 +4316,7 @@ ble_gatts_indicate_fail_notconn(uint16_t conn_handle)
} }
int int
ble_gattc_indicate_custom(uint16_t conn_handle, uint16_t chr_val_handle, ble_gatts_indicate_custom(uint16_t conn_handle, uint16_t chr_val_handle,
struct os_mbuf *txom) struct os_mbuf *txom)
{ {
#if !MYNEWT_VAL(BLE_GATT_INDICATE) #if !MYNEWT_VAL(BLE_GATT_INDICATE)
@@ -4369,10 +4388,29 @@ done:
return rc; return rc;
} }
/**
* Deprecated. Should not be used. Use ble_gatts_indicate_custom instead.
*/
int
ble_gattc_indicate_custom(uint16_t conn_handle, uint16_t chr_val_handle,
struct os_mbuf *txom)
{
return ble_gatts_indicate_custom(conn_handle, chr_val_handle, txom);
}
int
ble_gatts_indicate(uint16_t conn_handle, uint16_t chr_val_handle)
{
return ble_gatts_indicate_custom(conn_handle, chr_val_handle, NULL);
}
/**
* Deprecated. Should not be used. Use ble_gatts_indicate instead.
*/
int int
ble_gattc_indicate(uint16_t conn_handle, uint16_t chr_val_handle) ble_gattc_indicate(uint16_t conn_handle, uint16_t chr_val_handle)
{ {
return ble_gattc_indicate_custom(conn_handle, chr_val_handle, NULL); return ble_gatts_indicate(conn_handle, chr_val_handle);
} }
/***************************************************************************** /*****************************************************************************
@@ -4743,7 +4781,7 @@ ble_gattc_rx_exec_write_rsp(uint16_t conn_handle, int status)
* active GATT procedure. * active GATT procedure.
*/ */
void void
ble_gattc_rx_indicate_rsp(uint16_t conn_handle) ble_gatts_rx_indicate_rsp(uint16_t conn_handle)
{ {
#if !NIMBLE_BLE_ATT_CLT_INDICATE #if !NIMBLE_BLE_ATT_CLT_INDICATE
return; return;
@@ -4754,7 +4792,7 @@ ble_gattc_rx_indicate_rsp(uint16_t conn_handle)
proc = ble_gattc_extract_first_by_conn_op(conn_handle, proc = ble_gattc_extract_first_by_conn_op(conn_handle,
BLE_GATT_OP_INDICATE); BLE_GATT_OP_INDICATE);
if (proc != NULL) { if (proc != NULL) {
ble_gattc_indicate_rx_rsp(proc); ble_gatts_indicate_rx_rsp(proc);
ble_gattc_process_status(proc, BLE_HS_EDONE); ble_gattc_process_status(proc, BLE_HS_EDONE);
} }
} }
+5 -5
View File
@@ -1397,7 +1397,7 @@ ble_gatts_send_next_indicate(uint16_t conn_handle)
return BLE_HS_ENOENT; return BLE_HS_ENOENT;
} }
rc = ble_gattc_indicate(conn_handle, chr_val_handle); rc = ble_gatts_indicate(conn_handle, chr_val_handle);
if (rc != 0) { if (rc != 0) {
return rc; return rc;
} }
@@ -1635,11 +1635,11 @@ ble_gatts_tx_notifications_one_chr(uint16_t chr_val_handle)
break; break;
case BLE_ATT_OP_NOTIFY_REQ: case BLE_ATT_OP_NOTIFY_REQ:
ble_gattc_notify(conn_handle, chr_val_handle); ble_gatts_notify(conn_handle, chr_val_handle);
break; break;
case BLE_ATT_OP_INDICATE_REQ: case BLE_ATT_OP_INDICATE_REQ:
ble_gattc_indicate(conn_handle, chr_val_handle); ble_gatts_indicate(conn_handle, chr_val_handle);
break; break;
default: default:
@@ -1782,7 +1782,7 @@ ble_gatts_bonding_restored(uint16_t conn_handle)
break; break;
case BLE_ATT_OP_NOTIFY_REQ: case BLE_ATT_OP_NOTIFY_REQ:
rc = ble_gattc_notify(conn_handle, cccd_value.chr_val_handle); rc = ble_gatts_notify(conn_handle, cccd_value.chr_val_handle);
if (rc == 0) { if (rc == 0) {
cccd_value.value_changed = 0; cccd_value.value_changed = 0;
ble_store_write_cccd(&cccd_value); ble_store_write_cccd(&cccd_value);
@@ -1790,7 +1790,7 @@ ble_gatts_bonding_restored(uint16_t conn_handle)
break; break;
case BLE_ATT_OP_INDICATE_REQ: case BLE_ATT_OP_INDICATE_REQ:
ble_gattc_indicate(conn_handle, cccd_value.chr_val_handle); ble_gatts_indicate(conn_handle, cccd_value.chr_val_handle);
break; break;
default: default:
+2 -2
View File
@@ -485,7 +485,7 @@ TEST_CASE_SELF(ble_gatt_conn_test_disconnect)
3, &attr, 1, ble_gatt_conn_test_write_rel_cb, &write_rel_arg); 3, &attr, 1, ble_gatt_conn_test_write_rel_cb, &write_rel_arg);
TEST_ASSERT_FATAL(rc == 0); TEST_ASSERT_FATAL(rc == 0);
rc = ble_gattc_indicate(3, attr_handle); rc = ble_gatts_indicate(3, attr_handle);
TEST_ASSERT_FATAL(rc == 0); TEST_ASSERT_FATAL(rc == 0);
/*** Start the procedures. */ /*** Start the procedures. */
@@ -732,7 +732,7 @@ TEST_CASE_SELF(ble_gatt_conn_test_timeout)
/*** Indication. */ /*** Indication. */
ble_hs_test_util_create_conn(1, peer_addr, NULL, NULL); ble_hs_test_util_create_conn(1, peer_addr, NULL, NULL);
rc = ble_gattc_indicate(1, attr_handle); rc = ble_gatts_indicate(1, attr_handle);
TEST_ASSERT_FATAL(rc == 0); TEST_ASSERT_FATAL(rc == 0);
ble_gatt_conn_test_util_timeout(1, NULL); ble_gatt_conn_test_util_timeout(1, NULL);
+2 -2
View File
@@ -586,7 +586,7 @@ TEST_CASE_SELF(ble_gatts_notify_test_n)
om = ble_hs_mbuf_from_flat(fourbytes, sizeof fourbytes); om = ble_hs_mbuf_from_flat(fourbytes, sizeof fourbytes);
TEST_ASSERT_FATAL(om != NULL); TEST_ASSERT_FATAL(om != NULL);
rc = ble_gattc_notify_custom(conn_handle, rc = ble_gatts_notify_custom(conn_handle,
ble_gatts_notify_test_chr_1_def_handle + 1, ble_gatts_notify_test_chr_1_def_handle + 1,
om); om);
TEST_ASSERT_FATAL(rc == 0); TEST_ASSERT_FATAL(rc == 0);
@@ -675,7 +675,7 @@ TEST_CASE_SELF(ble_gatts_notify_test_i)
om = ble_hs_mbuf_from_flat(fourbytes, sizeof fourbytes); om = ble_hs_mbuf_from_flat(fourbytes, sizeof fourbytes);
TEST_ASSERT_FATAL(om != NULL); TEST_ASSERT_FATAL(om != NULL);
rc = ble_gattc_indicate_custom(conn_handle, rc = ble_gatts_indicate_custom(conn_handle,
ble_gatts_notify_test_chr_1_def_handle + 1, ble_gatts_notify_test_chr_1_def_handle + 1,
om); om);
TEST_ASSERT_FATAL(rc == 0); TEST_ASSERT_FATAL(rc == 0);