FormazioneSitael / Mbed 2 deprecated TesysRail_Rev_FINALE

Dependencies:   mbed

Revision:
2:0db92723d44f
Parent:
1:fa70127b3381
Child:
3:307e8b3d4968
--- a/main.cpp	Mon Nov 30 14:44:32 2015 +0000
+++ b/main.cpp	Mon Feb 10 11:56:18 2020 +0000
@@ -8,7 +8,7 @@
 #endif
 
 namespace {
-    Serial pc(SERIAL_TX, SERIAL_RX);
+    Serial pc(USBTX, USBRX);
     
     //STM32F411.C/E(DM00119316.pdf p.43 Table 4)
     const struct {
@@ -85,18 +85,26 @@
         HAL_FLASH_Lock();
     }
     
-    const uint8_t *getFlash(int sector) { return (const uint8_t *)FLASH_SECTOR[sector].addr; }
+    const uint8_t *getFlash(int sector) {
+         return (const uint8_t *)FLASH_SECTOR[sector].addr; }
 }
 
 
 
 int main()
 {
-    uint8_t str[] = "Hello.";
+    
+    uint8_t str[] = "t:hh:mm:Ss;P=19.2;B=3.2;O=3.1";
+    
     
     DEBUG_PRINTF("%s\n", str);
     
-    programByte(7, str, sizeof(str));
+    programByte(4, str, sizeof(str));
+    while(true)
+    {
+        DEBUG_PRINTF("success[%s]\n\r", getFlash(4));
+        DEBUG_PRINTF("success[%s]\n\r", getFlash(7));
+        wait(4);
+    }
     
-    DEBUG_PRINTF("success[%s]\n", getFlash(7));
 }