diff options
author | Jim Mussared <jim.mussared@gmail.com> | 2023-03-03 00:48:33 +1100 |
---|---|---|
committer | Jim Mussared <jim.mussared@gmail.com> | 2023-04-26 11:37:20 +1000 |
commit | a6aa7397d8e5b309e5675612143d3c5a5e931333 (patch) | |
tree | 90a7c5447c60f1fc48e3f8abcb704603737450bc /extmod/btstack/modbluetooth_btstack.h | |
parent | 256f47e2f8348d08b53e3c69461cf07903b00367 (diff) |
extmod/btstack: Include value handle in client read/write events.
This replaces the previous pending operation queue (that used to also be
shared with pending server notify/indicate ops) with a single pending
operation per connection. This allows the value handle to be correctly
passed to the Python-level events.
Also re-structure GATT client event handling to simplify the packet handler
functions.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'extmod/btstack/modbluetooth_btstack.h')
-rw-r--r-- | extmod/btstack/modbluetooth_btstack.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/extmod/btstack/modbluetooth_btstack.h b/extmod/btstack/modbluetooth_btstack.h index 7890bbfae..7f4a18207 100644 --- a/extmod/btstack/modbluetooth_btstack.h +++ b/extmod/btstack/modbluetooth_btstack.h @@ -33,8 +33,6 @@ #include "lib/btstack/src/btstack.h" -typedef struct _mp_btstack_pending_op_t mp_btstack_pending_op_t; - typedef struct _mp_bluetooth_btstack_root_pointers_t { // This stores both the advertising data and the scan response data, concatenated together. uint8_t *adv_data; @@ -44,11 +42,12 @@ typedef struct _mp_bluetooth_btstack_root_pointers_t { // Characteristic (and descriptor) value storage. mp_gatts_db_t gatts_db; - btstack_linked_list_t pending_ops; - - #if MICROPY_PY_BLUETOOTH_ENABLE_CENTRAL_MODE + #if MICROPY_PY_BLUETOOTH_ENABLE_GATT_CLIENT // Registration for notify/indicate events. gatt_client_notification_t notification; + + // Active connections (only used for GATT clients). + btstack_linked_list_t active_connections; #endif } mp_bluetooth_btstack_root_pointers_t; |