Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of C12832 by
Diff: C12832_lcd.cpp
- Revision:
 - 1:66dd8afbfd06
 - Parent:
 - 0:4bbc531be6e2
 - Child:
 - 2:bdc53502af17
 
--- a/C12832_lcd.cpp	Tue Oct 16 14:05:57 2012 +0000
+++ b/C12832_lcd.cpp	Tue Oct 16 17:50:37 2012 +0000
@@ -44,7 +44,7 @@
 }
 
 
-void C12832_LCD::set_orientation(unsigned int o)
+/*void C12832_LCD::set_orientation(unsigned int o)
 {
     orientation = o;
     switch (o) {
@@ -67,6 +67,8 @@
     }
 }
 
+*/
+
 void C12832_LCD::invert(unsigned int o)
 {
     if(o == 0) wr_cmd(0xA6);
@@ -76,10 +78,16 @@
 
 void C12832_LCD::set_contrast(unsigned int o)
 {
+    contrast = o;
     wr_cmd(0x81);      //  set volume
     wr_cmd(o & 0x2F);
 }
 
+unsigned int C12832_LCD::get_contrast(void)
+{
+    return(contrast);
+}
+
 
 // write command to lcd controller
 
@@ -130,7 +138,7 @@
 
     wr_cmd(0x22);   //  voltage resistor ratio
     wr_cmd(0x2F);   //  power on
-    wr_cmd(0xA4);   //  LCD display ram
+    //wr_cmd(0xA4);   //  LCD display ram
     wr_cmd(0x40);   // start line = 0
     wr_cmd(0xAF);     // display ON
 
    