mirror of https://github.com/ARMmbed/mbed-os.git
BLE: Fix uses of mbed.h
parent
053e81ba0f
commit
5943a7360c
|
@ -19,10 +19,10 @@
|
|||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <BLETypes.h>
|
||||
#include "platform/Callback.h"
|
||||
#include "ble/common/BLETypes.h"
|
||||
#include "ble/driver/CordioHCITransportDriver.h"
|
||||
#include "ble/common/blecommon.h"
|
||||
#include "mbed.h"
|
||||
|
||||
// FIXME: make this invisible!
|
||||
#include "wsf_buf.h"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#if (DEVICE_SERIAL && DEVICE_SERIAL_FC) || defined(DOXYGEN_ONLY)
|
||||
|
||||
#include <cstdint>
|
||||
#include "mbed.h"
|
||||
#include "drivers/UnbufferedSerial.h"
|
||||
#include "ble/driver/CordioHCITransportDriver.h"
|
||||
|
||||
namespace ble {
|
||||
|
@ -69,7 +69,7 @@ private:
|
|||
|
||||
// Use UnbufferedSerial as we don't require locking primitives.
|
||||
// We access the peripheral in interrupt context.
|
||||
UnbufferedSerial uart;
|
||||
mbed::UnbufferedSerial uart;
|
||||
PinName cts;
|
||||
PinName rts;
|
||||
};
|
||||
|
|
|
@ -27,19 +27,19 @@ void H4TransportDriver::initialize()
|
|||
{
|
||||
uart.format(
|
||||
/* bits */ 8,
|
||||
/* parity */ SerialBase::None,
|
||||
/* parity */ mbed::SerialBase::None,
|
||||
/* stop bit */ 1
|
||||
);
|
||||
|
||||
uart.set_flow_control(
|
||||
/* flow */ SerialBase::RTSCTS,
|
||||
/* flow */ mbed::SerialBase::RTSCTS,
|
||||
/* rts */ rts,
|
||||
/* cts */ cts
|
||||
);
|
||||
|
||||
uart.attach(
|
||||
callback(this, &H4TransportDriver::on_controller_irq),
|
||||
SerialBase::RxIrq
|
||||
mbed::callback(this, &H4TransportDriver::on_controller_irq),
|
||||
mbed::SerialBase::RxIrq
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "mbed.h"
|
||||
#include "platform/CriticalSectionLock.h"
|
||||
#include "hal/us_ticker_api.h"
|
||||
#include "platform/mbed_assert.h"
|
||||
|
@ -309,7 +308,7 @@ const ble::SecurityManager &BLEInstanceBase::getSecurityManager() const
|
|||
|
||||
void BLEInstanceBase::waitForEvent()
|
||||
{
|
||||
static Timeout nextTimeout;
|
||||
static mbed::Timeout nextTimeout;
|
||||
timestamp_t nextTimestamp;
|
||||
bool_t pTimerRunning;
|
||||
|
||||
|
@ -633,8 +632,8 @@ void BLEInstanceBase::callDispatcher()
|
|||
|
||||
wsfOsDispatcher();
|
||||
|
||||
static LowPowerTimeout nextTimeout;
|
||||
CriticalSectionLock critical_section;
|
||||
static mbed::LowPowerTimeout nextTimeout;
|
||||
mbed::CriticalSectionLock critical_section;
|
||||
|
||||
if (wsfOsReadyToSleep()) {
|
||||
// setup an mbed timer for the next Cordio timeout
|
||||
|
|
|
@ -14,12 +14,12 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "mbed.h"
|
||||
#include "cordio_stack/platform/include/pal_types.h"
|
||||
#include "cordio_stack/platform/include/pal_uart.h"
|
||||
#include "hal/ticker_api.h"
|
||||
#include "mbed_critical.h"
|
||||
#include "platform/mbed_critical.h"
|
||||
#include "pal_codec.h"
|
||||
#include "platform/mbed_error.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
Loading…
Reference in New Issue