Add missing undefined symbols to be sure to use mine

Dependents:   DS130x_I2CApp MCP41xxxApp FM24Vxx_I2CApp MCP320xApp ... more

Revision:
5:7ddb6bca6d01
Parent:
4:d03fcf494eb6
Child:
6:14a596126adf
--- a/Debug.cpp	Wed Dec 08 13:16:16 2010 +0000
+++ b/Debug.cpp	Wed Dec 08 13:33:24 2010 +0000
@@ -3,6 +3,8 @@
 
 #ifdef __DEBUG
 
+#define __LINE_LENGTH__ 91
+
 void DebugHelper::Debug(const char* p_format, ...) {
   va_list argp;
   
@@ -24,8 +26,8 @@
     //      0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
     //      0         1         2         3         4         5         6         7         8         9
     // Address offset padding
-    char line[91];
-    memset(line, 0x20, 91);
+    char line[__LINE_LENGTH__];
+    memset(line, 0x20, __LINE_LENGTH__);
     sprintf(line, "%04x |", (unsigned short)startAddress);
     line[6] = 0x20; // Remove NULL character added by sprintf
     int idx = 0;
@@ -51,12 +53,12 @@
         }
         // Display the line
         line[56] = ':';
-        line[89] = 0x0d;
-        line[90] = 0x0a;    
+        line[__LINE_LENGTH__ - 2] = 0x0d;
+        line[__LINE_LENGTH__ - 1] = 0x0a;    
         printf(line);
         if (currentIdx < endOfDump) { // Prepare next line, one line = 16 digits
             startAddress += 16;
-            memset(line, 0x20, 91);
+            memset(line, 0x20, __LINE_LENGTH__);
             sprintf(line, "%04x |", (unsigned short)startAddress);
             line[6] = 0x20; // Remove NULL character added by sprintf
             idx = 0;