Skip to content

mbed.h includes removed #9210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jan 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
#include "nanostack/platform/arm_hal_phy.h"
#include "mbed_trace.h"
#include "mbed_toolchain.h"
#include "DigitalIn.h"
#include "DigitalOut.h"
#include "InterruptIn.h"
#include "SPI.h"
#include "inttypes.h"
#include "Timeout.h"

#define TRACE_GROUP "AtRF"

Expand Down Expand Up @@ -219,8 +225,9 @@ static inline rf_trx_states_t rf_if_trx_status_from_full(uint8_t full_trx_status
}

#ifdef MBED_CONF_RTOS_PRESENT
#include "mbed.h"

#include "rtos.h"

using namespace mbed;
using namespace rtos;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@
#define NANOSTACK_PHY_MCR20A_H_

#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI && defined(MBED_CONF_RTOS_PRESENT)
#include "mbed.h"
#include "inttypes.h"
#include "NanostackRfPhy.h"
#include "DigitalIn.h"
#include "DigitalOut.h"
#include "InterruptIn.h"
#include "SPI.h"
#include "rtos.h"

// Arduino pin defaults for convenience
#if !defined(MCR20A_SPI_MOSI)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "nanostack/platform/arm_hal_phy.h"
#include <string.h>
#include "rtos.h"
#include "mbed_interface.h"

using namespace mbed;
using namespace rtos;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
#include "mbed_toolchain.h"
#include "common_functions.h"
#include <Timer.h>
#include "Timeout.h"
#include "Thread.h"
#include "mbed_wait_api.h"

using namespace mbed;
using namespace rtos;

#define TRACE_GROUP "s2lp"

Expand Down Expand Up @@ -216,7 +222,7 @@ static const phy_device_channel_page_s phy_channel_pages[] = {
};

#ifdef MBED_CONF_RTOS_PRESENT
#include "mbed.h"

#include "rtos.h"

static void rf_irq_task_process_irq();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@
#define NANOSTACK_PHY_S2LP_H_

#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI && defined(MBED_CONF_RTOS_PRESENT)
#include "mbed.h"
#include "inttypes.h"
#include "NanostackRfPhy.h"
#include "DigitalIn.h"
#include "DigitalOut.h"
#include "InterruptIn.h"
#include "SPI.h"

// Uncomment to use testing gpios attached to TX/RX processes
//#define TEST_GPIOS_ENABLED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "FlashIAPBlockDevice.h"
#include "mbed_critical.h"

#include "mbed.h"
using namespace mbed;
#include <inttypes.h>

Expand Down
7 changes: 4 additions & 3 deletions features/FEATURE_BLE/ble/services/EddystoneConfigService.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@

#warning ble/services/EddystoneConfigService.h is deprecated. Please use the example in 'github.com/ARMmbed/ble-examples/tree/master/BLE_EddystoneService'.

#include "mbed.h"
#include "ble/BLE.h"
#include "ble/services/EddystoneService.h"
#include "Timer.h"
#include "Ticker.h"

#define UUID_URI_BEACON(FIRST, SECOND) { \
0xee, 0x0c, FIRST, SECOND, 0x87, 0x86, 0x40, 0xba, \
Expand Down Expand Up @@ -497,8 +498,8 @@ class EddystoneConfigService

BLEDevice &ble;
Params_t &params;
Ticker timeSinceBootTick;
Timeout switchFrame;
mbed::Ticker timeSinceBootTick;
mbed::Timeout switchFrame;
// Default value that is restored on reset.
PowerLevels_t &defaultAdvPowerLevels; // This goes into the advertising frames (radio power measured at 1m from device).
PowerLevels_t &radioPowerLevels; // This configures the power levels of the radio.
Expand Down
17 changes: 10 additions & 7 deletions features/FEATURE_BLE/ble/services/EddystoneService.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@
#warning ble/services/EddystoneService.h is deprecated. Please use the example in 'github.com/ARMmbed/ble-examples/tree/master/BLE_EddystoneService'.

#include "ble/BLE.h"
#include "mbed.h"
#include "CircularBuffer.h"
#include "Timer.h"
#include "Ticker.h"
#include "Timeout.h"

static const uint8_t BEACON_EDDYSTONE[] = {0xAA, 0xFE};

//Debug is disabled by default
Expand Down Expand Up @@ -76,7 +79,7 @@ class EddystoneService
void (*frames[EDDYSTONE_MAX_FRAMETYPE])(uint8_t *, uint32_t);
static const int URI_DATA_MAX = 18;
typedef uint8_t UriData_t[URI_DATA_MAX];
CircularBuffer<FrameTypes, EDDYSTONE_MAX_FRAMETYPE> overflow;
mbed::CircularBuffer<FrameTypes, EDDYSTONE_MAX_FRAMETYPE> overflow;

// UID Frame Type subfields
static const int UID_NAMESPACEID_SIZE = 10;
Expand Down Expand Up @@ -543,11 +546,11 @@ class EddystoneService
BLEDevice &ble;
uint16_t advPeriodus;
uint8_t txPower;
Timer timeSinceBootTimer;
mbed::Timer timeSinceBootTimer;
volatile uint32_t lastBootTimerRead;
volatile bool advLock;
volatile FrameTypes frameIndex;
Timeout stopAdv;
mbed::Timeout stopAdv;


// URI Frame Variables
Expand All @@ -556,7 +559,7 @@ class EddystoneService
int8_t defaultUrlPower;
bool urlIsSet; // flag that enables / disable URI Frames
float urlAdvPeriod; // how long the url frame will be advertised for
Ticker urlTicker;
mbed::Ticker urlTicker;

// UID Frame Variables
UIDNamespaceID_t defaultUidNamespaceID;
Expand All @@ -565,7 +568,7 @@ class EddystoneService
uint16_t uidRFU;
bool uidIsSet; // flag that enables / disable UID Frames
float uidAdvPeriod; // how long the uid frame will be advertised for
Ticker uidTicker;
mbed::Ticker uidTicker;

// TLM Frame Variables
uint8_t TlmVersion;
Expand All @@ -575,7 +578,7 @@ class EddystoneService
volatile uint32_t TlmTimeSinceBoot;
bool tlmIsSet; // flag that enables / disables TLM frames
float TlmAdvPeriod; // number of minutes between adv frames
Ticker tlmTicker;
mbed::Ticker tlmTicker;

public:
/*
Expand Down
1 change: 0 additions & 1 deletion features/FEATURE_BLE/ble/services/UARTService.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "mbed-drivers/mbed.h"
#include "mbed-drivers/Stream.h"
#else
#include "mbed.h"
#include "Stream.h"
#endif

Expand Down
2 changes: 1 addition & 1 deletion features/FEATURE_BLE/ble/services/URIBeaconConfigService.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#ifdef YOTTA_CFG_MBED_OS
#include "mbed-drivers/mbed.h"
#else
#include "mbed.h"

#endif

extern const uint8_t UUID_URI_BEACON_SERVICE[UUID::LENGTH_OF_LONG_UUID];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

#ifndef MESHINTERFACENANOSTACK_H
#define MESHINTERFACENANOSTACK_H
#include "mbed.h"

#include "MeshInterface.h"
#include "NanostackRfPhy.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "nanostack/net_interface.h"
#include "thread_management_if.h"
#include "ip6string.h"
#include "mbed_error.h"

char *Nanostack::Interface::get_ip_address(char *buf, nsapi_size_t buflen)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "arm_hal_phy.h"
#include "EMAC.h"
#include "enet_tasklet.h"
#include "mbed_interface.h"

class EMACPhy : public NanostackEthernetPhy {
public:
Expand Down
2 changes: 1 addition & 1 deletion features/nanostack/mbed-mesh-api/source/WisunInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Nanostack::WisunInterface *WisunInterface::get_interface() const
nsapi_error_t WisunInterface::do_initialize()
{
if (!_interface) {
_interface = new (nothrow) Nanostack::WisunInterface(*_phy);
_interface = new (std::nothrow) Nanostack::WisunInterface(*_phy);
if (!_interface) {
return NSAPI_ERROR_NO_MEMORY;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#ifndef __INCLUDE_CALLBACK_HANDLER_H__
#define __INCLUDE_CALLBACK_HANDLER_H__

#include "mbed.h"
#include "mesh_interface_types.h"

#ifdef __cplusplus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@
#include "ns_types.h"
#include "fhss_api.h"
#include "fhss_config.h"
#include "mbed.h"
#include "mbed_trace.h"
#include "platform/arm_hal_interrupt.h"
#include <Timer.h>
#include "equeue.h"
#include "EventQueue.h"
#include "mbed_shared_queues.h"
#include "Timeout.h"

#define TRACE_GROUP "fhdr"
#ifndef NUMBER_OF_SIMULTANEOUS_TIMEOUTS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#ifndef NANOSTACK_INTERFACE_H_
#define NANOSTACK_INTERFACE_H_

#include "mbed.h"
#include "MeshInterface.h"
// Include here for backward compatibility
#include "LoWPANNDInterface.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "mbed.h"

#include "ns_types.h"
#include <string.h>
#include "common_functions.h"
Expand All @@ -33,6 +33,10 @@ extern "C" {

#define SIGNAL_COUNT_RADIO 1

#include "Thread.h"
#include "ThisThread.h"
#include "mbed_error.h"
using namespace rtos;
static void rf_thread_loop();
Thread rf_thread(osPriorityRealtime, RF_THREAD_STACK_SIZE);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#ifndef NANOSTACK_PHY_NCS36510_H_
#define NANOSTACK_PHY_NCS36510_H_

#include "mbed.h"
#include "NanostackRfPhy.h"

class NanostackRfPhyNcs36510 : public NanostackRfPhy {
Expand Down
3 changes: 2 additions & 1 deletion features/netsocket/NetworkStack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@

#include "NetworkStack.h"
#include "nsapi_dns.h"
#include "mbed.h"
#include "stddef.h"
#include <new>
#include "EventQueue.h"
#include "mbed_shared_queues.h"

// Default NetworkStack operations
const char *NetworkStack::get_ip_address()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
#include "mbed_trace.h"
#define TRACE_GROUP "UCID"

#include "mbed_wait_api.h"

using namespace mbed;

/**
* PDP (packet data profile) Context
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@

#include "CellularBase.h"
#include "platform/ATCmdParser.h"
#include "mbed.h"
#include "ATCmdParser.h"
#include "FileHandle.h"
#include "Callback.h"

#if NSAPI_PPP_AVAILABLE

Expand Down Expand Up @@ -114,7 +116,7 @@ class PPPCellularInterface : public CellularBase {
* use - this permits a derived class to pass a pointer to a not-yet-constructed member object.
*/
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.")
PPPCellularInterface(FileHandle *fh, bool debug = false);
PPPCellularInterface(mbed::FileHandle *fh, bool debug = false);

/** Destructor
*
Expand Down Expand Up @@ -286,7 +288,7 @@ class PPPCellularInterface : public CellularBase {
* @param status_cb The callback for status changes
*/
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.")
virtual void attach(Callback<void(nsapi_event_t, intptr_t)> status_cb);
virtual void attach(mbed::Callback<void(nsapi_event_t, intptr_t)> status_cb);

/** Get the connection status
*
Expand All @@ -308,16 +310,16 @@ class PPPCellularInterface : public CellularBase {
virtual nsapi_error_t set_blocking(bool blocking);

private:
FileHandle *_fh;
ATCmdParser *_at;
mbed::FileHandle *_fh;
mbed::ATCmdParser *_at;
const char *_new_pin;
const char *_pin;
const char *_apn;
const char *_uname;
const char *_pwd;
bool _debug_trace_on;
nsapi_ip_stack_t _stack;
Callback<void(nsapi_event_t, intptr_t)> _connection_status_cb;
mbed::Callback<void(nsapi_event_t, intptr_t)> _connection_status_cb;
nsapi_connection_status_t _connect_status;
bool _connect_is_blocking;
void base_initialization();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class UARTCellularInterface : public PPPCellularInterface {
virtual ~UARTCellularInterface();

private:
UARTSerial _serial;
mbed::UARTSerial _serial;
PinName _dcd_pin;
bool _active_high;

Expand Down
5 changes: 1 addition & 4 deletions rtos/rtos.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@
using namespace rtos;
#endif

/* Get mbed lib version number, as RTOS depends on mbed lib features
like mbed_error, Callback and others.
*/
#include "mbed.h"
#include "platform/mbed_version.h"

#endif

Expand Down
Loading