Add missing undefined symbols to be sure to use mine

Dependents:   DS130x_I2CApp MCP41xxxApp FM24Vxx_I2CApp MCP320xApp ... more

Files at this revision

API Documentation at this revision

Comitter:
Yann
Date:
Fri Dec 10 08:05:46 2010 +0000
Parent:
6:14a596126adf
Child:
8:ce74b6c101b9
Commit message:
V0.0.0.8

Changed in this revision

Debug.cpp Show annotated file Show diff for this revision Revisions of this file
Debug.h Show annotated file Show diff for this revision Revisions of this file
--- a/Debug.cpp	Thu Dec 09 09:28:06 2010 +0000
+++ b/Debug.cpp	Fri Dec 10 08:05:46 2010 +0000
@@ -3,7 +3,7 @@
 
 #ifdef __DEBUG
 
-#define __LINE_LENGTH__ 91
+#define __LINE_LENGTH__ 93
 
 void DebugHelper::Debug(const char* p_format, ...) {
   va_list argp;
@@ -21,11 +21,12 @@
     // Display header
     printf(" HEX | 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F  : 0 1 2 3 4 5 6 7 8 9 A B C D E F \r\n");
     printf("-----|+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+-:--+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\r\n");
-    //      0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+    //      01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901 2
     //      0         1         2         3         4         5         6         7         8         9
     // Address offset padding
-    char line[__LINE_LENGTH__];
+    char line[__LINE_LENGTH__ + 1];
     memset(line, 0x20, __LINE_LENGTH__);
+    line[__LINE_LENGTH__] = 0x00; // NULL character
     sprintf(line, "%04x |", (unsigned short)startAddress);
     line[6] = 0x20; // Remove NULL character added by sprintf
     int idx = 0;
@@ -51,8 +52,8 @@
         }
         // Display the line
         line[56] = ':';
-        line[__LINE_LENGTH__ - 2] = 0x0d;
-        line[__LINE_LENGTH__ - 1] = 0x0a;    
+        line[__LINE_LENGTH__ - 1] = 0x0d;
+        line[__LINE_LENGTH__] = 0x0a;    
         printf(line);
         if (currentIdx < endOfDump) { // Prepare next line, one line = 16 digits
             startAddress += 16;
--- a/Debug.h	Thu Dec 09 09:28:06 2010 +0000
+++ b/Debug.h	Fri Dec 10 08:05:46 2010 +0000
@@ -72,7 +72,7 @@
 
 #ifdef __DEBUG
 
-/** This class implements debug functionalities based on USB console interface. V0.0.0.7
+/** This class implements debug functionalities based on USB console interface. V0.0.0.8
  *
  * Note that this class is based on Helper pattern
  */