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
Diff: main.cpp
- Revision:
- 4:15644c0e4310
- Parent:
- 3:aaeea2abc917
--- a/main.cpp Fri Dec 11 06:59:04 2020 +0000 +++ b/main.cpp Fri Dec 11 07:50:16 2020 +0000 @@ -4,19 +4,22 @@ Serial device(PA_9,PA_10); int main() { - + device.baud(9600); + pc.baud(921600); while(1) { char c = device.getc(); - if(c == 0xFE) { - pc.printf("%02hhx \n",c); + if(c == 0xfe) { + pc.printf("%02hhx ",c); while(1) { c = device.getc(); - if(c != 0xFD) - pc.printf("%02hhx \n",c); - else { - pc.printf("%02hhx \n",c); + if(c == 0xfd){ + pc.printf("%02hhx\r\n ",c); break; + } + else{ + pc.printf("%02hhx ",c); + } } }