Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: ublox-at-cellular-interface
Diff: TESTS/unit_tests/cell-locate/main.cpp
- Revision:
- 5:9fd89567f769
- Parent:
- 1:26a67ab07275
- Child:
- 11:3631f62bb359
--- a/TESTS/unit_tests/cell-locate/main.cpp Fri Jun 09 22:23:28 2017 +0000
+++ b/TESTS/unit_tests/cell-locate/main.cpp Tue Jun 13 00:12:01 2017 +0100
@@ -4,9 +4,15 @@
#include "utest.h"
#include "UbloxATCellularInterfaceExt.h"
#include "UDPSocket.h"
-#include "FEATURE_COMMON_PAL/nanostack-libservice/mbed-client-libservice/common_functions.h"
+#ifdef FEATURE_COMMON_PAL
#include "mbed_trace.h"
#define TRACE_GROUP "TEST"
+#else
+#define tr_debug(format, ...) debug(format "\n", ## __VA_ARGS__)
+#define tr_info(format, ...) debug(format "\n", ## __VA_ARGS__)
+#define tr_warn(format, ...) debug(format "\n", ## __VA_ARGS__)
+#define tr_error(format, ...) debug(format "\n", ## __VA_ARGS__)
+#endif
using namespace utest::v1;
@@ -81,8 +87,10 @@
// PRIVATE VARIABLES
// ----------------------------------------------------------------
+#ifdef FEATURE_COMMON_PAL
// Lock for debug prints
static Mutex mtx;
+#endif
// Power up GNSS
#ifdef TARGET_UBLOX_C030
@@ -101,6 +109,7 @@
// PRIVATE FUNCTIONS
// ----------------------------------------------------------------
+#ifdef FEATURE_COMMON_PAL
// Locks for debug prints
static void lock()
{
@@ -111,6 +120,7 @@
{
mtx.unlock();
}
+#endif
static void printCellLocateData(UbloxATCellularInterfaceExt::CellLocData *pData)
{
@@ -247,10 +257,13 @@
// ----------------------------------------------------------------
int main() {
+
+#ifdef FEATURE_COMMON_PAL
mbed_trace_init();
mbed_trace_mutex_wait_function_set(lock);
mbed_trace_mutex_release_function_set(unlock);
+#endif
// Run tests
return !Harness::run(specification);