test firmware for BLE Micro V1.3 1. test io, vcc and ble 2. act as a UART to BLE bridge
Dependencies: BLE_API Buffer mbed
Fork of BLE_LEDBlinker by
nRF51822/source/nRF5xDiscoveredCharacteristic.cpp@12:c4090cb58976, 2015-12-08 (annotated)
- Committer:
- arch
- Date:
- Tue Dec 08 08:34:22 2015 +0000
- Revision:
- 12:c4090cb58976
- Parent:
- 11:c8cbc4bc2c17
fix USBTX/USBRX pins config
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
arch | 11:c8cbc4bc2c17 | 1 | /* mbed Microcontroller Library |
arch | 11:c8cbc4bc2c17 | 2 | * Copyright (c) 2006-2013 ARM Limited |
arch | 11:c8cbc4bc2c17 | 3 | * |
arch | 11:c8cbc4bc2c17 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
arch | 11:c8cbc4bc2c17 | 5 | * you may not use this file except in compliance with the License. |
arch | 11:c8cbc4bc2c17 | 6 | * You may obtain a copy of the License at |
arch | 11:c8cbc4bc2c17 | 7 | * |
arch | 11:c8cbc4bc2c17 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
arch | 11:c8cbc4bc2c17 | 9 | * |
arch | 11:c8cbc4bc2c17 | 10 | * Unless required by applicable law or agreed to in writing, software |
arch | 11:c8cbc4bc2c17 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
arch | 11:c8cbc4bc2c17 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
arch | 11:c8cbc4bc2c17 | 13 | * See the License for the specific language governing permissions and |
arch | 11:c8cbc4bc2c17 | 14 | * limitations under the License. |
arch | 11:c8cbc4bc2c17 | 15 | */ |
arch | 11:c8cbc4bc2c17 | 16 | |
arch | 11:c8cbc4bc2c17 | 17 | #include "nRF5xDiscoveredCharacteristic.h" |
arch | 11:c8cbc4bc2c17 | 18 | #include "nRF5xGattClient.h" |
arch | 11:c8cbc4bc2c17 | 19 | #include "ble_gatt.h" |
arch | 11:c8cbc4bc2c17 | 20 | |
arch | 11:c8cbc4bc2c17 | 21 | void |
arch | 11:c8cbc4bc2c17 | 22 | nRF5xDiscoveredCharacteristic::setup(nRF5xGattClient *gattcIn, |
arch | 11:c8cbc4bc2c17 | 23 | Gap::Handle_t connectionHandleIn, |
arch | 11:c8cbc4bc2c17 | 24 | ble_gatt_char_props_t propsIn, |
arch | 11:c8cbc4bc2c17 | 25 | GattAttribute::Handle_t declHandleIn, |
arch | 11:c8cbc4bc2c17 | 26 | GattAttribute::Handle_t valueHandleIn) |
arch | 11:c8cbc4bc2c17 | 27 | { |
arch | 11:c8cbc4bc2c17 | 28 | gattc = gattcIn; |
arch | 11:c8cbc4bc2c17 | 29 | connHandle = connectionHandleIn; |
arch | 11:c8cbc4bc2c17 | 30 | declHandle = declHandleIn; |
arch | 11:c8cbc4bc2c17 | 31 | valueHandle = valueHandleIn; |
arch | 11:c8cbc4bc2c17 | 32 | |
arch | 11:c8cbc4bc2c17 | 33 | props._broadcast = propsIn.broadcast; |
arch | 11:c8cbc4bc2c17 | 34 | props._read = propsIn.read; |
arch | 11:c8cbc4bc2c17 | 35 | props._writeWoResp = propsIn.write_wo_resp; |
arch | 11:c8cbc4bc2c17 | 36 | props._write = propsIn.write; |
arch | 11:c8cbc4bc2c17 | 37 | props._notify = propsIn.notify; |
arch | 11:c8cbc4bc2c17 | 38 | props._indicate = propsIn.indicate; |
arch | 11:c8cbc4bc2c17 | 39 | props._authSignedWrite = propsIn.auth_signed_wr; |
arch | 11:c8cbc4bc2c17 | 40 | } |
arch | 11:c8cbc4bc2c17 | 41 | |
arch | 11:c8cbc4bc2c17 | 42 | void |
arch | 11:c8cbc4bc2c17 | 43 | nRF5xDiscoveredCharacteristic::setup(nRF5xGattClient *gattcIn, |
arch | 11:c8cbc4bc2c17 | 44 | Gap::Handle_t connectionHandleIn, |
arch | 11:c8cbc4bc2c17 | 45 | UUID::ShortUUIDBytes_t uuidIn, |
arch | 11:c8cbc4bc2c17 | 46 | ble_gatt_char_props_t propsIn, |
arch | 11:c8cbc4bc2c17 | 47 | GattAttribute::Handle_t declHandleIn, |
arch | 11:c8cbc4bc2c17 | 48 | GattAttribute::Handle_t valueHandleIn) |
arch | 11:c8cbc4bc2c17 | 49 | { |
arch | 11:c8cbc4bc2c17 | 50 | gattc = gattcIn; |
arch | 11:c8cbc4bc2c17 | 51 | connHandle = connectionHandleIn; |
arch | 11:c8cbc4bc2c17 | 52 | uuid = uuidIn; |
arch | 11:c8cbc4bc2c17 | 53 | declHandle = declHandleIn; |
arch | 11:c8cbc4bc2c17 | 54 | valueHandle = valueHandleIn; |
arch | 11:c8cbc4bc2c17 | 55 | |
arch | 11:c8cbc4bc2c17 | 56 | props._broadcast = propsIn.broadcast; |
arch | 11:c8cbc4bc2c17 | 57 | props._read = propsIn.read; |
arch | 11:c8cbc4bc2c17 | 58 | props._writeWoResp = propsIn.write_wo_resp; |
arch | 11:c8cbc4bc2c17 | 59 | props._write = propsIn.write; |
arch | 11:c8cbc4bc2c17 | 60 | props._notify = propsIn.notify; |
arch | 11:c8cbc4bc2c17 | 61 | props._indicate = propsIn.indicate; |
arch | 11:c8cbc4bc2c17 | 62 | props._authSignedWrite = propsIn.auth_signed_wr; |
arch | 11:c8cbc4bc2c17 | 63 | } |