KSM edits to RA8875

Dependents:   Liz_Test_Code

Revision:
149:c62c4b2d6a15
Parent:
148:33e99de1aca6
Child:
150:35a4db3081c1
--- a/RA8875.cpp	Tue Jun 13 23:12:26 2017 +0000
+++ b/RA8875.cpp	Sun Aug 06 17:05:54 2017 +0000
@@ -404,7 +404,7 @@
         wait_us(POLLWAITuSec);
         // COUNTIDLETIME(POLLWAITuSec);     // As it is voluntary to call the getc and pend. Don't tally it.
         if (idle_callback) {
-            if (external_abort == (*idle_callback)(getc_wait)) {
+            if (external_abort == (*idle_callback)(getc_wait, 0)) {
                 return 0;
             }
         }
@@ -673,7 +673,7 @@
         wait_us(POLLWAITuSec);
         COUNTIDLETIME(POLLWAITuSec);
         if (idle_callback) {
-            if (external_abort == (*idle_callback)(status_wait)) {
+            if (external_abort == (*idle_callback)(status_wait, 0)) {
                 return false;
             }
         }
@@ -695,7 +695,7 @@
         wait_us(POLLWAITuSec);
         COUNTIDLETIME(POLLWAITuSec);
         if (idle_callback) {
-            if (external_abort == (*idle_callback)(command_wait)) {
+            if (external_abort == (*idle_callback)(command_wait, 0)) {
                 return false;
             }
         }
@@ -2132,6 +2132,10 @@
         // Read the display from the last line toward the top
         // so we can write the file in one pass.
         for (int j = h - 1; j >= 0; j--) {
+            if (idle_callback) {
+                (*idle_callback)(progress, (h - 1 - j) * 100 / (h - 1));
+            }
+
             if (ltpr0 >= 2)             // Need to combine the layers...
                 SelectDrawingLayer(0);  // so read layer 0 first
             // Read one line of pixels to a local buffer
@@ -2303,6 +2307,10 @@
         // Read the display from the last line toward the top
         // so we can write the file in one pass.
         for (int j = h - 1; j >= 0; j--) {
+            if (idle_callback) {
+                (*idle_callback)(progress, (h - 1 - j) * 100 / (h - 1));
+            }
+
             if (ltpr0 >= 2)             // Need to combine the layers...
                 SelectDrawingLayer(0);  // so read layer 0 first
             // Read one line of pixels to a local buffer