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.
Revision 2:2fc8495988a0, committed 2016-01-28
- Comitter:
- icis4
- Date:
- Thu Jan 28 21:43:12 2016 +0000
- Parent:
- 1:221b87b26f53
- Commit message:
- Two way transfer
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Jan 28 14:33:47 2016 +0000
+++ b/main.cpp Thu Jan 28 21:43:12 2016 +0000
@@ -7,17 +7,23 @@
Serial pc(SERIAL_TX, SERIAL_RX);
Serial gps(PB_10, PC_5);
-
-int main() {
- uint8_t c;
- pc.baud(4800);
- gps.baud(4800);
- pc.printf("*** GPS ***\n");
- while(1) {
- if (gps.readable()){
- c = gps.getc();
- pc.putc(c);
- }
- }
+
+int main()
+{
+ uint8_t c;
+
+ pc.baud(4800);
+ gps.baud(4800);
+
+ pc.printf("*** GPS ***\n");
+ while(1) {
+ if (gps.readable()) {
+ c = gps.getc();
+ pc.putc(c);
+ }
+ if (pc.readable()) {
+ c = pc.getc();
+ gps.putc(c);
+ }
+ }
}
-
\ No newline at end of file
