diff options
author | Jim Mussared <jim.mussared@gmail.com> | 2020-05-19 16:00:23 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2020-06-05 14:11:04 +1000 |
commit | 1cad63c0bcf63b12436a1438aa8512cd05ad4da0 (patch) | |
tree | 1f899dd20d44b0e28b5c4c32e937c09c370820c9 /docs/library/ubluetooth.rst | |
parent | 9708fe8788eebb87bf3b0d6232dbed2012cf7358 (diff) |
extmod/modbluetooth: Ensure status=0 always on success.
This commit makes sure that all discovery complete and read/write status
events set the status to zero on success.
The status value will be implementation-dependent on non-success cases.
Diffstat (limited to 'docs/library/ubluetooth.rst')
-rw-r--r-- | docs/library/ubluetooth.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/library/ubluetooth.rst b/docs/library/ubluetooth.rst index ee8fd75ad..f96a7caaf 100644 --- a/docs/library/ubluetooth.rst +++ b/docs/library/ubluetooth.rst @@ -112,18 +112,21 @@ Event Handling conn_handle, start_handle, end_handle, uuid = data elif event == _IRQ_GATTC_SERVICE_DONE: # Called once service discovery is complete. + # Note: Status will be zero on success, implementation-specific value otherwise. conn_handle, status = data elif event == _IRQ_GATTC_CHARACTERISTIC_RESULT: # Called for each characteristic found by gattc_discover_services(). conn_handle, def_handle, value_handle, properties, uuid = data elif event == _IRQ_GATTC_CHARACTERISTIC_DONE: # Called once service discovery is complete. + # Note: Status will be zero on success, implementation-specific value otherwise. conn_handle, status = data elif event == _IRQ_GATTC_DESCRIPTOR_RESULT: # Called for each descriptor found by gattc_discover_descriptors(). conn_handle, dsc_handle, uuid = data elif event == _IRQ_GATTC_DESCRIPTOR_DONE: # Called once service discovery is complete. + # Note: Status will be zero on success, implementation-specific value otherwise. conn_handle, status = data elif event == _IRQ_GATTC_READ_RESULT: # A gattc_read() has completed. @@ -131,10 +134,12 @@ Event Handling 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: # A peripheral has sent a notify request. |