Official Sheffield ARMBand micro:bit program

Committer:
MrBedfordVan
Date:
Mon Oct 17 12:41:20 2016 +0000
Revision:
0:b9164b348919
Official Sheffield ARMBand Micro:bit program

Who changed what in which revision?

UserRevisionLine numberNew contents of line
MrBedfordVan 0:b9164b348919 1 /* mbed Microcontroller Library
MrBedfordVan 0:b9164b348919 2 * Copyright (c) 2006-2013 ARM Limited
MrBedfordVan 0:b9164b348919 3 *
MrBedfordVan 0:b9164b348919 4 * Licensed under the Apache License, Version 2.0 (the "License");
MrBedfordVan 0:b9164b348919 5 * you may not use this file except in compliance with the License.
MrBedfordVan 0:b9164b348919 6 * You may obtain a copy of the License at
MrBedfordVan 0:b9164b348919 7 *
MrBedfordVan 0:b9164b348919 8 * http://www.apache.org/licenses/LICENSE-2.0
MrBedfordVan 0:b9164b348919 9 *
MrBedfordVan 0:b9164b348919 10 * Unless required by applicable law or agreed to in writing, software
MrBedfordVan 0:b9164b348919 11 * distributed under the License is distributed on an "AS IS" BASIS,
MrBedfordVan 0:b9164b348919 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
MrBedfordVan 0:b9164b348919 13 * See the License for the specific language governing permissions and
MrBedfordVan 0:b9164b348919 14 * limitations under the License.
MrBedfordVan 0:b9164b348919 15 */
MrBedfordVan 0:b9164b348919 16
MrBedfordVan 0:b9164b348919 17 #include "nRF5xDiscoveredCharacteristic.h"
MrBedfordVan 0:b9164b348919 18 #include "nRF5xGattClient.h"
MrBedfordVan 0:b9164b348919 19 #include "ble_gatt.h"
MrBedfordVan 0:b9164b348919 20
MrBedfordVan 0:b9164b348919 21 void
MrBedfordVan 0:b9164b348919 22 nRF5xDiscoveredCharacteristic::setup(nRF5xGattClient *gattcIn,
MrBedfordVan 0:b9164b348919 23 Gap::Handle_t connectionHandleIn,
MrBedfordVan 0:b9164b348919 24 ble_gatt_char_props_t propsIn,
MrBedfordVan 0:b9164b348919 25 GattAttribute::Handle_t declHandleIn,
MrBedfordVan 0:b9164b348919 26 GattAttribute::Handle_t valueHandleIn)
MrBedfordVan 0:b9164b348919 27 {
MrBedfordVan 0:b9164b348919 28 gattc = gattcIn;
MrBedfordVan 0:b9164b348919 29 connHandle = connectionHandleIn;
MrBedfordVan 0:b9164b348919 30 declHandle = declHandleIn;
MrBedfordVan 0:b9164b348919 31 valueHandle = valueHandleIn;
MrBedfordVan 0:b9164b348919 32
MrBedfordVan 0:b9164b348919 33 props._broadcast = propsIn.broadcast;
MrBedfordVan 0:b9164b348919 34 props._read = propsIn.read;
MrBedfordVan 0:b9164b348919 35 props._writeWoResp = propsIn.write_wo_resp;
MrBedfordVan 0:b9164b348919 36 props._write = propsIn.write;
MrBedfordVan 0:b9164b348919 37 props._notify = propsIn.notify;
MrBedfordVan 0:b9164b348919 38 props._indicate = propsIn.indicate;
MrBedfordVan 0:b9164b348919 39 props._authSignedWrite = propsIn.auth_signed_wr;
MrBedfordVan 0:b9164b348919 40 }
MrBedfordVan 0:b9164b348919 41
MrBedfordVan 0:b9164b348919 42 void
MrBedfordVan 0:b9164b348919 43 nRF5xDiscoveredCharacteristic::setup(nRF5xGattClient *gattcIn,
MrBedfordVan 0:b9164b348919 44 Gap::Handle_t connectionHandleIn,
MrBedfordVan 0:b9164b348919 45 UUID::ShortUUIDBytes_t uuidIn,
MrBedfordVan 0:b9164b348919 46 ble_gatt_char_props_t propsIn,
MrBedfordVan 0:b9164b348919 47 GattAttribute::Handle_t declHandleIn,
MrBedfordVan 0:b9164b348919 48 GattAttribute::Handle_t valueHandleIn)
MrBedfordVan 0:b9164b348919 49 {
MrBedfordVan 0:b9164b348919 50 gattc = gattcIn;
MrBedfordVan 0:b9164b348919 51 connHandle = connectionHandleIn;
MrBedfordVan 0:b9164b348919 52 uuid = uuidIn;
MrBedfordVan 0:b9164b348919 53 declHandle = declHandleIn;
MrBedfordVan 0:b9164b348919 54 valueHandle = valueHandleIn;
MrBedfordVan 0:b9164b348919 55
MrBedfordVan 0:b9164b348919 56 props._broadcast = propsIn.broadcast;
MrBedfordVan 0:b9164b348919 57 props._read = propsIn.read;
MrBedfordVan 0:b9164b348919 58 props._writeWoResp = propsIn.write_wo_resp;
MrBedfordVan 0:b9164b348919 59 props._write = propsIn.write;
MrBedfordVan 0:b9164b348919 60 props._notify = propsIn.notify;
MrBedfordVan 0:b9164b348919 61 props._indicate = propsIn.indicate;
MrBedfordVan 0:b9164b348919 62 props._authSignedWrite = propsIn.auth_signed_wr;
MrBedfordVan 0:b9164b348919 63 }