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.
Dependents: F401RE-USBHostMIDI_RecieveExample
Fork of F401RE-USBHost by
Diff: USBHostGPS.h
- Revision:
- 3:a3872f7593e2
- Parent:
- 2:0cdac6bcc534
- Child:
- 4:21d651ad6987
--- a/USBHostGPS.h Thu Jan 23 08:32:54 2014 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-// Simple USBHost GPS Dongle for FRDM-KL46Z
-#include "USBHost.h"
-
-#define PL2303_SET_LINE_CODING 0x20
-
-class USBHostGPS {
-public:
- USBHostGPS(int baud = 38400) {
- host = USBHost::getHostInst();
- // stop bit = 1, parity = none, 8bit
- uint8_t data[] = {baud&0xff, baud>>8, baud>>16, baud>>24, 0x00, 0x00, 0x08};
- SETUP_PACKET setup = {0x21, PL2303_SET_LINE_CODING, 0, 0, 0};
- host->ControlWrite(&setup, data, sizeof(data));
- }
- int readNMEA(char* data, int size) {
- return host->BulkRead((uint8_t*)data, size);
- }
-
-private:
- USBHost * host;
-};
