Skip to content

Commit 54f7591

Browse files
author
Cruz Monrreal
authored
Merge pull request #9210 from AnttiKauppila/mbed_h_fix
mbed.h includes removed
2 parents a857e95 + 9c38ad7 commit 54f7591

File tree

25 files changed

+75
-40
lines changed

25 files changed

+75
-40
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
#include "nanostack/platform/arm_hal_phy.h"
2727
#include "mbed_trace.h"
2828
#include "mbed_toolchain.h"
29+
#include "DigitalIn.h"
30+
#include "DigitalOut.h"
31+
#include "InterruptIn.h"
32+
#include "SPI.h"
33+
#include "inttypes.h"
34+
#include "Timeout.h"
2935

3036
#define TRACE_GROUP "AtRF"
3137

@@ -219,8 +225,9 @@ static inline rf_trx_states_t rf_if_trx_status_from_full(uint8_t full_trx_status
219225
}
220226

221227
#ifdef MBED_CONF_RTOS_PRESENT
222-
#include "mbed.h"
228+
223229
#include "rtos.h"
230+
224231
using namespace mbed;
225232
using namespace rtos;
226233

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,13 @@
1818
#define NANOSTACK_PHY_MCR20A_H_
1919

2020
#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI && defined(MBED_CONF_RTOS_PRESENT)
21-
#include "mbed.h"
21+
#include "inttypes.h"
2222
#include "NanostackRfPhy.h"
23+
#include "DigitalIn.h"
24+
#include "DigitalOut.h"
25+
#include "InterruptIn.h"
26+
#include "SPI.h"
27+
#include "rtos.h"
2328

2429
// Arduino pin defaults for convenience
2530
#if !defined(MCR20A_SPI_MOSI)

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "nanostack/platform/arm_hal_phy.h"
2323
#include <string.h>
2424
#include "rtos.h"
25+
#include "mbed_interface.h"
2526

2627
using namespace mbed;
2728
using namespace rtos;

components/802.15.4_RF/stm-s2lp-rf-driver/source/NanostackRfPhys2lp.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
#include "mbed_toolchain.h"
2727
#include "common_functions.h"
2828
#include <Timer.h>
29+
#include "Timeout.h"
30+
#include "Thread.h"
31+
#include "mbed_wait_api.h"
32+
33+
using namespace mbed;
34+
using namespace rtos;
2935

3036
#define TRACE_GROUP "s2lp"
3137

@@ -216,7 +222,7 @@ static const phy_device_channel_page_s phy_channel_pages[] = {
216222
};
217223

218224
#ifdef MBED_CONF_RTOS_PRESENT
219-
#include "mbed.h"
225+
220226
#include "rtos.h"
221227

222228
static void rf_irq_task_process_irq();

components/802.15.4_RF/stm-s2lp-rf-driver/stm-s2lp-rf-driver/NanostackRfPhys2lp.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,12 @@
1818
#define NANOSTACK_PHY_S2LP_H_
1919

2020
#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI && defined(MBED_CONF_RTOS_PRESENT)
21-
#include "mbed.h"
21+
#include "inttypes.h"
2222
#include "NanostackRfPhy.h"
23+
#include "DigitalIn.h"
24+
#include "DigitalOut.h"
25+
#include "InterruptIn.h"
26+
#include "SPI.h"
2327

2428
// Uncomment to use testing gpios attached to TX/RX processes
2529
//#define TEST_GPIOS_ENABLED

components/storage/blockdevice/COMPONENT_FLASHIAP/FlashIAPBlockDevice.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include "FlashIAPBlockDevice.h"
2020
#include "mbed_critical.h"
2121

22-
#include "mbed.h"
2322
using namespace mbed;
2423
#include <inttypes.h>
2524

features/FEATURE_BLE/ble/services/EddystoneConfigService.h

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

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

22-
#include "mbed.h"
2322
#include "ble/BLE.h"
2423
#include "ble/services/EddystoneService.h"
24+
#include "Timer.h"
25+
#include "Ticker.h"
2526

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

498499
BLEDevice &ble;
499500
Params_t &params;
500-
Ticker timeSinceBootTick;
501-
Timeout switchFrame;
501+
mbed::Ticker timeSinceBootTick;
502+
mbed::Timeout switchFrame;
502503
// Default value that is restored on reset.
503504
PowerLevels_t &defaultAdvPowerLevels; // This goes into the advertising frames (radio power measured at 1m from device).
504505
PowerLevels_t &radioPowerLevels; // This configures the power levels of the radio.

features/FEATURE_BLE/ble/services/EddystoneService.h

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@
2020
#warning ble/services/EddystoneService.h is deprecated. Please use the example in 'github.com/ARMmbed/ble-examples/tree/master/BLE_EddystoneService'.
2121

2222
#include "ble/BLE.h"
23-
#include "mbed.h"
2423
#include "CircularBuffer.h"
24+
#include "Timer.h"
25+
#include "Ticker.h"
26+
#include "Timeout.h"
27+
2528
static const uint8_t BEACON_EDDYSTONE[] = {0xAA, 0xFE};
2629

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

8184
// UID Frame Type subfields
8285
static const int UID_NAMESPACEID_SIZE = 10;
@@ -543,11 +546,11 @@ class EddystoneService
543546
BLEDevice &ble;
544547
uint16_t advPeriodus;
545548
uint8_t txPower;
546-
Timer timeSinceBootTimer;
549+
mbed::Timer timeSinceBootTimer;
547550
volatile uint32_t lastBootTimerRead;
548551
volatile bool advLock;
549552
volatile FrameTypes frameIndex;
550-
Timeout stopAdv;
553+
mbed::Timeout stopAdv;
551554

552555

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

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

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

580583
public:
581584
/*

features/FEATURE_BLE/ble/services/UARTService.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#include "mbed-drivers/mbed.h"
2222
#include "mbed-drivers/Stream.h"
2323
#else
24-
#include "mbed.h"
2524
#include "Stream.h"
2625
#endif
2726

features/FEATURE_BLE/ble/services/URIBeaconConfigService.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#ifdef YOTTA_CFG_MBED_OS
2323
#include "mbed-drivers/mbed.h"
2424
#else
25-
#include "mbed.h"
25+
2626
#endif
2727

2828
extern const uint8_t UUID_URI_BEACON_SERVICE[UUID::LENGTH_OF_LONG_UUID];

0 commit comments

Comments
 (0)