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: C027_Support C027_SupportTest mbed picojson
Fork of C027_SupportTest by
Revision 11:b8505cbbd55c, committed 2014-05-07
- Comitter:
- mazgch
- Date:
- Wed May 07 15:36:38 2014 +0000
- Parent:
- 10:d2da2028a233
- Child:
- 12:96c7b62c7aaf
- Commit message:
- support for other platforms (using a shield)
Changed in this revision
--- a/C027_Support.lib Mon May 05 15:45:31 2014 +0000 +++ b/C027_Support.lib Wed May 07 15:36:38 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/teams/ublox/code/C027_Support/#ebc2fd8dcf21 +http://mbed.org/teams/ublox/code/C027_Support/#8ce9169e0747
--- a/main.cpp Mon May 05 15:45:31 2014 +0000
+++ b/main.cpp Wed May 07 15:36:38 2014 +0000
@@ -22,10 +22,21 @@
*/
#define PASSWORD NULL
-
//----------------------------------------------------------------------
+/* This example was tested on C027-U20 and C027-G35 with the on board modem.
+
+ Additionally it was tested with a shield where the SARA-G350 RX/TX/PWRON
+ is connected to D0/D1/D4 and the GPS SCL/SDA is connected D15/D15. In this
+ configuration the following platforms were tested (it is likely that others
+ will work as well)
+ - C027-XX.
+ - LPC1549v2
+ - FRDM-KL25Z
+ - FRDM-KL46Z
+ - NUCLEO-F401RE
+*/
#if defined(TARGET_UBLOX_C027) || defined(TARGET_LPC1768)
- //#define C027_USEONBOARD // remove this if you have a GSM/GPS shield
+ #define C027_USEONBOARD // remove this if you have a GSM/GPS shield
#ifdef C027_USEONBOARD
#include "C027.h"
C027 c027;
@@ -104,11 +115,16 @@
int ret;
char buf[512] = "";
- Serial pc(USBTX,USBRX);
- pc.baud(115200);
+ // only trace if
+ if ((USBRX!=MDMRXD)&&(USBTX!=MDMTXD)) {
+ Serial pc(USBTX,USBRX);
+ pc.baud(115200);
+ }
+
+ wait_ms(1000);
TRACE("GSM/GPS Support Example\r\n");
-
+
#ifdef C027_USEONBOARD
// turn on the supplies of the Modem and the GPS
c027.mdmPower(true);
@@ -120,7 +136,7 @@
mdmPwrOn = 1;
#endif
wait(2);
-
+
// Create the GPS object
#if defined(GPSSCL) && defined(GPSSDA) && defined(GPSADR)
GPSI2C gps(GPSSDA,GPSSCL,GPSADR); // use GPSI2C class
@@ -129,13 +145,14 @@
#else
#warning "please define the pins for the GPS"
#endif
+
// Create the modem object
MDMSerial mdm(MDMTXD,MDMRXD,MDMBAUD
#if DEVICE_SERIAL_FC
,MDMRTS,MDMCTS
#endif
);
-
+
// initialize the modem
TRACE("Device Init\r\n");
MDMParser::DevStatus devStatus;
@@ -203,9 +220,9 @@
unsigned int i = 0xFFFFFFFF;
const int wait = 100;
bool abort = false;
- DigitalOut led(LED1);
+ //DigitalOut led(LED1);
while (!abort) {
- led = !led;
+ // led = !led;
while ((ret = gps.getMessage(buf, sizeof(buf))) > 0)
{
int len = LENGTH(ret);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-src.lib Wed May 07 15:36:38 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed-src/#242346c42295
--- a/mbed.bld Mon May 05 15:45:31 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/8a40adfe8776 \ No newline at end of file
