This class provides an API to communicate with a u-blox GNSS chip. The files here were originally part of the C027_Support library (https://developer.mbed.org/teams/ublox/code/C027_Support/ at revision 138:dafbbf31bf76) but have been separated out, primarily for use on the u-blox C030 board where the cellular interace portion of the C027_Support library will instead be provided through the new mbed Cellular API.
Dependents: example-ublox-at-cellular-interface-ext example-low-power-sleep example-C030-out-of-box-demo example-C030-out-of-box-demo ... more
Diff: gnss.cpp
- Revision:
- 16:cb9861f0f4d8
- Parent:
- 15:105cf3ca48c9
- Child:
- 17:6c226e3e9d61
diff -r 105cf3ca48c9 -r cb9861f0f4d8 gnss.cpp --- a/gnss.cpp Tue Jul 24 16:02:21 2018 +0500 +++ b/gnss.cpp Wed Aug 01 13:14:52 2018 +0500 @@ -23,6 +23,12 @@ #include "ctype.h" #include "gnss.h" +#ifdef UBLOX_WEARABLE_FRAMEWORK +#include "SDCardModel.h" +#else +#define SEND_LOGGING_MESSAGE printf +#endif + GnssParser::GnssParser(void) { // Create the enable pin but set everything to disabled @@ -593,7 +599,9 @@ } int GnssSerial::_send(const void* buf, int len) -{ +{ + GET_SDCARD_INSTANCE->write(logging_file_name, (void *)buf, len); + return put((const char*)buf, len, true/*=blocking*/); }