Yu Hui Wee / Mbed 2 deprecated GPS_Test

Dependencies:   mbed

Fork of C027_GPSTransparentSerial by u-blox

Files at this revision

API Documentation at this revision

Comitter:
mazgch
Date:
Tue Oct 22 21:21:46 2013 +0000
Child:
1:0d32baf4a645
Commit message:
Simple transparent serial port to the gps receiver,

Changed in this revision

C027.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/C027.lib	Tue Oct 22 21:21:46 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/teams/ublox/code/C027/#7f910a8e77ee
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Oct 22 21:21:46 2013 +0000
@@ -0,0 +1,23 @@
+#include "mbed.h"
+#include "C027_PinNames.h"
+
+int main() 
+{
+    // open the gps serial port
+    Serial gps(GPSTXD, GPSRXD);
+    gps.baud(GPSBAUD);
+    
+    // open the PC serial port and (use the same baudrate)
+    Serial pc(USBTX, USBRX);
+    pc.baud(GPSBAUD);
+    
+    while (1)
+    {
+        // transfer data from pc to gps
+        if (pc.readable() && gps.writeable())
+            gps.putc(pc.getc());
+        // transfer data from gps to pc
+        if (gps.readable() && pc.writeable())
+            pc.putc(gps.getc());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Oct 22 21:21:46 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/a9913a65894f
\ No newline at end of file