KSM edits to RA8875

Dependents:   Liz_Test_Code

Revision:
121:6bc4911f5e55
Parent:
120:be2aaa3adf72
Child:
136:224e03d5c31f
--- a/GraphicsDisplayJPEG.cpp	Mon May 16 22:31:13 2016 +0000
+++ b/GraphicsDisplayJPEG.cpp	Tue May 17 22:05:43 2016 +0000
@@ -22,7 +22,7 @@
 
 #include "GraphicsDisplay.h"
 
-#define DEBUG "JPEG"
+//#define DEBUG "JPEG"
 // ...
 // INFO("Stuff to show %d", var); // new-line is automatically appended
 //
@@ -36,7 +36,7 @@
     char buf[100] = "0000: ";
 
     if (*title)
-        INFO("%s", title);
+        INFO("%s @%p", title, p);
     for (i=0; i<count; ) {
         sprintf(buf + strlen(buf), "%02X ", *(p+i));
         if ((++i & 0x0F) == 0x00) {
@@ -242,7 +242,7 @@
     uint16_t hc, *ph;
 
     INFO("create_huffman_tbl(%p,%p,%d)", jd, data, ndata);
-    HexDump("JDEC", (uint8_t *)jd, sizeof(JDEC));
+    HexDump("JDEC - create_huffman_tbl entry", (uint8_t *)jd, sizeof(JDEC));
     while (ndata) { /* Process all tables in the segment */
         if (ndata < 17) return JDR_FMT1;    /* Err: wrong data size */
         ndata -= 17;
@@ -294,6 +294,7 @@
         }
     }
 
+    HexDump("JDEC - create_huffman_tbl exit", (uint8_t *)jd, sizeof(JDEC));
     return JDR_OK;
 }
 
@@ -896,7 +897,7 @@
     JRESULT rc;
 
     INFO("jd_prepare(%p,%p,%p,%d,%p)", jd, infunc, pool, sz_pool, dev);
-    HexDump("JDEC", (uint8_t *)jd, sizeof(JDEC));
+    HexDump("JDEC 1", (uint8_t *)jd, sizeof(JDEC));
 
     if (!pool) {
         ERR("JDR_PAR");
@@ -918,12 +919,14 @@
         }
     }
     for (i = 0; i < 4; i++) jd->qttbl[i] = 0;
+    HexDump("JDEC 2", (uint8_t *)jd, sizeof(JDEC));
 
     jd->inbuf = seg = (uint8_t *)alloc_pool(jd, JD_SZBUF);     /* Allocate stream input buffer */
     if (!seg) {
         ERR("JDR_MEM1");
         return JDR_MEM1;
     }
+    HexDump("JDEC 3", (uint8_t *)jd, sizeof(JDEC));
 
     if (getJpegData(jd, seg, 2) != 2) {
         ERR("JDR_INP");