This is just a copy of the example on the https://os.mbed.com/docs/mbed-os/v6.15/apis/serial-uart-apis.html built for the bluepill

Auto generated API documentation and code listings for serial_echo

Code

main.cpp [code]