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 myUSBHost AvailableMemory
Dependents: mbed_TANK_Kinect myBlueUSB_ros ftusbClass
Diff: Utils.cpp
- Revision:
- 1:0dde58e0cccf
- Parent:
- 0:81ed8b6e4a8b
- Child:
- 2:0118da9e5169
--- a/Utils.cpp Mon Apr 04 16:41:03 2011 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-
-
-#include "mbed.h"
-#include "Utils.h"
-
-void printfBytes(const char* s, const u8* data, int len)
-{
- printf("%s %d:",s,len);
- if (len > 256)
- len = 256;
- while (len-- > 0)
- printf(" %02X",*data++);
- printf("\n");
-}
-
-void printHexLine(const u8* d, int addr, int len)
-{
- printf("%04X ",addr);
- int i;
- for (i = 0; i < len; i++)
- printf("%02X ",d[i]);
- for (;i < 16; i++)
- printf(" ");
- char s[16+1];
- memset(s,0,sizeof(s));
- for (i = 0; i < len; i++)
- {
- int c = d[i];
- if (c < 0x20 || c > 0x7E)
- c = '.';
- s[i] = c;
- }
- printf("%s\n",s);
-}
-
-void printHex(const u8* d, int len)
-{
- int addr = 0;
- while (len)
- {
- int count = len;
- if (count > 16)
- count = 16;
- printHexLine(d+addr,addr,count);
- addr += 16;
- len -= count;
- }
-}