No changes

Fork of nRF51822 by Nordic Semiconductor

Committer:
vcoubard
Date:
Mon Jan 11 10:19:31 2016 +0000
Revision:
590:3bdd5346ded1
Parent:
575:7023a8204a1b
Child:
591:266079a50c20
Synchronized with git rev 19d1c406
Author: Vincent Coubard
Merge branch 'develop' of https://github.com/ARMmbed/ble-nrf51822 into characteristicDescriptorDiscovery

Who changed what in which revision?

UserRevisionLine numberNew contents of line
vcoubard 542:1bf9c597f44f 1 /* mbed Microcontroller Library
vcoubard 542:1bf9c597f44f 2 * Copyright (c) 2006-2013 ARM Limited
vcoubard 542:1bf9c597f44f 3 *
vcoubard 542:1bf9c597f44f 4 * Licensed under the Apache License, Version 2.0 (the "License");
vcoubard 542:1bf9c597f44f 5 * you may not use this file except in compliance with the License.
vcoubard 542:1bf9c597f44f 6 * You may obtain a copy of the License at
vcoubard 542:1bf9c597f44f 7 *
vcoubard 542:1bf9c597f44f 8 * http://www.apache.org/licenses/LICENSE-2.0
vcoubard 542:1bf9c597f44f 9 *
vcoubard 542:1bf9c597f44f 10 * Unless required by applicable law or agreed to in writing, software
vcoubard 542:1bf9c597f44f 11 * distributed under the License is distributed on an "AS IS" BASIS,
vcoubard 542:1bf9c597f44f 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
vcoubard 542:1bf9c597f44f 13 * See the License for the specific language governing permissions and
vcoubard 542:1bf9c597f44f 14 * limitations under the License.
vcoubard 542:1bf9c597f44f 15 */
vcoubard 542:1bf9c597f44f 16
vcoubard 542:1bf9c597f44f 17 #include "nRF5xGattClient.h"
vcoubard 542:1bf9c597f44f 18
vcoubard 542:1bf9c597f44f 19 #if !defined(TARGET_MCU_NRF51_16K_S110) && !defined(TARGET_MCU_NRF51_32K_S110)
vcoubard 542:1bf9c597f44f 20 ble_error_t
vcoubard 542:1bf9c597f44f 21 nRF5xGattClient::launchServiceDiscovery(Gap::Handle_t connectionHandle,
vcoubard 542:1bf9c597f44f 22 ServiceDiscovery::ServiceCallback_t sc,
vcoubard 542:1bf9c597f44f 23 ServiceDiscovery::CharacteristicCallback_t cc,
vcoubard 542:1bf9c597f44f 24 const UUID &matchingServiceUUIDIn,
vcoubard 542:1bf9c597f44f 25 const UUID &matchingCharacteristicUUIDIn)
vcoubard 542:1bf9c597f44f 26 {
vcoubard 590:3bdd5346ded1 27 return _discovery.launch(connectionHandle, sc, cc, matchingServiceUUIDIn, matchingCharacteristicUUIDIn);
vcoubard 542:1bf9c597f44f 28 }
vcoubard 590:3bdd5346ded1 29
vcoubard 590:3bdd5346ded1 30 ble_error_t nRF5xGattClient::discoverCharacteristicDescriptors(
vcoubard 590:3bdd5346ded1 31 const DiscoveredCharacteristic& characteristic,
vcoubard 590:3bdd5346ded1 32 const CharacteristicDescriptorDiscovery::DiscoveryCallback_t& discoveryCallback,
vcoubard 590:3bdd5346ded1 33 const CharacteristicDescriptorDiscovery::TerminationCallback_t& terminationCallback)
vcoubard 590:3bdd5346ded1 34 {
vcoubard 590:3bdd5346ded1 35 return _characteristicDescriptorDiscoverer.launch(
vcoubard 590:3bdd5346ded1 36 characteristic,
vcoubard 590:3bdd5346ded1 37 discoveryCallback,
vcoubard 590:3bdd5346ded1 38 terminationCallback
vcoubard 590:3bdd5346ded1 39 );
vcoubard 590:3bdd5346ded1 40 }
vcoubard 590:3bdd5346ded1 41
vcoubard 590:3bdd5346ded1 42 bool nRF5xGattClient::isCharacteristicDescriptorsDiscoveryActive(const DiscoveredCharacteristic& characteristic) const {
vcoubard 590:3bdd5346ded1 43 return _characteristicDescriptorDiscoverer.isActive(characteristic);
vcoubard 590:3bdd5346ded1 44 }
vcoubard 590:3bdd5346ded1 45
vcoubard 590:3bdd5346ded1 46 void nRF5xGattClient::terminateCharacteristicDescriptorsDiscovery(const DiscoveredCharacteristic& characteristic) {
vcoubard 590:3bdd5346ded1 47 return _characteristicDescriptorDiscoverer.requestTerminate(characteristic);
vcoubard 590:3bdd5346ded1 48 }
vcoubard 590:3bdd5346ded1 49
rgrover1 430:db7edc9ad0bc 50 #endif