Merge pull request #9210 from AnttiKauppila/mbed_h_fix

mbed.h includes removed
pull/9156/head
Cruz Monrreal 2019-01-04 10:27:30 -06:00 committed by GitHub
commit 54f759176b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 75 additions and 40 deletions

View File

@ -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"
@ -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;

View File

@ -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)

View File

@ -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;

View File

@ -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"
@ -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();

View File

@ -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

View File

@ -19,7 +19,6 @@
#include "FlashIAPBlockDevice.h"
#include "mbed_critical.h"
#include "mbed.h"
using namespace mbed;
#include <inttypes.h>

View File

@ -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, \
@ -497,8 +498,8 @@ private:
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.

View File

@ -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
@ -76,7 +79,7 @@ public:
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;
@ -543,11 +546,11 @@ private:
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
@ -556,7 +559,7 @@ private:
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;
@ -565,7 +568,7 @@ private:
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;
@ -575,7 +578,7 @@ private:
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:
/*

View File

@ -21,7 +21,6 @@
#include "mbed-drivers/mbed.h"
#include "mbed-drivers/Stream.h"
#else
#include "mbed.h"
#include "Stream.h"
#endif

View File

@ -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];

View File

@ -16,7 +16,6 @@
#ifndef MESHINTERFACENANOSTACK_H
#define MESHINTERFACENANOSTACK_H
#include "mbed.h"
#include "MeshInterface.h"
#include "NanostackRfPhy.h"

View File

@ -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)
{

View File

@ -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:

View File

@ -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;
}

View File

@ -17,7 +17,6 @@
#ifndef __INCLUDE_CALLBACK_HANDLER_H__
#define __INCLUDE_CALLBACK_HANDLER_H__
#include "mbed.h"
#include "mesh_interface_types.h"
#ifdef __cplusplus

View File

@ -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

View File

@ -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"

View File

@ -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"
@ -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);

View File

@ -17,7 +17,6 @@
#ifndef NANOSTACK_PHY_NCS36510_H_
#define NANOSTACK_PHY_NCS36510_H_
#include "mbed.h"
#include "NanostackRfPhy.h"
class NanostackRfPhyNcs36510 : public NanostackRfPhy {

View File

@ -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()

View File

@ -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
*/

View File

@ -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
@ -114,7 +116,7 @@ public:
* 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
*
@ -286,7 +288,7 @@ public:
* @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
*
@ -308,8 +310,8 @@ public:
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;
@ -317,7 +319,7 @@ private:
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();

View File

@ -54,7 +54,7 @@ public:
virtual ~UARTCellularInterface();
private:
UARTSerial _serial;
mbed::UARTSerial _serial;
PinName _dcd_pin;
bool _active_high;

View File

@ -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

View File

@ -19,6 +19,7 @@
#include <stdio.h>
#include "mbed_assert.h"
#include "mbed_events.h"
#include "mbed_wait_api.h"
#include "rtw_emac.h"
#include "EMACMemoryManager.h"
@ -33,7 +34,7 @@
#define RTW_EMAC_MTU_SIZE (1500U)
RTW_EMAC::RTW_EMAC()
RTW_EMAC::RTW_EMAC()
{
set_callback_func((emac_callback)(&RTW_EMAC::wlan_emac_recv), this);
}
@ -66,7 +67,7 @@ bool RTW_EMAC::get_hwaddr(uint8_t *addr) const
int i;
if (RTW_SUCCESS == wifi_get_mac_address(mac)) {
if (sscanf(mac, "%x:%x:%x:%x:%x:%x",
if (sscanf(mac, "%x:%x:%x:%x:%x:%x",
&val[0], &val[1], &val[2], &val[3], &val[4], &val[5]) != 6) {
printf("Get HW address failed\r\n");
}
@ -177,7 +178,7 @@ void RTW_EMAC::wlan_emac_recv(void *param, struct netif *netif, uint32_t len)
buf = enet->memory_manager->alloc_heap(len, 0);
if (buf == NULL) {
return;
}
}
enet->memory_manager->set_len(buf, len);
p = buf;
@ -206,7 +207,7 @@ void mbed_default_mac_address(char *mac) {
void mbed_mac_address(char *mac)
{
char hwaddr[20];
char hwaddr[20];
int val[6];
int i;
if (RTW_SUCCESS == wifi_get_mac_address(hwaddr)) {