Ivaylo Iltchev / Mbed 2 deprecated GPS_REPEATER

Dependencies:   mbed

Committer:
icis4
Date:
Thu Jan 28 14:33:47 2016 +0000
Revision:
1:221b87b26f53
Parent:
0:6c5376fa6d72
Child:
2:2fc8495988a0
Var change

Who changed what in which revision?

UserRevisionLine numberNew contents of line
icis4 0:6c5376fa6d72 1 #include "mbed.h"
icis4 0:6c5376fa6d72 2
icis4 0:6c5376fa6d72 3 //------------------------------------
icis4 0:6c5376fa6d72 4 // Hyperterminal configuration
icis4 0:6c5376fa6d72 5 // 9600 bauds, 8-bit data, no parity
icis4 0:6c5376fa6d72 6 //------------------------------------
icis4 0:6c5376fa6d72 7
icis4 0:6c5376fa6d72 8 Serial pc(SERIAL_TX, SERIAL_RX);
icis4 0:6c5376fa6d72 9 Serial gps(PB_10, PC_5);
icis4 0:6c5376fa6d72 10
icis4 0:6c5376fa6d72 11 int main() {
icis4 1:221b87b26f53 12 uint8_t c;
icis4 0:6c5376fa6d72 13 pc.baud(4800);
icis4 0:6c5376fa6d72 14 gps.baud(4800);
icis4 0:6c5376fa6d72 15 pc.printf("*** GPS ***\n");
icis4 0:6c5376fa6d72 16 while(1) {
icis4 0:6c5376fa6d72 17 if (gps.readable()){
icis4 1:221b87b26f53 18 c = gps.getc();
icis4 1:221b87b26f53 19 pc.putc(c);
icis4 0:6c5376fa6d72 20 }
icis4 0:6c5376fa6d72 21 }
icis4 0:6c5376fa6d72 22 }
icis4 0:6c5376fa6d72 23