Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed uniqueCPUID
Fork of frdm_print_unique_serial_number by
Revision 1:61ccbbc268f6, committed 2016-03-09
- Comitter:
- joeata2wh
- Date:
- Wed Mar 09 17:50:16 2016 +0000
- Parent:
- 0:eddce2241b50
- Child:
- 2:9ffb69ac065b
- Commit message:
- added lu specifier to avoid compiler warning in printf
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Mar 08 20:54:53 2016 +0000
+++ b/main.cpp Wed Mar 09 17:50:16 2016 +0000
@@ -39,7 +39,7 @@
void getUniqueIDAsStr(char *destStr)
{
unsigned long *Unique = uniqueSerialAddr;
- sprintf(destStr, "S%X%X%X\000", Unique[0], Unique[1], Unique[2]);
+ sprintf(destStr, "S%luX%luX%luX\000", Unique[0], Unique[1], Unique[2]);
}
@@ -72,7 +72,7 @@
{
pc.baud(9600);
unsigned long *Unique = uniqueSerialAddr;
- printf("Simple Serial# %08X %08X %08X\n", Unique[0], Unique[1], Unique[2]);
+ printf("Simple Serial# %08luX %08luX %08luX\n", Unique[0], Unique[1], Unique[2]);
char uniqueAsStr[33];
getUniqueIDAsStr(uniqueAsStr);
