From a5c39dfa76eeebd09568ce959cd3dd088498ad3f Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Thu, 3 Dec 2020 16:04:48 -0500 Subject: fix(ble): Perform GATT notifies from dedicated queue. * Zephyr BT stack frees TX buffers from system workqueue, and to avoid blocking waiting to allocate, perform notify from a dedicated queue. --- app/src/split/bluetooth/central.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/src/split') diff --git a/app/src/split/bluetooth/central.c b/app/src/split/bluetooth/central.c index 9cce787..e9dfbac 100644 --- a/app/src/split/bluetooth/central.c +++ b/app/src/split/bluetooth/central.c @@ -57,8 +57,9 @@ void peripheral_event_work_callback(struct k_work *work) { K_WORK_DEFINE(peripheral_event_work, peripheral_event_work_callback); -static uint8_t split_central_notify_func(struct bt_conn *conn, struct bt_gatt_subscribe_params *params, - const void *data, uint16_t length) { +static uint8_t split_central_notify_func(struct bt_conn *conn, + struct bt_gatt_subscribe_params *params, const void *data, + uint16_t length) { static uint8_t position_state[POSITION_STATE_DATA_LEN]; uint8_t changed_positions[POSITION_STATE_DATA_LEN]; -- cgit v1.2.3