Skip to content

Commit b86049d

Browse files
committed
BLE - Devirtualization of the legacy NRF51822 port.
1 parent 0323d91 commit b86049d

File tree

9 files changed

+262
-125
lines changed

9 files changed

+262
-125
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2019 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 "ble/GattServer.h"
18+
#include "source/GattServer.tpp"
19+
#include "nRF5xGattServer.h"
20+
21+
#include "ble/GattClient.h"
22+
#include "source/GattClient.tpp"
23+
#include "nRF5xGattClient.h"
24+
25+
#include "ble/gap/Gap.h"
26+
#include "ble/Gap.h"
27+
#include "source/gap/Gap.tpp"
28+
#include "source/LegacyGap.tpp"
29+
#include "nRF5xGap.h"
30+
31+
#include "ble/SecurityManager.h"
32+
#include "source/SecurityManager.tpp"
33+
#include "nRF5xSecurityManager.h"
34+
35+
template class ble::interface::GattServer<nRF5xGattServer>;
36+
37+
template class ble::interface::GattClient<nRF5xGattClient>;
38+
39+
template class ble::interface::LegacyGap<nRF5xGap>;
40+
template class ble::interface::Gap<nRF5xGap>;
41+
42+
template class ble::interface::SecurityManager<nRF5xSecurityManager>;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2019 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+
#ifndef BLE_IMPLEMENTATION_FORWARD_H_
18+
#define BLE_IMPLEMENTATION_FORWARD_H_
19+
20+
////////////////////////////////////////////////////////////////////////////////
21+
// Forward declarations of the implementation types
22+
//
23+
namespace ble {
24+
25+
namespace interface {
26+
27+
template<class Impl>
28+
class LegacyGap;
29+
30+
template<class Impl>
31+
class Gap;
32+
33+
template<class Impl>
34+
class GattClient;
35+
36+
template<class Impl>
37+
class SecurityManager;
38+
39+
template<class Impl>
40+
class GattServer;
41+
42+
} // namespace interface
43+
} // ble
44+
45+
class nRF5xGap;
46+
class nRF5xGattClient;
47+
class nRF5xGattServer;
48+
class nRF5xSecurityManager;
49+
50+
// implementation assembly
51+
namespace ble {
52+
namespace impl {
53+
// SECURITY MANAGER
54+
typedef interface::SecurityManager<nRF5xSecurityManager> SecurityManager;
55+
56+
// GAP
57+
typedef interface::LegacyGap<nRF5xGap> LegacyGap;
58+
59+
typedef interface::Gap<nRF5xGap> Gap;
60+
61+
// GATT CLIENT
62+
typedef interface::GattClient<nRF5xGattClient> GattClient;
63+
64+
// GATT SERVER
65+
typedef ble::interface::GattServer<nRF5xGattServer> GattServer;
66+
} // impl
67+
} // ble
68+
69+
70+
#endif //BLE_IMPLEMENTATION_FORWARD_H_

0 commit comments

Comments
 (0)