Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BLE_API by
source/BLE.cpp@738:9c2edf20ea56, 2015-07-06 (annotated)
- Committer:
- rgrover1
- Date:
- Mon Jul 06 10:10:35 2015 +0100
- Revision:
- 738:9c2edf20ea56
- Parent:
- 732:916f36dd93f8
Synchronized with git rev 33a70b46
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 ...) and
GattHVXCallbackParams.
* Add empty (void) declarations for unused variables in the default
implementations for several API (in Gap, GattServer, GattClient, etc). This
avoids compiler warnings.
Bugfixes
~~~~~~~~
none.
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 | } |
