Remove some references to YOTTA_CFG.

pull/3267/head
Seppo Takalo 2016-11-07 12:43:36 +02:00
parent 9d8ec61df5
commit 53cc28f4c5
5 changed files with 3 additions and 63 deletions

View File

@ -19,12 +19,6 @@
#include "AbstractNetworkInterface.h"
#include "mbed.h"
#ifdef YOTTA_CFG
#include "core-util/FunctionPointer.h"
using namespace mbed;
using namespace mbed::util;
#endif
/**
* \brief Abstract Mesh networking interface.
@ -38,11 +32,7 @@ public:
/**
* Typedef for network callback
*/
#ifdef YOTTA_CFG
typedef FunctionPointer1<void, mesh_connection_status_t> mesh_network_handler_t;
#else
typedef FunctionPointerArg1<void, mesh_connection_status_t> mesh_network_handler_t;
#endif
/**
* Constructor

View File

@ -20,11 +20,7 @@
#include "nsdynmemLIB.h"
#include "randLIB.h"
#include "platform/arm_hal_timer.h"
#ifdef YOTTA_CFG
#include "sal-iface-6lowpan/ns_sal.h"
#else
#include "ns_hal_init.h"
#endif
#include "include/static_config.h"
#include "include/mesh_system.h"
// For tracing we need to define flag, have include and define group
@ -60,23 +56,11 @@ static void mesh_system_heap_error_handler(heap_fail_t event)
void mesh_system_init(void)
{
if (mesh_initialized == false) {
#ifndef YOTTA_CFG
ns_hal_init(app_stack_heap, MBED_MESH_API_HEAP_SIZE,
mesh_system_heap_error_handler, NULL);
eventOS_scheduler_mutex_wait();
net_init_core();
eventOS_scheduler_mutex_release();
#else
ns_dyn_mem_init(app_stack_heap, MBED_MESH_API_HEAP_SIZE,
mesh_system_heap_error_handler, NULL);
randLIB_seed_random();
platform_timer_enable();
eventOS_scheduler_init();
trace_init(); // trace system needs to be initialized right after eventOS_scheduler_init
net_init_core();
/* initialize 6LoWPAN socket adaptation layer */
ns_sal_init_stack();
#endif
mesh_initialized = true;
}
}

View File

@ -23,9 +23,8 @@
#include "include/nd_tasklet.h"
#include "include/static_config.h"
#include "include/mesh_system.h"
#ifndef YOTTA_CFG
#include "ns_event_loop.h"
#endif
// For tracing we need to define flag, have include and define group
#define HAVE_DEBUG 1
#include "ns_trace.h"
@ -386,9 +385,7 @@ int8_t nd_tasklet_connect(mesh_interface_cb callback, int8_t nwk_interface_id)
// -2 memory allocation failure
return tasklet_data_ptr->tasklet;
}
#ifndef YOTTA_CFG
ns_event_loop_thread_start();
#endif
} else {
tasklet_data_ptr->tasklet = tasklet_id;
mesh_system_send_connect_event(tasklet_data_ptr->tasklet);

View File

@ -25,9 +25,8 @@
#include "include/thread_tasklet.h"
#include "include/static_config.h"
#include "include/mesh_system.h"
#ifndef YOTTA_CFG
#include "ns_event_loop.h"
#endif
// For tracing we need to define flag, have include and define group
#define HAVE_DEBUG 1
#include "ns_trace.h"
@ -396,9 +395,7 @@ int8_t thread_tasklet_connect(mesh_interface_cb callback, int8_t nwk_interface_i
// -2 memory allocation failure
return thread_tasklet_data_ptr->tasklet;
}
#ifndef YOTTA_CFG
ns_event_loop_thread_start();
#endif
} else {
thread_tasklet_data_ptr->tasklet = tasklet;
mesh_system_send_connect_event(thread_tasklet_data_ptr->tasklet);
@ -449,7 +446,7 @@ int8_t thread_tasklet_network_init(int8_t device_id)
void thread_tasklet_device_config_set(uint8_t *eui64, char *pskd)
{
(void) pskd; // this parameter is delivered via yotta configuration
(void) pskd; // this parameter is delivered via mbed configuration
memcpy(device_configuration.eui64, eui64, 8);
}

View File

@ -1,28 +0,0 @@
/*
* Copyright (c) 2015 ARM Limited. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <stdint.h>
#ifdef YOTTA_CFG
/* At the moment, nothing in the Yotta build is providing these */
void arm_random_module_init(void)
{
}
uint32_t arm_random_seed_get(void)
{
return 0;
}
#endif