mirror of https://github.com/ARMmbed/mbed-os.git
commit
54f759176b
|
|
@ -26,6 +26,12 @@
|
||||||
#include "nanostack/platform/arm_hal_phy.h"
|
#include "nanostack/platform/arm_hal_phy.h"
|
||||||
#include "mbed_trace.h"
|
#include "mbed_trace.h"
|
||||||
#include "mbed_toolchain.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"
|
#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
|
#ifdef MBED_CONF_RTOS_PRESENT
|
||||||
#include "mbed.h"
|
|
||||||
#include "rtos.h"
|
#include "rtos.h"
|
||||||
|
|
||||||
using namespace mbed;
|
using namespace mbed;
|
||||||
using namespace rtos;
|
using namespace rtos;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,13 @@
|
||||||
#define NANOSTACK_PHY_MCR20A_H_
|
#define NANOSTACK_PHY_MCR20A_H_
|
||||||
|
|
||||||
#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI && defined(MBED_CONF_RTOS_PRESENT)
|
#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI && defined(MBED_CONF_RTOS_PRESENT)
|
||||||
#include "mbed.h"
|
#include "inttypes.h"
|
||||||
#include "NanostackRfPhy.h"
|
#include "NanostackRfPhy.h"
|
||||||
|
#include "DigitalIn.h"
|
||||||
|
#include "DigitalOut.h"
|
||||||
|
#include "InterruptIn.h"
|
||||||
|
#include "SPI.h"
|
||||||
|
#include "rtos.h"
|
||||||
|
|
||||||
// Arduino pin defaults for convenience
|
// Arduino pin defaults for convenience
|
||||||
#if !defined(MCR20A_SPI_MOSI)
|
#if !defined(MCR20A_SPI_MOSI)
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
#include "nanostack/platform/arm_hal_phy.h"
|
#include "nanostack/platform/arm_hal_phy.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "rtos.h"
|
#include "rtos.h"
|
||||||
|
#include "mbed_interface.h"
|
||||||
|
|
||||||
using namespace mbed;
|
using namespace mbed;
|
||||||
using namespace rtos;
|
using namespace rtos;
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,12 @@
|
||||||
#include "mbed_toolchain.h"
|
#include "mbed_toolchain.h"
|
||||||
#include "common_functions.h"
|
#include "common_functions.h"
|
||||||
#include <Timer.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"
|
#define TRACE_GROUP "s2lp"
|
||||||
|
|
||||||
|
|
@ -216,7 +222,7 @@ static const phy_device_channel_page_s phy_channel_pages[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef MBED_CONF_RTOS_PRESENT
|
#ifdef MBED_CONF_RTOS_PRESENT
|
||||||
#include "mbed.h"
|
|
||||||
#include "rtos.h"
|
#include "rtos.h"
|
||||||
|
|
||||||
static void rf_irq_task_process_irq();
|
static void rf_irq_task_process_irq();
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,12 @@
|
||||||
#define NANOSTACK_PHY_S2LP_H_
|
#define NANOSTACK_PHY_S2LP_H_
|
||||||
|
|
||||||
#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI && defined(MBED_CONF_RTOS_PRESENT)
|
#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI && defined(MBED_CONF_RTOS_PRESENT)
|
||||||
#include "mbed.h"
|
#include "inttypes.h"
|
||||||
#include "NanostackRfPhy.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
|
// Uncomment to use testing gpios attached to TX/RX processes
|
||||||
//#define TEST_GPIOS_ENABLED
|
//#define TEST_GPIOS_ENABLED
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@
|
||||||
#include "FlashIAPBlockDevice.h"
|
#include "FlashIAPBlockDevice.h"
|
||||||
#include "mbed_critical.h"
|
#include "mbed_critical.h"
|
||||||
|
|
||||||
#include "mbed.h"
|
|
||||||
using namespace mbed;
|
using namespace mbed;
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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'.
|
#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/BLE.h"
|
||||||
#include "ble/services/EddystoneService.h"
|
#include "ble/services/EddystoneService.h"
|
||||||
|
#include "Timer.h"
|
||||||
|
#include "Ticker.h"
|
||||||
|
|
||||||
#define UUID_URI_BEACON(FIRST, SECOND) { \
|
#define UUID_URI_BEACON(FIRST, SECOND) { \
|
||||||
0xee, 0x0c, FIRST, SECOND, 0x87, 0x86, 0x40, 0xba, \
|
0xee, 0x0c, FIRST, SECOND, 0x87, 0x86, 0x40, 0xba, \
|
||||||
|
|
@ -497,8 +498,8 @@ private:
|
||||||
|
|
||||||
BLEDevice &ble;
|
BLEDevice &ble;
|
||||||
Params_t ¶ms;
|
Params_t ¶ms;
|
||||||
Ticker timeSinceBootTick;
|
mbed::Ticker timeSinceBootTick;
|
||||||
Timeout switchFrame;
|
mbed::Timeout switchFrame;
|
||||||
// Default value that is restored on reset.
|
// 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 &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.
|
PowerLevels_t &radioPowerLevels; // This configures the power levels of the radio.
|
||||||
|
|
|
||||||
|
|
@ -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'.
|
#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 "ble/BLE.h"
|
||||||
#include "mbed.h"
|
|
||||||
#include "CircularBuffer.h"
|
#include "CircularBuffer.h"
|
||||||
|
#include "Timer.h"
|
||||||
|
#include "Ticker.h"
|
||||||
|
#include "Timeout.h"
|
||||||
|
|
||||||
static const uint8_t BEACON_EDDYSTONE[] = {0xAA, 0xFE};
|
static const uint8_t BEACON_EDDYSTONE[] = {0xAA, 0xFE};
|
||||||
|
|
||||||
//Debug is disabled by default
|
//Debug is disabled by default
|
||||||
|
|
@ -76,7 +79,7 @@ public:
|
||||||
void (*frames[EDDYSTONE_MAX_FRAMETYPE])(uint8_t *, uint32_t);
|
void (*frames[EDDYSTONE_MAX_FRAMETYPE])(uint8_t *, uint32_t);
|
||||||
static const int URI_DATA_MAX = 18;
|
static const int URI_DATA_MAX = 18;
|
||||||
typedef uint8_t UriData_t[URI_DATA_MAX];
|
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
|
// UID Frame Type subfields
|
||||||
static const int UID_NAMESPACEID_SIZE = 10;
|
static const int UID_NAMESPACEID_SIZE = 10;
|
||||||
|
|
@ -543,11 +546,11 @@ private:
|
||||||
BLEDevice &ble;
|
BLEDevice &ble;
|
||||||
uint16_t advPeriodus;
|
uint16_t advPeriodus;
|
||||||
uint8_t txPower;
|
uint8_t txPower;
|
||||||
Timer timeSinceBootTimer;
|
mbed::Timer timeSinceBootTimer;
|
||||||
volatile uint32_t lastBootTimerRead;
|
volatile uint32_t lastBootTimerRead;
|
||||||
volatile bool advLock;
|
volatile bool advLock;
|
||||||
volatile FrameTypes frameIndex;
|
volatile FrameTypes frameIndex;
|
||||||
Timeout stopAdv;
|
mbed::Timeout stopAdv;
|
||||||
|
|
||||||
|
|
||||||
// URI Frame Variables
|
// URI Frame Variables
|
||||||
|
|
@ -556,7 +559,7 @@ private:
|
||||||
int8_t defaultUrlPower;
|
int8_t defaultUrlPower;
|
||||||
bool urlIsSet; // flag that enables / disable URI Frames
|
bool urlIsSet; // flag that enables / disable URI Frames
|
||||||
float urlAdvPeriod; // how long the url frame will be advertised for
|
float urlAdvPeriod; // how long the url frame will be advertised for
|
||||||
Ticker urlTicker;
|
mbed::Ticker urlTicker;
|
||||||
|
|
||||||
// UID Frame Variables
|
// UID Frame Variables
|
||||||
UIDNamespaceID_t defaultUidNamespaceID;
|
UIDNamespaceID_t defaultUidNamespaceID;
|
||||||
|
|
@ -565,7 +568,7 @@ private:
|
||||||
uint16_t uidRFU;
|
uint16_t uidRFU;
|
||||||
bool uidIsSet; // flag that enables / disable UID Frames
|
bool uidIsSet; // flag that enables / disable UID Frames
|
||||||
float uidAdvPeriod; // how long the uid frame will be advertised for
|
float uidAdvPeriod; // how long the uid frame will be advertised for
|
||||||
Ticker uidTicker;
|
mbed::Ticker uidTicker;
|
||||||
|
|
||||||
// TLM Frame Variables
|
// TLM Frame Variables
|
||||||
uint8_t TlmVersion;
|
uint8_t TlmVersion;
|
||||||
|
|
@ -575,7 +578,7 @@ private:
|
||||||
volatile uint32_t TlmTimeSinceBoot;
|
volatile uint32_t TlmTimeSinceBoot;
|
||||||
bool tlmIsSet; // flag that enables / disables TLM frames
|
bool tlmIsSet; // flag that enables / disables TLM frames
|
||||||
float TlmAdvPeriod; // number of minutes between adv frames
|
float TlmAdvPeriod; // number of minutes between adv frames
|
||||||
Ticker tlmTicker;
|
mbed::Ticker tlmTicker;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@
|
||||||
#include "mbed-drivers/mbed.h"
|
#include "mbed-drivers/mbed.h"
|
||||||
#include "mbed-drivers/Stream.h"
|
#include "mbed-drivers/Stream.h"
|
||||||
#else
|
#else
|
||||||
#include "mbed.h"
|
|
||||||
#include "Stream.h"
|
#include "Stream.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
#ifdef YOTTA_CFG_MBED_OS
|
#ifdef YOTTA_CFG_MBED_OS
|
||||||
#include "mbed-drivers/mbed.h"
|
#include "mbed-drivers/mbed.h"
|
||||||
#else
|
#else
|
||||||
#include "mbed.h"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern const uint8_t UUID_URI_BEACON_SERVICE[UUID::LENGTH_OF_LONG_UUID];
|
extern const uint8_t UUID_URI_BEACON_SERVICE[UUID::LENGTH_OF_LONG_UUID];
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@
|
||||||
|
|
||||||
#ifndef MESHINTERFACENANOSTACK_H
|
#ifndef MESHINTERFACENANOSTACK_H
|
||||||
#define MESHINTERFACENANOSTACK_H
|
#define MESHINTERFACENANOSTACK_H
|
||||||
#include "mbed.h"
|
|
||||||
|
|
||||||
#include "MeshInterface.h"
|
#include "MeshInterface.h"
|
||||||
#include "NanostackRfPhy.h"
|
#include "NanostackRfPhy.h"
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@
|
||||||
#include "nanostack/net_interface.h"
|
#include "nanostack/net_interface.h"
|
||||||
#include "thread_management_if.h"
|
#include "thread_management_if.h"
|
||||||
#include "ip6string.h"
|
#include "ip6string.h"
|
||||||
|
#include "mbed_error.h"
|
||||||
|
|
||||||
char *Nanostack::Interface::get_ip_address(char *buf, nsapi_size_t buflen)
|
char *Nanostack::Interface::get_ip_address(char *buf, nsapi_size_t buflen)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
#include "arm_hal_phy.h"
|
#include "arm_hal_phy.h"
|
||||||
#include "EMAC.h"
|
#include "EMAC.h"
|
||||||
#include "enet_tasklet.h"
|
#include "enet_tasklet.h"
|
||||||
|
#include "mbed_interface.h"
|
||||||
|
|
||||||
class EMACPhy : public NanostackEthernetPhy {
|
class EMACPhy : public NanostackEthernetPhy {
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ Nanostack::WisunInterface *WisunInterface::get_interface() const
|
||||||
nsapi_error_t WisunInterface::do_initialize()
|
nsapi_error_t WisunInterface::do_initialize()
|
||||||
{
|
{
|
||||||
if (!_interface) {
|
if (!_interface) {
|
||||||
_interface = new (nothrow) Nanostack::WisunInterface(*_phy);
|
_interface = new (std::nothrow) Nanostack::WisunInterface(*_phy);
|
||||||
if (!_interface) {
|
if (!_interface) {
|
||||||
return NSAPI_ERROR_NO_MEMORY;
|
return NSAPI_ERROR_NO_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@
|
||||||
#ifndef __INCLUDE_CALLBACK_HANDLER_H__
|
#ifndef __INCLUDE_CALLBACK_HANDLER_H__
|
||||||
#define __INCLUDE_CALLBACK_HANDLER_H__
|
#define __INCLUDE_CALLBACK_HANDLER_H__
|
||||||
|
|
||||||
#include "mbed.h"
|
|
||||||
#include "mesh_interface_types.h"
|
#include "mesh_interface_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,13 @@
|
||||||
#include "ns_types.h"
|
#include "ns_types.h"
|
||||||
#include "fhss_api.h"
|
#include "fhss_api.h"
|
||||||
#include "fhss_config.h"
|
#include "fhss_config.h"
|
||||||
#include "mbed.h"
|
|
||||||
#include "mbed_trace.h"
|
#include "mbed_trace.h"
|
||||||
#include "platform/arm_hal_interrupt.h"
|
#include "platform/arm_hal_interrupt.h"
|
||||||
#include <Timer.h>
|
#include <Timer.h>
|
||||||
|
#include "equeue.h"
|
||||||
|
#include "EventQueue.h"
|
||||||
|
#include "mbed_shared_queues.h"
|
||||||
|
#include "Timeout.h"
|
||||||
|
|
||||||
#define TRACE_GROUP "fhdr"
|
#define TRACE_GROUP "fhdr"
|
||||||
#ifndef NUMBER_OF_SIMULTANEOUS_TIMEOUTS
|
#ifndef NUMBER_OF_SIMULTANEOUS_TIMEOUTS
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@
|
||||||
#ifndef NANOSTACK_INTERFACE_H_
|
#ifndef NANOSTACK_INTERFACE_H_
|
||||||
#define NANOSTACK_INTERFACE_H_
|
#define NANOSTACK_INTERFACE_H_
|
||||||
|
|
||||||
#include "mbed.h"
|
|
||||||
#include "MeshInterface.h"
|
#include "MeshInterface.h"
|
||||||
// Include here for backward compatibility
|
// Include here for backward compatibility
|
||||||
#include "LoWPANNDInterface.h"
|
#include "LoWPANNDInterface.h"
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
#include "mbed.h"
|
|
||||||
#include "ns_types.h"
|
#include "ns_types.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "common_functions.h"
|
#include "common_functions.h"
|
||||||
|
|
@ -33,6 +33,10 @@ extern "C" {
|
||||||
|
|
||||||
#define SIGNAL_COUNT_RADIO 1
|
#define SIGNAL_COUNT_RADIO 1
|
||||||
|
|
||||||
|
#include "Thread.h"
|
||||||
|
#include "ThisThread.h"
|
||||||
|
#include "mbed_error.h"
|
||||||
|
using namespace rtos;
|
||||||
static void rf_thread_loop();
|
static void rf_thread_loop();
|
||||||
Thread rf_thread(osPriorityRealtime, RF_THREAD_STACK_SIZE);
|
Thread rf_thread(osPriorityRealtime, RF_THREAD_STACK_SIZE);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@
|
||||||
#ifndef NANOSTACK_PHY_NCS36510_H_
|
#ifndef NANOSTACK_PHY_NCS36510_H_
|
||||||
#define NANOSTACK_PHY_NCS36510_H_
|
#define NANOSTACK_PHY_NCS36510_H_
|
||||||
|
|
||||||
#include "mbed.h"
|
|
||||||
#include "NanostackRfPhy.h"
|
#include "NanostackRfPhy.h"
|
||||||
|
|
||||||
class NanostackRfPhyNcs36510 : public NanostackRfPhy {
|
class NanostackRfPhyNcs36510 : public NanostackRfPhy {
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,10 @@
|
||||||
|
|
||||||
#include "NetworkStack.h"
|
#include "NetworkStack.h"
|
||||||
#include "nsapi_dns.h"
|
#include "nsapi_dns.h"
|
||||||
#include "mbed.h"
|
|
||||||
#include "stddef.h"
|
#include "stddef.h"
|
||||||
#include <new>
|
#include <new>
|
||||||
|
#include "EventQueue.h"
|
||||||
|
#include "mbed_shared_queues.h"
|
||||||
|
|
||||||
// Default NetworkStack operations
|
// Default NetworkStack operations
|
||||||
const char *NetworkStack::get_ip_address()
|
const char *NetworkStack::get_ip_address()
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,10 @@
|
||||||
#include "mbed_trace.h"
|
#include "mbed_trace.h"
|
||||||
#define TRACE_GROUP "UCID"
|
#define TRACE_GROUP "UCID"
|
||||||
|
|
||||||
|
#include "mbed_wait_api.h"
|
||||||
|
|
||||||
|
using namespace mbed;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PDP (packet data profile) Context
|
* PDP (packet data profile) Context
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,9 @@
|
||||||
|
|
||||||
#include "CellularBase.h"
|
#include "CellularBase.h"
|
||||||
#include "platform/ATCmdParser.h"
|
#include "platform/ATCmdParser.h"
|
||||||
#include "mbed.h"
|
#include "ATCmdParser.h"
|
||||||
|
#include "FileHandle.h"
|
||||||
|
#include "Callback.h"
|
||||||
|
|
||||||
#if NSAPI_PPP_AVAILABLE
|
#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.
|
* 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.")
|
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
|
/** Destructor
|
||||||
*
|
*
|
||||||
|
|
@ -286,7 +288,7 @@ public:
|
||||||
* @param status_cb The callback for status changes
|
* @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.")
|
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
|
/** Get the connection status
|
||||||
*
|
*
|
||||||
|
|
@ -308,8 +310,8 @@ public:
|
||||||
virtual nsapi_error_t set_blocking(bool blocking);
|
virtual nsapi_error_t set_blocking(bool blocking);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FileHandle *_fh;
|
mbed::FileHandle *_fh;
|
||||||
ATCmdParser *_at;
|
mbed::ATCmdParser *_at;
|
||||||
const char *_new_pin;
|
const char *_new_pin;
|
||||||
const char *_pin;
|
const char *_pin;
|
||||||
const char *_apn;
|
const char *_apn;
|
||||||
|
|
@ -317,7 +319,7 @@ private:
|
||||||
const char *_pwd;
|
const char *_pwd;
|
||||||
bool _debug_trace_on;
|
bool _debug_trace_on;
|
||||||
nsapi_ip_stack_t _stack;
|
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;
|
nsapi_connection_status_t _connect_status;
|
||||||
bool _connect_is_blocking;
|
bool _connect_is_blocking;
|
||||||
void base_initialization();
|
void base_initialization();
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ public:
|
||||||
virtual ~UARTCellularInterface();
|
virtual ~UARTCellularInterface();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
UARTSerial _serial;
|
mbed::UARTSerial _serial;
|
||||||
PinName _dcd_pin;
|
PinName _dcd_pin;
|
||||||
bool _active_high;
|
bool _active_high;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,10 +42,7 @@
|
||||||
using namespace rtos;
|
using namespace rtos;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Get mbed lib version number, as RTOS depends on mbed lib features
|
#include "platform/mbed_version.h"
|
||||||
like mbed_error, Callback and others.
|
|
||||||
*/
|
|
||||||
#include "mbed.h"
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "mbed_assert.h"
|
#include "mbed_assert.h"
|
||||||
#include "mbed_events.h"
|
#include "mbed_events.h"
|
||||||
|
#include "mbed_wait_api.h"
|
||||||
|
|
||||||
#include "rtw_emac.h"
|
#include "rtw_emac.h"
|
||||||
#include "EMACMemoryManager.h"
|
#include "EMACMemoryManager.h"
|
||||||
|
|
@ -33,7 +34,7 @@
|
||||||
|
|
||||||
#define RTW_EMAC_MTU_SIZE (1500U)
|
#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);
|
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;
|
int i;
|
||||||
|
|
||||||
if (RTW_SUCCESS == wifi_get_mac_address(mac)) {
|
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) {
|
&val[0], &val[1], &val[2], &val[3], &val[4], &val[5]) != 6) {
|
||||||
printf("Get HW address failed\r\n");
|
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);
|
buf = enet->memory_manager->alloc_heap(len, 0);
|
||||||
if (buf == NULL) {
|
if (buf == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
enet->memory_manager->set_len(buf, len);
|
enet->memory_manager->set_len(buf, len);
|
||||||
p = buf;
|
p = buf;
|
||||||
|
|
@ -206,7 +207,7 @@ void mbed_default_mac_address(char *mac) {
|
||||||
|
|
||||||
void mbed_mac_address(char *mac)
|
void mbed_mac_address(char *mac)
|
||||||
{
|
{
|
||||||
char hwaddr[20];
|
char hwaddr[20];
|
||||||
int val[6];
|
int val[6];
|
||||||
int i;
|
int i;
|
||||||
if (RTW_SUCCESS == wifi_get_mac_address(hwaddr)) {
|
if (RTW_SUCCESS == wifi_get_mac_address(hwaddr)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue