Brett Smith / Mbed 2 deprecated Nucleo_printf

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
brett_slab
Date:
Wed Oct 30 22:05:24 2019 +0000
Parent:
0:a97acec6e904
Commit message:
Fixed Timing;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Wed Oct 30 07:18:54 2019 +0000
+++ b/main.cpp	Wed Oct 30 22:05:24 2019 +0000
@@ -2,7 +2,7 @@
 
 #define PC_BAUD 115200
 
-Serial pc(PA_10, PA_9); //TX, RX
+Serial pc(SERIAL_TX, SERIAL_RX); //TX, RX
 
 DigitalOut myled(LED1);
 
@@ -13,7 +13,7 @@
     pc.baud(PC_BAUD);
     while(1) {
         wait(1);
-        pc.printf("This program runs since %d seconds.\n", i++);
+        pc.printf("%d\n", i++);
         myled = !myled;
     }
 }