close #88 use ada callback thread for BLECharacteristic callback

includes: write, cccd write, read authorize, write authorize
This commit is contained in:
hathach committed 2019-01-23 15:48:49 +07:00
1 parent 7b00b2103d
commit b9a9453abc
4 files changed
+86 -41

No files matched your search

@@ -335,7 +335,6 @@ uint16_t BLEClientCharacteristic::write32(int value)
return write32( (uint32_t) value);
}
void BLEClientCharacteristic::setNotifyCallback(notify_cb_t fp, bool useAdaCallback)
{
_notify_cb = fp;
@@ -418,7 +417,7 @@ void BLEClientCharacteristic::_eventHandler(ble_evt_t* evt)
if (!data) return;
memcpy(data, hvx->data, hvx->len);
// data is free by callback
// data is free after callback
ada_callback(data, _notify_cb, this, data, hvx->len);
}else
{