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
common/BLEDevice.cpp@325:501ad8b8bbe5, 2015-03-23 (annotated)
- Committer:
- rgrover1
- Date:
- Mon Mar 23 16:28:09 2015 +0000
- Revision:
- 325:501ad8b8bbe5
- Parent:
- 260:ea7f9f14cc15
- Child:
- 528:8d21604fe31d
Synchronized with git rev c7a2b9bb
Author: Rohit Grover
Release 0.3.0
==============
Enhancements
~~~~~~~~~~~~
* BLEDevice::setAdvertisingInterval() uses milliseconds as the unit for its
argument. If advertising interval is set to 0, advertising is stopped. If
advertising interval is smaller than the minimum value supported, then the
minimum value is used instead.
* Add an enumeration called GattCharacteristicAuthCBReply_t to capture a
status code from read/write authorization callback. Previously it used to
return only a bool.
* Add APIs for getMinAdvertisingInterval() and variants.
Bugfixes
~~~~~~~~
* URIBeaconConfigService uses better write-authorization filters. It now
passes tests defined in Google's validator app.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| rgrover1 | 260:ea7f9f14cc15 | 1 | /* mbed Microcontroller Library |
| rgrover1 | 260:ea7f9f14cc15 | 2 | * Copyright (c) 2006-2013 ARM Limited |
| rgrover1 | 260:ea7f9f14cc15 | 3 | * |
| rgrover1 | 260:ea7f9f14cc15 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| rgrover1 | 260:ea7f9f14cc15 | 5 | * you may not use this file except in compliance with the License. |
| rgrover1 | 260:ea7f9f14cc15 | 6 | * You may obtain a copy of the License at |
| rgrover1 | 260:ea7f9f14cc15 | 7 | * |
| rgrover1 | 260:ea7f9f14cc15 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| rgrover1 | 260:ea7f9f14cc15 | 9 | * |
| rgrover1 | 260:ea7f9f14cc15 | 10 | * Unless required by applicable law or agreed to in writing, software |
| rgrover1 | 260:ea7f9f14cc15 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| rgrover1 | 260:ea7f9f14cc15 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| rgrover1 | 260:ea7f9f14cc15 | 13 | * See the License for the specific language governing permissions and |
| rgrover1 | 260:ea7f9f14cc15 | 14 | * limitations under the License. |
| rgrover1 | 260:ea7f9f14cc15 | 15 | */ |
| rgrover1 | 260:ea7f9f14cc15 | 16 | |
| rgrover1 | 260:ea7f9f14cc15 | 17 | #include "BLEDevice.h" |
| rgrover1 | 260:ea7f9f14cc15 | 18 | |
| rgrover1 | 260:ea7f9f14cc15 | 19 | #if defined(TARGET_OTA_ENABLED) |
| rgrover1 | 260:ea7f9f14cc15 | 20 | #include "DFUService.h" |
| rgrover1 | 260:ea7f9f14cc15 | 21 | #endif |
| rgrover1 | 260:ea7f9f14cc15 | 22 | |
| rgrover1 | 260:ea7f9f14cc15 | 23 | ble_error_t |
| rgrover1 | 260:ea7f9f14cc15 | 24 | BLEDevice::init() |
| rgrover1 | 260:ea7f9f14cc15 | 25 | { |
| rgrover1 | 260:ea7f9f14cc15 | 26 | ble_error_t err = transport->init(); |
| rgrover1 | 260:ea7f9f14cc15 | 27 | if (err != BLE_ERROR_NONE) { |
| rgrover1 | 260:ea7f9f14cc15 | 28 | return err; |
| rgrover1 | 260:ea7f9f14cc15 | 29 | } |
| rgrover1 | 260:ea7f9f14cc15 | 30 | |
| rgrover1 | 260:ea7f9f14cc15 | 31 | /* Platforms enabled for DFU should introduce the DFU Service into |
| rgrover1 | 260:ea7f9f14cc15 | 32 | * applications automatically. */ |
| rgrover1 | 260:ea7f9f14cc15 | 33 | #if defined(TARGET_OTA_ENABLED) |
| rgrover1 | 260:ea7f9f14cc15 | 34 | static DFUService dfu(*this); // defined static so that the object remains alive |
| rgrover1 | 260:ea7f9f14cc15 | 35 | #endif // TARGET_OTA_ENABLED |
| rgrover1 | 260:ea7f9f14cc15 | 36 | |
| rgrover1 | 260:ea7f9f14cc15 | 37 | return BLE_ERROR_NONE; |
| rgrover1 | 260:ea7f9f14cc15 | 38 | } |
