mirror of https://github.com/ARMmbed/mbed-os.git
Nanostack: Add required header file and namespace element instead add all
parent
1fe633799d
commit
a47c6b8139
|
@ -35,7 +35,7 @@ Nanostack::LoWPANNDInterface *LoWPANNDInterface::get_interface() const
|
|||
nsapi_error_t LoWPANNDInterface::do_initialize()
|
||||
{
|
||||
if (!_interface) {
|
||||
_interface = new (nothrow) Nanostack::LoWPANNDInterface(*_phy);
|
||||
_interface = new (std::nothrow) Nanostack::LoWPANNDInterface(*_phy);
|
||||
if (!_interface) {
|
||||
return NSAPI_ERROR_NO_MEMORY;
|
||||
}
|
||||
|
|
|
@ -138,7 +138,7 @@ int8_t EMACPhy::phy_register()
|
|||
phy.phy_tx_done_cb = NULL;
|
||||
|
||||
emac.set_memory_manager(memory_manager);
|
||||
emac.set_link_input_cb(callback(this, &EMACPhy::emac_phy_rx));
|
||||
emac.set_link_input_cb(mbed::callback(this, &EMACPhy::emac_phy_rx));
|
||||
|
||||
if (!emac.power_up()) {
|
||||
return -1;
|
||||
|
@ -183,7 +183,7 @@ nsapi_error_t Nanostack::add_ethernet_interface(EMAC &emac, bool default_if, Nan
|
|||
return NSAPI_ERROR_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
single_phy = new (nothrow) EMACPhy(this->memory_manager, emac);
|
||||
single_phy = new (std::nothrow) EMACPhy(this->memory_manager, emac);
|
||||
if (!single_phy) {
|
||||
return NSAPI_ERROR_NO_MEMORY;
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ nsapi_error_t Nanostack::add_ethernet_interface(EMAC &emac, bool default_if, Nan
|
|||
|
||||
Nanostack::EthernetInterface *interface;
|
||||
|
||||
interface = new (nothrow) Nanostack::EthernetInterface(*single_phy);
|
||||
interface = new (std::nothrow) Nanostack::EthernetInterface(*single_phy);
|
||||
if (!interface) {
|
||||
return NSAPI_ERROR_NO_MEMORY;
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ nsapi_error_t NanostackEthernetInterface::initialize(NanostackEthernetPhy *phy)
|
|||
return NSAPI_ERROR_PARAMETER;
|
||||
}
|
||||
|
||||
_interface = new (nothrow) Nanostack::EthernetInterface(*phy);
|
||||
_interface = new (std::nothrow) Nanostack::EthernetInterface(*phy);
|
||||
if (!_interface) {
|
||||
return NSAPI_ERROR_NO_MEMORY;
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ Nanostack::ThreadInterface *ThreadInterface::get_interface() const
|
|||
nsapi_error_t ThreadInterface::do_initialize()
|
||||
{
|
||||
if (!_interface) {
|
||||
_interface = new (nothrow) Nanostack::ThreadInterface(*_phy);
|
||||
_interface = new (std::nothrow) Nanostack::ThreadInterface(*_phy);
|
||||
if (!_interface) {
|
||||
return NSAPI_ERROR_NO_MEMORY;
|
||||
}
|
||||
|
|
|
@ -17,11 +17,17 @@
|
|||
// Include before mbed.h to properly get UINT*_C()
|
||||
#include "ns_types.h"
|
||||
|
||||
#include "mbed.h"
|
||||
#include "platform/SingletonPtr.h"
|
||||
#include "platform/arm_hal_timer.h"
|
||||
#include "platform/arm_hal_interrupt.h"
|
||||
#include <mbed_assert.h>
|
||||
#include "platform/mbed_assert.h"
|
||||
#include "Timeout.h"
|
||||
#include "Timer.h"
|
||||
#include "events/Event.h"
|
||||
#include "events/mbed_shared_queues.h"
|
||||
|
||||
using namespace mbed;
|
||||
using namespace events;
|
||||
|
||||
static SingletonPtr<Timer> timer;
|
||||
static SingletonPtr<Timeout> timeout;
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
|
||||
/* Nanostack implementation of NetworkSocketAPI */
|
||||
|
||||
#include "mbed.h"
|
||||
#include "rtos.h"
|
||||
#include "Nanostack.h"
|
||||
#include "NanostackLockGuard.h"
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#ifndef NANOSTACK_H_
|
||||
#define NANOSTACK_H_
|
||||
|
||||
#include "mbed.h"
|
||||
#include "OnboardNetworkStack.h"
|
||||
#include "NanostackMemoryManager.h"
|
||||
#include "MeshInterface.h"
|
||||
|
|
Loading…
Reference in New Issue