Simple USBHost GPS Dongle Receiver for FRDM-KL46Z test program

Dependencies:   KL46Z-USBHost mbed SLCD

FRDM-KL46ZをUSBホストにしてUSBタイプのGPSレシーバを読み取るテストプログラムです。
/media/uploads/va009039/frdm-kl46z-usbhost-gps.jpg

Files at this revision

API Documentation at this revision

Comitter:
va009039
Date:
Sat Jan 18 13:43:06 2014 +0000
Child:
1:2d8275968aaf
Commit message:
first commit

Changed in this revision

KL46Z-USBHost.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/KL46Z-USBHost.lib	Sat Jan 18 13:43:06 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/va009039/code/KL46Z-USBHost/#5160ee0c522d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Jan 18 13:43:06 2014 +0000
@@ -0,0 +1,24 @@
+// Simple USBHost GPS Dongle for FRDM-KL46Z test program
+#include "USBHostGPS.h"
+
+DigitalOut led1(PTD5); // green
+DigitalOut led2(PTE29); // red
+#define LED_OFF 1
+#define LED_ON  0
+
+int main() {
+    // GT-730F/L 38400bps
+    // Gosget SD-200 GPS DONGLE 4800bps
+    USBHostGPS gps(4800);
+    led2 = LED_OFF;
+    while(1) {
+        char buf[64];
+        int result = gps.readNMEA(buf, sizeof(buf));
+        if (result > 0) {
+            for(int i = 0; i < result; i++) {
+                printf("%c", buf[i]);
+            }
+            led1 = !led1;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Jan 18 13:43:06 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/824293ae5e43
\ No newline at end of file