Skip to content

Commit e8cbc42

Browse files
author
Rohit Grover
committed
Release 0.2.2
============= Features ~~~~~~~~ * Platforms enabled for DFU should introduce the DFU Service into applications automatically. Bugfixes ~~~~~~~~ None. Compatibility ~~~~~~~~~~~~~ No APIs have changed between 0.2.0 and this release. Applications need not be updated.
1 parent 3f87e06 commit e8cbc42

File tree

2 files changed

+38
-6
lines changed

2 files changed

+38
-6
lines changed

common/BLEDevice.cpp

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2006-2013 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#include "BLEDevice.h"
18+
19+
#if defined(TARGET_OTA_ENABLED)
20+
#include "DFUService.h"
21+
#endif
22+
23+
ble_error_t
24+
BLEDevice::init()
25+
{
26+
ble_error_t err = transport->init();
27+
if (err != BLE_ERROR_NONE) {
28+
return err;
29+
}
30+
31+
/* Platforms enabled for DFU should introduce the DFU Service into
32+
* applications automatically. */
33+
#if defined(TARGET_OTA_ENABLED)
34+
DFUService dfu(*this);
35+
#endif // TARGET_OTA_ENABLED
36+
37+
return BLE_ERROR_NONE;
38+
}

public/BLEDevice.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -353,12 +353,6 @@ class BLEDevice
353353
/* BLEDevice methods. Most of these simply forward the calls to the underlying
354354
* transport.*/
355355

356-
inline ble_error_t
357-
BLEDevice::init()
358-
{
359-
return transport->init();
360-
}
361-
362356
inline ble_error_t
363357
BLEDevice::reset(void)
364358
{

0 commit comments

Comments
 (0)