István Cserny
/
Lab05_serial_test
Revision 0:dae7360f58d4, committed 2021-12-16
- Comitter:
- cspista
- Date:
- Thu Dec 16 12:34:37 2021 +0000
- Commit message:
- Final version
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Dec 16 12:34:37 2021 +0000 @@ -0,0 +1,12 @@ +#include "mbed.h" + +Serial pc(USBTX,USBRX); //UART via ST-Link + +int main() +{ + pc.printf("\r\nWelcome to NUCLEO-F446RE board!\r\n"); + while(1) { + char c = pc.getc(); //Read one character + pc.printf("received char: %c = %d\r\n",c,c); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Dec 16 12:34:37 2021 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file