Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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; }