EPD display library.

Dependents:   acd52832_ePaper acd52832_SAADC_Differential_input_2 acd52832_SAADC_Differential_input_EPD acd52832_Car_battery_ch ... more

Fork of GDEP015OC1 by aconno dev team

Revision:
9:9c1a15bd5ef1
Parent:
8:5ae728fa8820
Child:
10:eeb4adb54689
--- a/GDEP015OC1.cpp	Wed Feb 22 07:52:45 2017 +0000
+++ b/GDEP015OC1.cpp	Mon Mar 13 09:45:26 2017 +0000
@@ -1,5 +1,6 @@
 /**
  *  Created by Filip Hormot (f.hormot@gmail.com) on 14/09/16.
+ *  Edited by Jurica Resetar on 10/3/17.
  */
 #include "mbed.h"
 #include "GDEP015OC1.h"
@@ -43,6 +44,7 @@
     empty();    
 }
 
+
 void GDEP015OC1::_wakeUp(bool partial){
     _rst = 0;
     wait_ms(EPD_WAIT_CONSTANT);
@@ -52,53 +54,42 @@
     //Stage 3
     //Driver Output control
     _spiCommand(0x01);
-    _spiData(0xC7);
-    _spiData(0x00);
-    _spiData(0x00);
+    _spiData(0xC7);     // (yDot-1)%256
+    _spiData(0x00);     // (yDot-1)/256
+    _spiData(0x00);     // 0x00
+    
     //Softstart
     _spiCommand(0x0C);
     _spiData(0xD7);
     _spiData(0xD6);
     _spiData(0x9D);
 
-    _spiCommand(0x22);
-    _spiData(0xF0);
-
     //VCOM setting
     _spiCommand(0x2C);
     _spiData(0xA8);
+    
     //Dummy line period
     _spiCommand(0x3A);
     _spiData(0x1A);
-    //Gate line width
+    
+    //Gate line width // 2us per line
     _spiCommand(0x3B);
     _spiData(0x08);
+    
     //Set data entry mode
     _spiCommand(0x11);
     _spiData(0x01); //DO NOT TOUCH THIS! (MUST BE 0x01)
 
-    //Gate driver start position
-    _spiCommand(0x0F);
-    _spiData(0x2B);
-    _spiData(0x01);
-
-    //VGH VGL
-    _spiCommand(0x03);
-    _spiData(0x00);
-    //VSH, VSL
-    _spiCommand(0x04);
-    _spiData(0x0A);
-
     //Define X display size
     _spiCommand(0x44);
     _spiData(0x00);
-    _spiData(0x18);
+    _spiData(0x18);     //(xDot-1)/8
     //Define Y display size
     _spiCommand(0x45);
-    _spiData(0xC7);
-    _spiData(0x00);
-    _spiData(0x2B);
-    _spiData(0x01);
+    _spiData(0xC7);     //(yDot-1)%256
+    _spiData(0x00);     //(yDot-1)/256
+    _spiData(0x00);     // Was 0x2B
+    _spiData(0x00);     // Was 0x01
 
     //Define X RAM address
     _spiCommand(0x4E);
@@ -108,10 +99,6 @@
     _spiData(0xC7);
     _spiData(0x00);
 
-    //Border waveform control
-    _spiCommand(0x3C);
-    _spiData(0x33);
-
     //Write LUT
     _spiCommand(0x32);
     if(partial){
@@ -123,18 +110,6 @@
             _spiData(_lutFull[i]);
         }
     }
-
-    //Power on
-    _spiCommand(0x22);
-    _spiData(0xC0);
-
-    //Define X RAM address
-    _spiCommand(0x4E);
-    _spiData(0x00);
-    //Define Y RAM address
-    _spiCommand(0x4F);
-    _spiData(0xC7);
-    _spiData(0x00);
 }
 
 void GDEP015OC1::_sleep(void){