test code Just sending gps output

Dependencies:   mbed

main.cpp

Committer:
wasaco
Date:
2015-04-18
Revision:
0:47f843629085
Child:
1:fb3a6e1626c7

File content as of revision 0:47f843629085:

#include "mbed.h"
 
Serial pc(USBTX, USBRX); // tx, rx 
Serial gps(PA_2, PA_3);// tx, rx p9 p10

int main()
{
    char c;
    gps.baud(4800);

    pc.printf("gps start! \r\n");
 
    while(1) {
//        if(gps.readable()){
            c = gps.getc();
            pc.printf("ok \r\n");
            pc.putc(c);
//        } else {      
//        }
    }
 }