doppler shift / Mbed 2 deprecated 0xXX_complete

Dependencies:   mbed

main.cpp

Committer:
ryouheitakamoto
Date:
2020-12-11
Revision:
3:aaeea2abc917
Parent:
2:98f6cc48ca3a
Child:
4:15644c0e4310

File content as of revision 3:aaeea2abc917:

#include "mbed.h"

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

    while(1) {
        char c = device.getc();

        if(c == 0xFE) {
            pc.printf("%02hhx \n",c);
            while(1) {
                c = device.getc();
                if(c != 0xFD)
                    pc.printf("%02hhx \n",c);
                else {
                    pc.printf("%02hhx \n",c);
                    break;
                }
            }
        }
    }
}