Skip to content

Commit

Permalink
extmod/btstack: Include value handle in client read/write events.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jimmo committed Apr 26, 2023
1 parent 256f47e commit a6aa739
Show file tree
Hide file tree
Showing 6 changed files with 224 additions and 206 deletions.
2 changes: 0 additions & 2 deletions docs/library/bluetooth.rst
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,10 @@ Event Handling
conn_handle, value_handle, char_data = data
elif event == _IRQ_GATTC_READ_DONE:
# A gattc_read() has completed.
# Note: The value_handle will be zero on btstack (but present on NimBLE).
# Note: Status will be zero on success, implementation-specific value otherwise.
conn_handle, value_handle, status = data
elif event == _IRQ_GATTC_WRITE_DONE:
# A gattc_write() has completed.
# Note: The value_handle will be zero on btstack (but present on NimBLE).
# Note: Status will be zero on success, implementation-specific value otherwise.
conn_handle, value_handle, status = data
elif event == _IRQ_GATTC_NOTIFY:
Expand Down
Loading

0 comments on commit a6aa739

Please sign in to comment.