Attempting to publish a tree

Dependencies:   nrf51-sdk

Dependents:   microbit-dal

Fork of nRF51822 by Lancaster University

Committer:
cefn
Date:
Wed Jun 01 17:41:42 2016 +0000
Revision:
624:3ef324d9f2df
Parent:
616:a8f9b022d8fd
Attempting to publish a tree

Who changed what in which revision?

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