initial fork from ublox
Dependencies: ublox-at-cellular-interface
Revision 5:9fd89567f769, committed 2017-06-13
- Comitter:
- rob.meades@u-blox.com
- Date:
- Tue Jun 13 00:12:01 2017 +0100
- Parent:
- 4:39acbc0111eb
- Child:
- 6:c450d9e319cf
- Commit message:
- Updated to use u-blox cellular libraries outside mbed but NOT yet fully working on C027. Please hold off from using this library on C027 for now until a commit comes along stating that it is tested and working on C027.
Changed in this revision
--- 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);
--- a/TESTS/unit_tests/ftp/main.cpp Fri Jun 09 22:23:28 2017 +0000
+++ b/TESTS/unit_tests/ftp/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;
@@ -133,8 +139,10 @@
// PRIVATE VARIABLES
// ----------------------------------------------------------------
+#ifdef FEATURE_COMMON_PAL
// Lock for debug prints
static Mutex mtx;
+#endif
// An instance of the cellular interface
static UbloxATCellularInterfaceExt *pDriver =
@@ -148,6 +156,7 @@
// PRIVATE FUNCTIONS
// ----------------------------------------------------------------
+#ifdef FEATURE_COMMON_PAL
// Locks for debug prints
static void lock()
{
@@ -158,7 +167,7 @@
{
mtx.unlock();
}
-
+#endif
// Write a file to the module's file system with known contents
void createFile(const char * filename) {
@@ -516,10 +525,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);
--- a/TESTS/unit_tests/http/main.cpp Fri Jun 09 22:23:28 2017 +0000
+++ b/TESTS/unit_tests/http/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;
@@ -61,8 +67,10 @@
// PRIVATE VARIABLES
// ----------------------------------------------------------------
+#ifdef FEATURE_COMMON_PAL
// Lock for debug prints
static Mutex mtx;
+#endif
// An instance of the cellular interface
static UbloxATCellularInterfaceExt *pDriver =
@@ -77,6 +85,7 @@
// PRIVATE FUNCTIONS
// ----------------------------------------------------------------
+#ifdef FEATURE_COMMON_PAL
// Locks for debug prints
static void lock()
{
@@ -87,6 +96,7 @@
{
mtx.unlock();
}
+#endif
// ----------------------------------------------------------------
// TESTS
@@ -322,10 +332,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);
--- a/UbloxATCellularInterfaceExt.cpp Fri Jun 09 22:23:28 2017 +0000 +++ b/UbloxATCellularInterfaceExt.cpp Tue Jun 13 00:12:01 2017 +0100 @@ -15,13 +15,14 @@ #include "UbloxATCellularInterfaceExt.h" #include "APN_db.h" -#if defined(FEATURE_COMMON_PAL) +#ifdef FEATURE_COMMON_PAL #include "mbed_trace.h" #define TRACE_GROUP "UCAD" #else -#define debug_if(_debug_trace_on, ...) (void(0)) // dummies if feature common pal is not added -#define tr_info(...) (void(0)) // dummies if feature common pal is not added -#define tr_error(...) (void(0)) // dummies if feature common pal is not added +#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 /**********************************************************************
--- a/UbloxATCellularInterfaceExt.h Fri Jun 09 22:23:28 2017 +0000 +++ b/UbloxATCellularInterfaceExt.h Tue Jun 13 00:12:01 2017 +0100 @@ -16,7 +16,7 @@ #ifndef _UBLOX_AT_CELLULAR_INTERFACE_EXT_ #define _UBLOX_AT_CELLULAR_INTERFACE_EXT_ -#include "ublox_modem_driver/UbloxATCellularInterface.h" +#include "UbloxATCellularInterface.h" #include "UbloxCellularDriverGen.h" /**UbloxATCellularInterfaceExt class.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ublox-at-cellular-interface.lib Tue Jun 13 00:12:01 2017 +0100 @@ -0,0 +1,1 @@ +https://developer.mbed.org/teams/ublox/code/ublox-at-cellular-interface/#7ccf0e7e8a83
Rod Landers