summaryrefslogtreecommitdiff
path: root/app/src/split/bluetooth/central.c
diff options
context:
space:
mode:
authorPete Johanson <peter@peterjohanson.com>2020-12-03 16:04:48 -0500
committerPete Johanson <peter@peterjohanson.com>2021-01-15 13:50:36 -0500
commita5c39dfa76eeebd09568ce959cd3dd088498ad3f (patch)
treef153f6571dbeacfb48f2344fec48cb0b7ebcfa71 /app/src/split/bluetooth/central.c
parent4aa78a6f8d2742e1407f78c50a0cf93e194447a4 (diff)
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.
Diffstat (limited to 'app/src/split/bluetooth/central.c')
-rw-r--r--app/src/split/bluetooth/central.c5
1 files changed, 3 insertions, 2 deletions
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];