config changes
Fork of nRF51822 by
source/nRF51DiscoveredCharacteristic.cpp@387:b13ab9a7ddb9, 2015-07-21 (annotated)
- Committer:
- rgrover1
- Date:
- Tue Jul 21 13:23:44 2015 +0100
- Revision:
- 387:b13ab9a7ddb9
- Parent:
- nRF51DiscoveredCharacteristic.cpp@386:3253b512fb24
Synchronized with git rev e79eec6b
Author: Rohit Grover
Release 0.4.2
=============
This is a minor release.
Enhancements
~~~~~~~~~~~~
* fix #53: add GattClient API for handling HVX Events (notifications and
indications). Refer to GattClient::onHVX(HVXCallback_t ...).
* Reformat source tree to align nRF51822 for yotta.
Bugfixes
~~~~~~~~
none.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rgrover1 | 344:2a44e5fd26bc | 1 | /* mbed Microcontroller Library |
rgrover1 | 344:2a44e5fd26bc | 2 | * Copyright (c) 2006-2013 ARM Limited |
rgrover1 | 344:2a44e5fd26bc | 3 | * |
rgrover1 | 344:2a44e5fd26bc | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
rgrover1 | 344:2a44e5fd26bc | 5 | * you may not use this file except in compliance with the License. |
rgrover1 | 344:2a44e5fd26bc | 6 | * You may obtain a copy of the License at |
rgrover1 | 344:2a44e5fd26bc | 7 | * |
rgrover1 | 344:2a44e5fd26bc | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
rgrover1 | 344:2a44e5fd26bc | 9 | * |
rgrover1 | 344:2a44e5fd26bc | 10 | * Unless required by applicable law or agreed to in writing, software |
rgrover1 | 344:2a44e5fd26bc | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
rgrover1 | 344:2a44e5fd26bc | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
rgrover1 | 344:2a44e5fd26bc | 13 | * See the License for the specific language governing permissions and |
rgrover1 | 344:2a44e5fd26bc | 14 | * limitations under the License. |
rgrover1 | 344:2a44e5fd26bc | 15 | */ |
rgrover1 | 344:2a44e5fd26bc | 16 | |
rgrover1 | 344:2a44e5fd26bc | 17 | #include "nRF51DiscoveredCharacteristic.h" |
rgrover1 | 344:2a44e5fd26bc | 18 | #include "nRF51GattClient.h" |
rgrover1 | 344:2a44e5fd26bc | 19 | #include "ble_gatt.h" |
rgrover1 | 344:2a44e5fd26bc | 20 | |
rgrover1 | 344:2a44e5fd26bc | 21 | void |
rgrover1 | 344:2a44e5fd26bc | 22 | nRF51DiscoveredCharacteristic::setup(nRF51GattClient *gattcIn, |
rgrover1 | 344:2a44e5fd26bc | 23 | Gap::Handle_t connectionHandleIn, |
rgrover1 | 344:2a44e5fd26bc | 24 | ble_gatt_char_props_t propsIn, |
rgrover1 | 344:2a44e5fd26bc | 25 | GattAttribute::Handle_t declHandleIn, |
rgrover1 | 344:2a44e5fd26bc | 26 | GattAttribute::Handle_t valueHandleIn) |
rgrover1 | 344:2a44e5fd26bc | 27 | { |
rgrover1 | 344:2a44e5fd26bc | 28 | gattc = gattcIn; |
rgrover1 | 344:2a44e5fd26bc | 29 | connHandle = connectionHandleIn; |
rgrover1 | 344:2a44e5fd26bc | 30 | declHandle = declHandleIn; |
rgrover1 | 344:2a44e5fd26bc | 31 | valueHandle = valueHandleIn; |
rgrover1 | 344:2a44e5fd26bc | 32 | |
rgrover1 | 344:2a44e5fd26bc | 33 | props._broadcast = propsIn.broadcast; |
rgrover1 | 344:2a44e5fd26bc | 34 | props._read = propsIn.read; |
rgrover1 | 344:2a44e5fd26bc | 35 | props._writeWoResp = propsIn.write_wo_resp; |
rgrover1 | 344:2a44e5fd26bc | 36 | props._write = propsIn.write; |
rgrover1 | 344:2a44e5fd26bc | 37 | props._notify = propsIn.notify; |
rgrover1 | 344:2a44e5fd26bc | 38 | props._indicate = propsIn.indicate; |
rgrover1 | 344:2a44e5fd26bc | 39 | props._authSignedWrite = propsIn.auth_signed_wr; |
rgrover1 | 344:2a44e5fd26bc | 40 | } |
rgrover1 | 344:2a44e5fd26bc | 41 | |
rgrover1 | 344:2a44e5fd26bc | 42 | void |
rgrover1 | 344:2a44e5fd26bc | 43 | nRF51DiscoveredCharacteristic::setup(nRF51GattClient *gattcIn, |
rgrover1 | 344:2a44e5fd26bc | 44 | Gap::Handle_t connectionHandleIn, |
rgrover1 | 344:2a44e5fd26bc | 45 | UUID::ShortUUIDBytes_t uuidIn, |
rgrover1 | 344:2a44e5fd26bc | 46 | ble_gatt_char_props_t propsIn, |
rgrover1 | 344:2a44e5fd26bc | 47 | GattAttribute::Handle_t declHandleIn, |
rgrover1 | 344:2a44e5fd26bc | 48 | GattAttribute::Handle_t valueHandleIn) |
rgrover1 | 344:2a44e5fd26bc | 49 | { |
rgrover1 | 344:2a44e5fd26bc | 50 | gattc = gattcIn; |
rgrover1 | 344:2a44e5fd26bc | 51 | connHandle = connectionHandleIn; |
rgrover1 | 344:2a44e5fd26bc | 52 | uuid = uuidIn; |
rgrover1 | 344:2a44e5fd26bc | 53 | declHandle = declHandleIn; |
rgrover1 | 344:2a44e5fd26bc | 54 | valueHandle = valueHandleIn; |
rgrover1 | 344:2a44e5fd26bc | 55 | |
rgrover1 | 344:2a44e5fd26bc | 56 | props._broadcast = propsIn.broadcast; |
rgrover1 | 344:2a44e5fd26bc | 57 | props._read = propsIn.read; |
rgrover1 | 344:2a44e5fd26bc | 58 | props._writeWoResp = propsIn.write_wo_resp; |
rgrover1 | 344:2a44e5fd26bc | 59 | props._write = propsIn.write; |
rgrover1 | 344:2a44e5fd26bc | 60 | props._notify = propsIn.notify; |
rgrover1 | 344:2a44e5fd26bc | 61 | props._indicate = propsIn.indicate; |
rgrover1 | 344:2a44e5fd26bc | 62 | props._authSignedWrite = propsIn.auth_signed_wr; |
rgrover1 | 344:2a44e5fd26bc | 63 | } |