Basic library for SHARP LCD LS027B4DH01/LS027B7DH01

Dependents:   AkiSpiLcd_demo AkiSpiLcd_demo2 LCDRAM AkiSpiLcd_example

Files at this revision

API Documentation at this revision

Comitter:
k4zuki
Date:
Mon Jan 12 12:04:01 2015 +0000
Parent:
15:704dd6e688ab
Child:
17:3b47e5044518
Commit message:
[ NEW ] ram2lcd( int screen )

Changed in this revision

AkiSpiLcd.cpp Show annotated file Show diff for this revision Revisions of this file
AkiSpiLcd.h Show annotated file Show diff for this revision Revisions of this file
--- a/AkiSpiLcd.cpp	Mon Jan 12 11:46:46 2015 +0000
+++ b/AkiSpiLcd.cpp	Mon Jan 12 12:04:01 2015 +0000
@@ -254,6 +254,16 @@
     cominvert();
 }
 
+/** copies whole data in screen into LCD
+*/
+void AkiSpiLcd::ram2lcd(int screen)
+{
+    uint8_t lineBuffer[RAMLINE_LENGTH];
+    for (int y = 0; y < 240; y++) {
+        ram_read(y * RAMLINE_LENGTH+2,lineBuffer,RAMLINE_LENGTH);
+        directUpdateSingle(y + 1,lineBuffer);
+    }
+}
 uint8_t AkiSpiLcd::ram_read(int address)
 {
     _ram_prepareCommand(READ, address);
--- a/AkiSpiLcd.h	Mon Jan 12 11:46:46 2015 +0000
+++ b/AkiSpiLcd.h	Mon Jan 12 12:04:01 2015 +0000
@@ -148,10 +148,17 @@
     void ramWriteMultiLine(int startline, int length, uint8_t* data, int screen);
 
     /** copies whole data in screen into LCD
+    * @param startline starting line number(1-240)
+    * @param length number of line to read
     * @param screen screen to copy (0 or 1)
     */
     void ram2lcd(int startline, int length, int screen);
 
+    /** copies whole data in screen into LCD
+    * @param screen screen to copy (0 or 1)
+    */
+    void ram2lcd(int screen);
+
     /** read a byte from SRAM (copied from Ser23K256)
     * @param address    The address to read from
     * @return the character at that address