Skip to content

Commit 9226c58

Browse files
author
Cruz Monrreal
authored
Merge pull request #8550 from deepikabhavnani/mbed_h_fixes
Add required namespace instead of relying on mbed.h
2 parents 66968c5 + 451cf7c commit 9226c58

File tree

7 files changed

+24
-14
lines changed

7 files changed

+24
-14
lines changed

components/802.15.4_RF/atmel-rf-driver/source/NanostackRfPhyAtmel.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ static inline rf_trx_states_t rf_if_trx_status_from_full(uint8_t full_trx_status
220220
#ifdef MBED_CONF_RTOS_PRESENT
221221
#include "mbed.h"
222222
#include "rtos.h"
223+
using namespace mbed;
224+
using namespace rtos;
223225

224226
static void rf_if_irq_task_process_irq();
225227

components/802.15.4_RF/mcr20a-rf-driver/mcr20a-rf-driver/NanostackRfPhyMcr20a.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ class NanostackRfPhyMcr20a : public NanostackRfPhy {
5555
virtual void set_mac_address(uint8_t *mac);
5656

5757
private:
58-
SPI _spi;
59-
DigitalOut _rf_cs;
60-
DigitalOut _rf_rst;
61-
InterruptIn _rf_irq;
62-
DigitalIn _rf_irq_pin;
63-
Thread _irq_thread;
58+
mbed::SPI _spi;
59+
mbed::DigitalOut _rf_cs;
60+
mbed::DigitalOut _rf_rst;
61+
mbed::InterruptIn _rf_irq;
62+
mbed::DigitalIn _rf_irq_pin;
63+
rtos::Thread _irq_thread;
6464

6565
void _pins_set();
6666
void _pins_clear();

components/802.15.4_RF/mcr20a-rf-driver/source/NanostackRfPhyMcr20a.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
#include <string.h>
2424
#include "rtos.h"
2525

26+
using namespace mbed;
27+
using namespace rtos;
28+
2629
/* Freescale headers which are for C files */
2730
extern "C" {
2831
#include "MCR20Drv.h"

components/wifi/esp8266-driver/ESP8266/ESP8266.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
#include <cstring>
2222

23+
using namespace mbed;
24+
2325
#define ESP8266_DEFAULT_BAUD_RATE 115200
2426
#define ESP8266_ALL_SOCKET_IDS -1
2527

components/wifi/esp8266-driver/ESP8266/ESP8266.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ class ESP8266
227227
*
228228
* @param func A pointer to a void function, or 0 to set as none
229229
*/
230-
void sigio(Callback<void()> func);
230+
void sigio(mbed::Callback<void()> func);
231231

232232
/**
233233
* Attach a function to call whenever sigio happens in the serial
@@ -237,7 +237,7 @@ class ESP8266
237237
*/
238238
template <typename T, typename M>
239239
void sigio(T *obj, M method) {
240-
sigio(Callback<void()>(obj, method));
240+
sigio(mbed::Callback<void()>(obj, method));
241241
}
242242

243243
/**
@@ -271,9 +271,9 @@ class ESP8266
271271
static const int8_t SOCKET_COUNT = 5;
272272

273273
private:
274-
UARTSerial _serial;
275-
ATCmdParser _parser;
276-
Mutex _smutex; // Protect serial port access
274+
mbed::UARTSerial _serial;
275+
mbed::ATCmdParser _parser;
276+
rtos::Mutex _smutex; // Protect serial port access
277277

278278
struct packet {
279279
struct packet *next;
@@ -303,7 +303,7 @@ class ESP8266
303303
bool _closed;
304304
int _socket_open[SOCKET_COUNT];
305305
nsapi_connection_status_t _connection_status;
306-
Callback<void(nsapi_event_t, intptr_t)> _connection_status_cb;
306+
mbed::Callback<void(nsapi_event_t, intptr_t)> _connection_status_cb;
307307
};
308308

309309
#endif

features/nanostack/mbed-mesh-api/mbed-mesh-api/MeshInterfaceNanostack.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ class Nanostack::Interface : public OnboardNetworkStack::Interface, private mbed
5151
NanostackPhy &get_phy() const { return interface_phy; }
5252
int8_t interface_id;
5353
int8_t _device_id;
54-
Semaphore connect_semaphore;
54+
rtos::Semaphore connect_semaphore;
5555

56-
Callback<void(nsapi_event_t, intptr_t)> _connection_status_cb;
56+
mbed::Callback<void(nsapi_event_t, intptr_t)> _connection_status_cb;
5757
nsapi_connection_status_t _connect_status;
5858
nsapi_connection_status_t _previous_connection_status;
5959
bool _blocking;

features/nanostack/nanostack-hal-mbed-cmsis-rtos/arm_hal_fhss_timer.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
#define NUMBER_OF_SIMULTANEOUS_TIMEOUTS 2
2727
#endif //NUMBER_OF_SIMULTANEOUS_TIMEOUTS
2828

29+
using namespace mbed;
30+
using namespace events;
31+
2932
static Timer timer;
3033
static bool timer_initialized = false;
3134
static const fhss_api_t *fhss_active_handle = NULL;

0 commit comments

Comments
 (0)