doppler shift / Mbed 2 deprecated 0xXX

Dependencies:   mbed

main.cpp

Committer:
KINU
Date:
2020-12-09
Revision:
1:03cb3b25065c
Parent:
0:303ad425d2ac
Child:
2:98f6cc48ca3a

File content as of revision 1:03cb3b25065c:

#include "mbed.h"
#include "stdio.h"
#include "stdlib.h"
#include "time.h"


Serial pc(SERIAL_TX, SERIAL_RX);
Serial device(PA_9,PA_10);
//Serial dir(PA_10);
int main(){

    char c;    
    //clock_t start = clock();
     
    while(9600) {
        c = device.getc();
    if(c - '0')
    {
      pc.printf("1\r\n");  
    }
    else
    {
      pc.printf("0\r\n"); 
    }
    }
    /*
    clock_t end = clock();
    const double time = static_cast<double>(end-start) / CLOCKS_PER_SEC;
    printf("time %lf[s]\n",time);
    */
    return 0;
    
}