/
11111
1
Fork of nRF51822 by
nRF51GattClient.cpp@332:b054000833d4, 2015-06-19 (annotated)
- Committer:
- rgrover1
- Date:
- Fri Jun 19 15:55:32 2015 +0100
- Revision:
- 332:b054000833d4
- Parent:
- 328:f3aa0fddaa79
Synchronized with git rev 5a4e62f1
Author: Rohit Grover
one massive commit to integrate with GattClient.
DiscoveredCharacteristic still needs to setup gattc pointers.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rgrover1 | 328:f3aa0fddaa79 | 1 | /* mbed Microcontroller Library |
rgrover1 | 328:f3aa0fddaa79 | 2 | * Copyright (c) 2006-2013 ARM Limited |
rgrover1 | 328:f3aa0fddaa79 | 3 | * |
rgrover1 | 328:f3aa0fddaa79 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
rgrover1 | 328:f3aa0fddaa79 | 5 | * you may not use this file except in compliance with the License. |
rgrover1 | 328:f3aa0fddaa79 | 6 | * You may obtain a copy of the License at |
rgrover1 | 328:f3aa0fddaa79 | 7 | * |
rgrover1 | 328:f3aa0fddaa79 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
rgrover1 | 328:f3aa0fddaa79 | 9 | * |
rgrover1 | 328:f3aa0fddaa79 | 10 | * Unless required by applicable law or agreed to in writing, software |
rgrover1 | 328:f3aa0fddaa79 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
rgrover1 | 328:f3aa0fddaa79 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
rgrover1 | 328:f3aa0fddaa79 | 13 | * See the License for the specific language governing permissions and |
rgrover1 | 328:f3aa0fddaa79 | 14 | * limitations under the License. |
rgrover1 | 328:f3aa0fddaa79 | 15 | */ |
rgrover1 | 328:f3aa0fddaa79 | 16 | |
rgrover1 | 328:f3aa0fddaa79 | 17 | #include "nRF51GattClient.h" |
rgrover1 | 328:f3aa0fddaa79 | 18 | |
rgrover1 | 332:b054000833d4 | 19 | nRF51GattClient nRFGattClientSingleton; |
rgrover1 | 332:b054000833d4 | 20 | |
rgrover1 | 332:b054000833d4 | 21 | nRF51GattClient & |
rgrover1 | 332:b054000833d4 | 22 | nRF51GattClient::getInstance(void) { |
rgrover1 | 332:b054000833d4 | 23 | return nRFGattClientSingleton; |
rgrover1 | 332:b054000833d4 | 24 | } |
rgrover1 | 332:b054000833d4 | 25 | |
rgrover1 | 332:b054000833d4 | 26 | ble_error_t |
rgrover1 | 332:b054000833d4 | 27 | nRF51GattClient::launchServiceDiscovery(Gap::Handle_t connectionHandle, |
rgrover1 | 332:b054000833d4 | 28 | ServiceDiscovery::ServiceCallback_t sc, |
rgrover1 | 332:b054000833d4 | 29 | ServiceDiscovery::CharacteristicCallback_t cc, |
rgrover1 | 332:b054000833d4 | 30 | const UUID &matchingServiceUUIDIn, |
rgrover1 | 332:b054000833d4 | 31 | const UUID &matchingCharacteristicUUIDIn) |
rgrover1 | 332:b054000833d4 | 32 | { |
rgrover1 | 332:b054000833d4 | 33 | return discovery.launch(connectionHandle, sc, cc, matchingServiceUUIDIn, matchingCharacteristicUUIDIn); |
rgrover1 | 328:f3aa0fddaa79 | 34 | } |