mirror of
https://github.com/Fishwaldo/bl_mcu_sdk.git
synced 2025-07-05 20:38:45 +00:00
[fix][examples/ble] fix ble rx assert error
This commit is contained in:
parent
a0d4520afe
commit
4649d6ce67
2 changed files with 2 additions and 3 deletions
|
@ -129,8 +129,6 @@ static void ble_subscribe()
|
|||
BT_WARN("Subscribed");
|
||||
}
|
||||
|
||||
k_sem_init(&write_data_poll_sem, 0, 1);
|
||||
|
||||
if (!created_write_data_task && (xTaskCreate(ble_write_data_task, (char *)"ble_write_data", 512, NULL, 15, &ble_write_data_task_h) == pdPASS)) {
|
||||
created_write_data_task = 1;
|
||||
BT_WARN("Create write data task success");
|
||||
|
@ -286,5 +284,6 @@ void ble_tp_init()
|
|||
if (!isRegister) {
|
||||
isRegister = 1;
|
||||
bt_conn_cb_register(&ble_tp_conn_callbacks);
|
||||
k_sem_init(&write_data_poll_sem, 0, 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -220,7 +220,6 @@ static void ble_tp_notify_ccc_changed(const struct bt_gatt_attr *attr, u16_t val
|
|||
BT_WARN("ccc:value=[%d]", value);
|
||||
|
||||
if (value == BT_GATT_CCC_NOTIFY) {
|
||||
k_sem_init(¬ify_poll_sem, 0, 1);
|
||||
|
||||
if (xTaskCreate(ble_tp_notify_task, (char *)"bletp", 512, NULL, 15, &ble_tp_task_h) == pdPASS) {
|
||||
created_tp_task = 1;
|
||||
|
@ -299,5 +298,6 @@ void ble_tp_init()
|
|||
isRegister = 1;
|
||||
bt_conn_cb_register(&ble_tp_conn_callbacks);
|
||||
bt_gatt_service_register(&ble_tp_server);
|
||||
k_sem_init(¬ify_poll_sem, 0, 1);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue