E_paper, E_ink, Screen size 1.54", resolution 200x200, 4 wire spi, Waveshare, Black and White, Kl25Z, 8 wire print connector, supply 3.3 Volt, IL0373 Controller, font size is 8, 12, 16 and 24.

Dependencies:   mbed

Revision:
7:25cadf37fd86
Parent:
6:469fb6b0d26d
Child:
8:01db118d1694
--- a/epd1in54.cpp	Wed Mar 28 09:21:33 2018 +0000
+++ b/epd1in54.cpp	Wed Mar 28 10:17:33 2018 +0000
@@ -24,12 +24,10 @@
  * THE SOFTWARE.
  */
 
-#ifndef MBED_H_
-#define MBED_H_
-#include "mbed.h"
-#endif
 #include "epd1in54.h"
 
+extern Serial pc;
+
 Epd::~Epd() {
 };
 
@@ -199,12 +197,19 @@
  *          this won't update the display.
  */
 void Epd::ClearFrameMemory(unsigned char color) {
+     pc.printf("width= %d, height %d\n\r",this->width ,this->height);
+     
     SetMemoryArea(0, 0, this->width - 1, this->height - 1);
+      pc.printf("setpointer \n\r");
     SetMemoryPointer(0, 0);
+       pc.printf("send command \n\r");
     SendCommand(WRITE_RAM);
+    
     /* send the color data */
+     pc.printf("Write to memory\r\n");
     for (int i = 0; i < this->width / 8 * this->height; i++) {
         SendData(color);
+         pc.printf("color= %x ,", color);
     }
 }
 
@@ -242,7 +247,9 @@
  *  @brief: private function to specify the start point for data R/W
  */
 void Epd::SetMemoryPointer(int x, int y) {
+    
     SendCommand(SET_RAM_X_ADDRESS_COUNTER);
+    
     /* x point must be the multiple of 8 or the last 3 bits will be ignored */
     SendData((x >> 3) & 0xFF);
     SendCommand(SET_RAM_Y_ADDRESS_COUNTER);