Simon Knez / Mbed 2 deprecated Nucleo_UART

Dependencies:   mbed

Committer:
Simon_
Date:
Wed Feb 10 09:48:50 2021 +0000
Revision:
0:34e36cf49880
Virtual COM port test code

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Simon_ 0:34e36cf49880 1 #include "mbed.h"
Simon_ 0:34e36cf49880 2
Simon_ 0:34e36cf49880 3 //------------------------------------
Simon_ 0:34e36cf49880 4 // Hyperterminal configuration
Simon_ 0:34e36cf49880 5 // 9600 bauds, 8-bit data, no parity
Simon_ 0:34e36cf49880 6 //------------------------------------
Simon_ 0:34e36cf49880 7
Simon_ 0:34e36cf49880 8 Serial pc(SERIAL_TX, SERIAL_RX);
Simon_ 0:34e36cf49880 9
Simon_ 0:34e36cf49880 10 DigitalOut myled(LED1);
Simon_ 0:34e36cf49880 11
Simon_ 0:34e36cf49880 12 int main()
Simon_ 0:34e36cf49880 13 {
Simon_ 0:34e36cf49880 14 int i = 1;
Simon_ 0:34e36cf49880 15 pc.printf("Hello World !\n");
Simon_ 0:34e36cf49880 16 while(1) {
Simon_ 0:34e36cf49880 17 wait(1);
Simon_ 0:34e36cf49880 18 pc.printf("This program runs since %d seconds.\n", i++);
Simon_ 0:34e36cf49880 19 myled = !myled;
Simon_ 0:34e36cf49880 20 }
Simon_ 0:34e36cf49880 21 }