aa
Dependents: Peripheral_1_serial_copy Peripheral_1_serial 151006_1st_Scenario_normal
Fork of BLE_API by
source/BLE.cpp@822:86038b69609c, 2015-09-29 (annotated)
- Committer:
- rgrover1
- Date:
- Tue Sep 29 09:49:24 2015 +0100
- Revision:
- 822:86038b69609c
- Parent:
- 821:3cb854c7f930
- Child:
- 823:a0f080d1e836
Synchronized with git rev cc3db850
Author: Rohit Grover
minor improvement to comment header for GattServer::onDataRead()
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rgrover1 | 712:b04b5db36865 | 1 | /* mbed Microcontroller Library |
rgrover1 | 712:b04b5db36865 | 2 | * Copyright (c) 2006-2013 ARM Limited |
rgrover1 | 712:b04b5db36865 | 3 | * |
rgrover1 | 712:b04b5db36865 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
rgrover1 | 712:b04b5db36865 | 5 | * you may not use this file except in compliance with the License. |
rgrover1 | 712:b04b5db36865 | 6 | * You may obtain a copy of the License at |
rgrover1 | 712:b04b5db36865 | 7 | * |
rgrover1 | 712:b04b5db36865 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
rgrover1 | 712:b04b5db36865 | 9 | * |
rgrover1 | 712:b04b5db36865 | 10 | * Unless required by applicable law or agreed to in writing, software |
rgrover1 | 712:b04b5db36865 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
rgrover1 | 712:b04b5db36865 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
rgrover1 | 712:b04b5db36865 | 13 | * See the License for the specific language governing permissions and |
rgrover1 | 712:b04b5db36865 | 14 | * limitations under the License. |
rgrover1 | 712:b04b5db36865 | 15 | */ |
rgrover1 | 712:b04b5db36865 | 16 | |
rgrover1 | 712:b04b5db36865 | 17 | #include "ble/BLE.h" |
rgrover1 | 712:b04b5db36865 | 18 | |
rgrover1 | 712:b04b5db36865 | 19 | #if defined(TARGET_OTA_ENABLED) |
rgrover1 | 732:916f36dd93f8 | 20 | #include "ble/services/DFUService.h" |
rgrover1 | 712:b04b5db36865 | 21 | #endif |
rgrover1 | 712:b04b5db36865 | 22 | |
rgrover1 | 712:b04b5db36865 | 23 | ble_error_t |
rgrover1 | 712:b04b5db36865 | 24 | BLE::init() |
rgrover1 | 712:b04b5db36865 | 25 | { |
rgrover1 | 712:b04b5db36865 | 26 | ble_error_t err = transport->init(); |
rgrover1 | 712:b04b5db36865 | 27 | if (err != BLE_ERROR_NONE) { |
rgrover1 | 712:b04b5db36865 | 28 | return err; |
rgrover1 | 712:b04b5db36865 | 29 | } |
rgrover1 | 712:b04b5db36865 | 30 | |
rgrover1 | 712:b04b5db36865 | 31 | /* Platforms enabled for DFU should introduce the DFU Service into |
rgrover1 | 712:b04b5db36865 | 32 | * applications automatically. */ |
rgrover1 | 712:b04b5db36865 | 33 | #if defined(TARGET_OTA_ENABLED) |
rgrover1 | 712:b04b5db36865 | 34 | static DFUService dfu(*this); // defined static so that the object remains alive |
rgrover1 | 712:b04b5db36865 | 35 | #endif // TARGET_OTA_ENABLED |
rgrover1 | 712:b04b5db36865 | 36 | |
rgrover1 | 712:b04b5db36865 | 37 | return BLE_ERROR_NONE; |
rgrover1 | 712:b04b5db36865 | 38 | } |