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:
9:9503e1ff98ea
Parent:
8:01db118d1694
--- a/epd1in54.cpp	Thu Mar 29 18:27:28 2018 +0000
+++ b/epd1in54.cpp	Sat Mar 31 08:36:11 2018 +0000
@@ -98,9 +98,7 @@
  */
 void Epd::WaitUntilIdle(void)
 {
-    pc.printf("Wait for idle Busy pin goes low \n\r");
     while(DigitalRead(busy_pin_no) == HIGH) {      //LOW: idle, HIGH: busy
-    pc.printf(".");
         DelayMs(100);
     }
 }
@@ -112,7 +110,6 @@
  */
 void Epd::Reset(void)
 {
-    pc.printf("Reset...  \n\r");
     DigitalWrite(reset_pin_no, LOW);                //module reset
     DelayMs(200);
     DigitalWrite(reset_pin_no, HIGH);
@@ -124,7 +121,6 @@
  */
 void Epd::SetLut(const unsigned char* lut)
 {
-    pc.printf("Set LUT \n\r");
     this->lut = lut;
     SendCommand(WRITE_LUT_REGISTER);
     /* the length of look-up table is 30 bytes */
@@ -144,8 +140,6 @@
     int x_end;
     int y_end;
 
-    pc.printf("SetFrameMemory regel 141\n\r");
-
     if (
         image_buffer == NULL ||
         x < 0 || image_width < 0 ||
@@ -196,14 +190,11 @@
  */
 void Epd::SetFrameMemory(const unsigned char* image_buffer)
 {
-    pc.printf("SetFrameMemory \n\r");
-
     SetMemoryArea(0, 0, this->width - 1, this->height - 1);
     SetMemoryPointer(0, 0);
     SendCommand(WRITE_RAM);
     /* send the image data */
     for (int i = 0; i < this->width / 8 * this->height; i++) {
-        //SendData(pgm_read_byte(&image_buffer[i]));
         SendData(*(&image_buffer[i]));
     }
 }
@@ -214,19 +205,13 @@
  */
 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);
     }
 }
 
@@ -239,7 +224,6 @@
  */
 void Epd::DisplayFrame(void)
 {
-    pc.printf("DisplayFrame \n\r");
     SendCommand(DISPLAY_UPDATE_CONTROL_2);
     SendData(0xC4);
     SendCommand(MASTER_ACTIVATION);
@@ -252,7 +236,6 @@
  */
 void Epd::SetMemoryArea(int x_start, int y_start, int x_end, int y_end)
 {
-    pc.printf("SetMemoryArea \n\r");
     SendCommand(SET_RAM_X_ADDRESS_START_END_POSITION);
     /* x point must be the multiple of 8 or the last 3 bits will be ignored */
     SendData((x_start >> 3) & 0xFF);
@@ -269,7 +252,6 @@
  */
 void Epd::SetMemoryPointer(int x, int y)
 {
-    pc.printf("SetMemoryPointer \n\r");
     SendCommand(SET_RAM_X_ADDRESS_COUNTER);
 
     /* x point must be the multiple of 8 or the last 3 bits will be ignored */
@@ -277,9 +259,7 @@
     SendCommand(SET_RAM_Y_ADDRESS_COUNTER);
     SendData(y & 0xFF);
     SendData((y >> 8) & 0xFF);
-    pc.printf("WaitUntilidle \n\r");
     WaitUntilIdle();
-    pc.printf("Done SetMemoryPointer \n\r");
 }
 
 /**