nRFDiscoveredCharacteristic::setup() takes a GattClient poitner
This commit is contained in:
parent
9d50304018
commit
168eed4ee4
2 changed files with 17 additions and 11 deletions
|
@ -248,12 +248,14 @@ NordicServiceDiscovery::setupDiscoveredCharacteristics(const ble_gattc_evt_char_
|
|||
for (unsigned charIndex = 0; charIndex < numCharacteristics; charIndex++) {
|
||||
if (response->chars[charIndex].uuid.type == BLE_UUID_TYPE_UNKNOWN) {
|
||||
charUUIDDiscoveryQueue.enqueue(charIndex);
|
||||
characteristics[charIndex].setup(connHandle,
|
||||
characteristics[charIndex].setup(NULL, /* gattc FIX THIS */
|
||||
connHandle,
|
||||
response->chars[charIndex].char_props,
|
||||
response->chars[charIndex].handle_decl,
|
||||
response->chars[charIndex].handle_value);
|
||||
} else {
|
||||
characteristics[charIndex].setup(connHandle,
|
||||
characteristics[charIndex].setup(NULL, /* gattc FIX THIS */
|
||||
connHandle,
|
||||
response->chars[charIndex].uuid.uuid,
|
||||
response->chars[charIndex].char_props,
|
||||
response->chars[charIndex].handle_decl,
|
||||
|
|
|
@ -19,10 +19,12 @@
|
|||
|
||||
class nRFDiscoveredCharacteristic : public DiscoveredCharacteristic {
|
||||
public:
|
||||
void setup(Gap::Handle_t connectionHandleIn,
|
||||
ble_gatt_char_props_t propsIn,
|
||||
GattAttribute::Handle_t declHandleIn,
|
||||
GattAttribute::Handle_t valueHandleIn) {
|
||||
void setup(GattClient *gattcIn,
|
||||
Gap::Handle_t connectionHandleIn,
|
||||
ble_gatt_char_props_t propsIn,
|
||||
GattAttribute::Handle_t declHandleIn,
|
||||
GattAttribute::Handle_t valueHandleIn) {
|
||||
gattc = gattcIn;
|
||||
connHandle = connectionHandleIn;
|
||||
declHandle = declHandleIn;
|
||||
valueHandle = valueHandleIn;
|
||||
|
@ -36,11 +38,13 @@ public:
|
|||
props._authSignedWrite = propsIn.auth_signed_wr;
|
||||
}
|
||||
|
||||
void setup(Gap::Handle_t connectionHandleIn,
|
||||
UUID::ShortUUIDBytes_t uuidIn,
|
||||
ble_gatt_char_props_t propsIn,
|
||||
GattAttribute::Handle_t declHandleIn,
|
||||
GattAttribute::Handle_t valueHandleIn) {
|
||||
void setup(GattClient *gattcIn,
|
||||
Gap::Handle_t connectionHandleIn,
|
||||
UUID::ShortUUIDBytes_t uuidIn,
|
||||
ble_gatt_char_props_t propsIn,
|
||||
GattAttribute::Handle_t declHandleIn,
|
||||
GattAttribute::Handle_t valueHandleIn) {
|
||||
gattc = gattcIn;
|
||||
connHandle = connectionHandleIn;
|
||||
uuid = uuidIn;
|
||||
declHandle = declHandleIn;
|
||||
|
|
Loading…
Reference in a new issue