extmod/modbluetooth: Implement read done event.
On btstack there's no status associated with the read result, it comes through as a separate event. This allows you to detect read failures or timeouts.
This commit is contained in:
committed by
Damien George
parent
919d640aec
commit
c07ea3e4c2
@@ -161,6 +161,10 @@ class BLETemperatureCentral:
|
||||
self._read_callback(self._value)
|
||||
self._read_callback = None
|
||||
|
||||
elif event == _IRQ_GATTC_READ_DONE:
|
||||
# Read completed.
|
||||
conn_handle, value_handle, status = data
|
||||
|
||||
elif event == _IRQ_GATTC_NOTIFY:
|
||||
# The ble_temperature.py demo periodically notifies its value.
|
||||
conn_handle, value_handle, notify_data = data
|
||||
|
||||
Reference in New Issue
Block a user