handle the read response event. :)
parent
83daae7c85
commit
e3c989a079
|
@ -374,6 +374,19 @@ void bleGattcEventHandler(const ble_evt_t *p_ble_evt)
|
|||
sdSingleton.processDiscoverUUIDResponse(&p_ble_evt->evt.gattc_evt.params.char_val_by_uuid_read_rsp);
|
||||
}
|
||||
break;
|
||||
|
||||
case BLE_GATTC_EVT_READ_RSP:
|
||||
printf("BLE_GATTC_EVT_READ_RSP\r\n");
|
||||
if (DiscoveredCharacteristic::onDataReadCallback != NULL) {
|
||||
DiscoveredCharacteristic::ReadResponse_t response = {
|
||||
.handle = p_ble_evt->evt.gattc_evt.params.read_rsp.handle,
|
||||
.offset = p_ble_evt->evt.gattc_evt.params.read_rsp.offset,
|
||||
.len = p_ble_evt->evt.gattc_evt.params.read_rsp.len,
|
||||
.data = p_ble_evt->evt.gattc_evt.params.read_rsp.data,
|
||||
};
|
||||
DiscoveredCharacteristic::onDataReadCallback(&response);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
sdSingleton.progressCharacteristicDiscovery();
|
||||
|
|
Loading…
Reference in New Issue