mamont mamont
/
test_ble
nrf52-dk
shields/TARGET_ST_BLUENRG/source/BlueNRGDiscoveredCharacteristic.cpp@0:70ce6da7a141, 2020-06-05 (annotated)
- Committer:
- mamont090671
- Date:
- Fri Jun 05 10:49:10 2020 +0000
- Revision:
- 0:70ce6da7a141
nrf52840
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mamont090671 | 0:70ce6da7a141 | 1 | /* mbed Microcontroller Library |
mamont090671 | 0:70ce6da7a141 | 2 | * Copyright (c) 2006-2013 ARM Limited |
mamont090671 | 0:70ce6da7a141 | 3 | * |
mamont090671 | 0:70ce6da7a141 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
mamont090671 | 0:70ce6da7a141 | 5 | * you may not use this file except in compliance with the License. |
mamont090671 | 0:70ce6da7a141 | 6 | * You may obtain a copy of the License at |
mamont090671 | 0:70ce6da7a141 | 7 | * |
mamont090671 | 0:70ce6da7a141 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
mamont090671 | 0:70ce6da7a141 | 9 | * |
mamont090671 | 0:70ce6da7a141 | 10 | * Unless required by applicable law or agreed to in writing, software |
mamont090671 | 0:70ce6da7a141 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
mamont090671 | 0:70ce6da7a141 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
mamont090671 | 0:70ce6da7a141 | 13 | * See the License for the specific language governing permissions and |
mamont090671 | 0:70ce6da7a141 | 14 | * limitations under the License. |
mamont090671 | 0:70ce6da7a141 | 15 | */ |
mamont090671 | 0:70ce6da7a141 | 16 | |
mamont090671 | 0:70ce6da7a141 | 17 | #include "BlueNRGDiscoveredCharacteristic.h" |
mamont090671 | 0:70ce6da7a141 | 18 | #include "BlueNRGGattClient.h" |
mamont090671 | 0:70ce6da7a141 | 19 | |
mamont090671 | 0:70ce6da7a141 | 20 | void BlueNRGDiscoveredCharacteristic::setup(BlueNRGGattClient *gattcIn, |
mamont090671 | 0:70ce6da7a141 | 21 | Gap::Handle_t connectionHandleIn, |
mamont090671 | 0:70ce6da7a141 | 22 | DiscoveredCharacteristic::Properties_t propsIn, |
mamont090671 | 0:70ce6da7a141 | 23 | GattAttribute::Handle_t declHandleIn, |
mamont090671 | 0:70ce6da7a141 | 24 | GattAttribute::Handle_t valueHandleIn, |
mamont090671 | 0:70ce6da7a141 | 25 | GattAttribute::Handle_t lastHandleIn) |
mamont090671 | 0:70ce6da7a141 | 26 | { |
mamont090671 | 0:70ce6da7a141 | 27 | gattc = gattcIn; |
mamont090671 | 0:70ce6da7a141 | 28 | connHandle = connectionHandleIn; |
mamont090671 | 0:70ce6da7a141 | 29 | declHandle = declHandleIn; |
mamont090671 | 0:70ce6da7a141 | 30 | valueHandle = valueHandleIn; |
mamont090671 | 0:70ce6da7a141 | 31 | lastHandle = lastHandleIn; |
mamont090671 | 0:70ce6da7a141 | 32 | |
mamont090671 | 0:70ce6da7a141 | 33 | props._broadcast = propsIn.broadcast(); |
mamont090671 | 0:70ce6da7a141 | 34 | props._read = propsIn.read(); |
mamont090671 | 0:70ce6da7a141 | 35 | props._writeWoResp = propsIn.writeWoResp(); |
mamont090671 | 0:70ce6da7a141 | 36 | props._write = propsIn.write(); |
mamont090671 | 0:70ce6da7a141 | 37 | props._notify = propsIn.notify(); |
mamont090671 | 0:70ce6da7a141 | 38 | props._indicate = propsIn.indicate(); |
mamont090671 | 0:70ce6da7a141 | 39 | props._authSignedWrite = propsIn.authSignedWrite(); |
mamont090671 | 0:70ce6da7a141 | 40 | } |
mamont090671 | 0:70ce6da7a141 | 41 | |
mamont090671 | 0:70ce6da7a141 | 42 | void BlueNRGDiscoveredCharacteristic::setup(BlueNRGGattClient *gattcIn, |
mamont090671 | 0:70ce6da7a141 | 43 | Gap::Handle_t connectionHandleIn, |
mamont090671 | 0:70ce6da7a141 | 44 | UUID uuidIn, |
mamont090671 | 0:70ce6da7a141 | 45 | DiscoveredCharacteristic::Properties_t propsIn, |
mamont090671 | 0:70ce6da7a141 | 46 | GattAttribute::Handle_t declHandleIn, |
mamont090671 | 0:70ce6da7a141 | 47 | GattAttribute::Handle_t valueHandleIn, |
mamont090671 | 0:70ce6da7a141 | 48 | GattAttribute::Handle_t lastHandleIn) |
mamont090671 | 0:70ce6da7a141 | 49 | { |
mamont090671 | 0:70ce6da7a141 | 50 | gattc = gattcIn; |
mamont090671 | 0:70ce6da7a141 | 51 | connHandle = connectionHandleIn; |
mamont090671 | 0:70ce6da7a141 | 52 | uuid = uuidIn; |
mamont090671 | 0:70ce6da7a141 | 53 | declHandle = declHandleIn; |
mamont090671 | 0:70ce6da7a141 | 54 | valueHandle = valueHandleIn; |
mamont090671 | 0:70ce6da7a141 | 55 | lastHandle = lastHandleIn; |
mamont090671 | 0:70ce6da7a141 | 56 | |
mamont090671 | 0:70ce6da7a141 | 57 | props._broadcast = propsIn.broadcast(); |
mamont090671 | 0:70ce6da7a141 | 58 | props._read = propsIn.read(); |
mamont090671 | 0:70ce6da7a141 | 59 | props._writeWoResp = propsIn.writeWoResp(); |
mamont090671 | 0:70ce6da7a141 | 60 | props._write = propsIn.write(); |
mamont090671 | 0:70ce6da7a141 | 61 | props._notify = propsIn.notify(); |
mamont090671 | 0:70ce6da7a141 | 62 | props._indicate = propsIn.indicate(); |
mamont090671 | 0:70ce6da7a141 | 63 | props._authSignedWrite = propsIn.authSignedWrite(); |
mamont090671 | 0:70ce6da7a141 | 64 | } |
mamont090671 | 0:70ce6da7a141 | 65 | |
mamont090671 | 0:70ce6da7a141 | 66 | void BlueNRGDiscoveredCharacteristic::setLastHandle(GattAttribute::Handle_t lastHandleIn) { |
mamont090671 | 0:70ce6da7a141 | 67 | lastHandle = lastHandleIn; |
mamont090671 | 0:70ce6da7a141 | 68 | } |