test code Just sending gps output

Dependencies:   mbed

main.cpp

Committer:
wasaco
Date:
2015-04-20
Revision:
1:fb3a6e1626c7
Parent:
0:47f843629085

File content as of revision 1:fb3a6e1626c7:

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

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 {      
//        }
    }
 }