Skip to content

Commit 5943a73

Browse files
committed
BLE: Fix uses of mbed.h
1 parent 053e81b commit 5943a73

File tree

5 files changed

+13
-14
lines changed

5 files changed

+13
-14
lines changed

connectivity/FEATURE_BLE/include/ble/driver/CordioHCIDriver.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919

2020
#include <cstddef>
2121
#include <cstdint>
22-
#include <BLETypes.h>
22+
#include "platform/Callback.h"
23+
#include "ble/common/BLETypes.h"
2324
#include "ble/driver/CordioHCITransportDriver.h"
2425
#include "ble/common/blecommon.h"
25-
#include "mbed.h"
2626

2727
// FIXME: make this invisible!
2828
#include "wsf_buf.h"

connectivity/FEATURE_BLE/include/ble/driver/H4TransportDriver.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#if (DEVICE_SERIAL && DEVICE_SERIAL_FC) || defined(DOXYGEN_ONLY)
2121

2222
#include <cstdint>
23-
#include "mbed.h"
23+
#include "drivers/UnbufferedSerial.h"
2424
#include "ble/driver/CordioHCITransportDriver.h"
2525

2626
namespace ble {
@@ -69,7 +69,7 @@ class H4TransportDriver : public CordioHCITransportDriver {
6969

7070
// Use UnbufferedSerial as we don't require locking primitives.
7171
// We access the peripheral in interrupt context.
72-
UnbufferedSerial uart;
72+
mbed::UnbufferedSerial uart;
7373
PinName cts;
7474
PinName rts;
7575
};

connectivity/FEATURE_BLE/source/cordio/driver/H4TransportDriver.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,19 @@ void H4TransportDriver::initialize()
2727
{
2828
uart.format(
2929
/* bits */ 8,
30-
/* parity */ SerialBase::None,
30+
/* parity */ mbed::SerialBase::None,
3131
/* stop bit */ 1
3232
);
3333

3434
uart.set_flow_control(
35-
/* flow */ SerialBase::RTSCTS,
35+
/* flow */ mbed::SerialBase::RTSCTS,
3636
/* rts */ rts,
3737
/* cts */ cts
3838
);
3939

4040
uart.attach(
41-
callback(this, &H4TransportDriver::on_controller_irq),
42-
SerialBase::RxIrq
41+
mbed::callback(this, &H4TransportDriver::on_controller_irq),
42+
mbed::SerialBase::RxIrq
4343
);
4444
}
4545

connectivity/FEATURE_BLE/source/cordio/source/BLEInstanceBaseImpl.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
* limitations under the License.
1717
*/
1818

19-
#include "mbed.h"
2019
#include "platform/CriticalSectionLock.h"
2120
#include "hal/us_ticker_api.h"
2221
#include "platform/mbed_assert.h"
@@ -309,7 +308,7 @@ const ble::SecurityManager &BLEInstanceBase::getSecurityManager() const
309308

310309
void BLEInstanceBase::waitForEvent()
311310
{
312-
static Timeout nextTimeout;
311+
static mbed::Timeout nextTimeout;
313312
timestamp_t nextTimestamp;
314313
bool_t pTimerRunning;
315314

@@ -633,8 +632,8 @@ void BLEInstanceBase::callDispatcher()
633632

634633
wsfOsDispatcher();
635634

636-
static LowPowerTimeout nextTimeout;
637-
CriticalSectionLock critical_section;
635+
static mbed::LowPowerTimeout nextTimeout;
636+
mbed::CriticalSectionLock critical_section;
638637

639638
if (wsfOsReadyToSleep()) {
640639
// setup an mbed timer for the next Cordio timeout

connectivity/FEATURE_BLE/source/cordio/stack_adaptation/pal_mbed_os_adaptation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
* limitations under the License.
1515
*/
1616

17-
#include "mbed.h"
1817
#include "cordio_stack/platform/include/pal_types.h"
1918
#include "cordio_stack/platform/include/pal_uart.h"
2019
#include "hal/ticker_api.h"
21-
#include "mbed_critical.h"
20+
#include "platform/mbed_critical.h"
2221
#include "pal_codec.h"
22+
#include "platform/mbed_error.h"
2323

2424
#ifdef __cplusplus
2525
extern "C" {

0 commit comments

Comments
 (0)