An embedded device

Dependencies:   Crypto

Files at this revision

API Documentation at this revision

Comitter:
tanyuzhuo
Date:
Tue Mar 12 15:42:01 2019 +0000
Parent:
14:0481b606d10e
Child:
16:10d53b056b17
Commit message:
fixed truncation error (formatting issues)

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Thu Mar 07 00:57:37 2019 +0000
+++ b/main.cpp	Tue Mar 12 15:42:01 2019 +0000
@@ -104,7 +104,7 @@
             receivedKey = strtoull(command, NULL, 16);
             //receivedKey = 2147483648;
             //sscanf(command, "%d", &receivedKey);
-            pc.printf("Received key: %d\n\r", receivedKey);
+            pc.printf("Received key: %016llx\n\r", receivedKey);
             memset(command, 0, sizeof(command));
             newKey_mutex.lock();
             newKey = receivedKey;
@@ -207,7 +207,7 @@
             }
             if ((unsigned) t.read() == currentTime) {
                  //pc.printf("Hash rate: %d\n\r", i - currentCount);
-                 pc.printf("Current key: %016x\n\r", *key);
+                 pc.printf("Current key: %016llx\n\r", *key);
                  currentTime++;
                  currentCount = i;
             }