Sam Grove
/
Re-InvokeISP
Testing documentation
Diff: main.h
- Revision:
- 4:3f1a2b5dc176
- Parent:
- 3:987ee333d593
diff -r 987ee333d593 -r 3f1a2b5dc176 main.h --- a/main.h Mon Apr 18 04:14:57 2011 +0000 +++ b/main.h Mon Apr 18 04:16:13 2011 +0000 @@ -1,38 +1,50 @@ -/** Servo control class, based on a PwmOut +/** @defgroup API The MODGPS API */ + +/** GPS module + * @author Andy Kirkham + * @see http://mbed.org/cookbook/MODGPS + * @see example1.cpp + * @see example2.cpp + * @see API + * + * @image html /media/uploads/AjK/gps_interfaces.png "Wiring up the GPS module" * * Example: * @code - * // Continuously sweep the servo through it's full range * #include "mbed.h" - * #include "Servo.h" - * - * Servo myservo(p21); - * + * #include "GPS.h" + * + * DigitalOut led1(LED1); + * Serial pc(USBTX, USBRX); + * GPS gps(NC, p10); + * * int main() { - * while(1) { - * for(int i=0; i<100; i++) { - * myservo = i/100.0; - * wait(0.01); - * } - * for(int i=100; i>0; i--) { - * myservo = i/100.0; - * wait(0.01); - * } + * GPS_Time t; + * + * // Wait for the GPS NMEA data to become valid. + * while (!gps.isTimeValid()) { + * led1 = !led1; + * wait(1); * } + * + * gps.timeNow(&t); + * + * pc.printf("The time/date is %02d:%02d:%02d %02d/%02d/%04d\r\n", + * t.hour, t.minute, t.second, t.day, t.month, t.year); + * + * // Wait until at least four satellites produce a position fix and a valid quality. + * while (gps.numOfSats() < 4 && gps.getGPSquality != 0) { + * led1 = !led1; + * wait(1); + * } + * + * pc.printf("Lat = %.4f Lon = %.4f Alt = %.1fkm\r\n", + * gps.latitude(), gps.longitude, gps.altitude()); + * + * // Make the LED go steady to indicate we have finished. + * led1 = 1; + * + * while(1) {} * } * @endcode - */ -/** Create a servo object connected to the specified PwmOut pin - * - * @param pin PwmOut pin to connect to - */ - - /** A brief description of the function foo - * - * More details about the function goes here - * and here - * - * @param x a variable used by foo - * @returns something magical done with x - */ -int foo(int x) {...} \ No newline at end of file + */ \ No newline at end of file