SSD1306 LCD 96x16 model

Dependents:   testSoftware8_alles_display

Fork of ssd1306_library by Miguel Angel Rodriguez Jodar

Files at this revision

API Documentation at this revision

Comitter:
mikevd1
Date:
Mon Sep 17 11:26:40 2018 +0000
Parent:
12:42a98fa363b4
Commit message:
bitMap aanpassing

Changed in this revision

ssd1306.cpp Show annotated file Show diff for this revision Revisions of this file
ssd1306.h Show annotated file Show diff for this revision Revisions of this file
diff -r 42a98fa363b4 -r e52c5cb758ca ssd1306.cpp
--- a/ssd1306.cpp	Wed Sep 12 11:09:35 2018 +0000
+++ b/ssd1306.cpp	Mon Sep 17 11:26:40 2018 +0000
@@ -464,44 +464,27 @@
         redraw();
 }
 
-void SSD1306::bitMap (char *bkground, bool refresh)
+void SSD1306::bitMap (bool refresh)
 {    
-    int i;
-    static int l = 3 ; 
-
-    if (!bkground) 
+    const unsigned char nunu_logonewDisplay [] = {
+    0x00, 0x00, 0xF0, 0xF8, 0xFC, 0xFC, 0xFC, 0xFC, 0x3C, 0x1C, 0x1E, 0x1E, 0x1C, 0x3C, 0xFC, 0xFC,
+    0xFC, 0xF8, 0xF8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFC, 0xFE, 0xFE, 0xFC, 0xFC,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xFC, 0xFC, 0xFE, 0xFC, 0xFC, 0xD8, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x40, 0x50, 0xE0, 0xA8, 0x54, 0xA8, 0x14, 0x14, 0x08, 0x08, 0x1C, 0x04, 0x98,
+    0xA8, 0x58, 0xE0, 0xA8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x54, 0x58, 0xAC,
+    0xD8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xA4, 0x78, 0x54, 0xA8, 0x50, 0x00, 0x00,
+    0x00, 0x02, 0x3F, 0x7F, 0x3F, 0x7F, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x3F,
+    0x3F, 0x7F, 0x3F, 0x3F, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x1F, 0x3F, 0x3F, 0x3F,
+    0x7E, 0x38, 0x78, 0x78, 0x78, 0x38, 0x7E, 0x3F, 0x3F, 0x3F, 0x1F, 0x0F, 0x06, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x02, 0x1D, 0x2A, 0x39, 0x15, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x1B, 0x24, 0x19, 0x2E, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x06, 0x15, 0x1A,
+    0x16, 0x28, 0x18, 0x20, 0x38, 0x10, 0x18, 0x28, 0x36, 0x19, 0x14, 0x0B, 0x0A, 0x03, 0x00, 0x00
+    };
+    
+    int i;    
+    for (i=0; i<192; i++)
     {
-        for (i=0; i<1024; i++)
-        {
-            if ( l == 0)
-            {
-                //fb[i] = nunu_logo0[i];
-            }
-            else if ( l == 1)
-            {
-                //fb[i] = nunu_logo1[i];
-            }
-            else if ( l == 2)
-            {
-                //fb[i] = nunu_logo2[i];
-            }
-            else
-            {
-                //fb[i] = nunu_logo3[i];
-            }
-            if ( l == 4 )
-            {
-                l = 0 ;  
-            }                      
-        }
-    }
-    else 
-    {
-        for (i=0; i<1024; i++)
-        {
-            //fb[i] = nunu_logo1[i];
-        }
-            
+        fb[i] = nunu_logonewDisplay[i];
     }
     idxfb = 0;
     if (refresh)
diff -r 42a98fa363b4 -r e52c5cb758ca ssd1306.h
--- a/ssd1306.h	Wed Sep 12 11:09:35 2018 +0000
+++ b/ssd1306.h	Mon Sep 17 11:26:40 2018 +0000
@@ -223,7 +223,7 @@
      * @param bkground If not NULL, should point to a 1024 byte buffer with the image to load to the display
      * @param refresh (optional) Force an actual screen redraw after the operation
      */
-    void bitMap (char *bkground=NULL, bool refresh=false);
+    void bitMap (bool refresh=false);
     
     /**
      * Plots a pixel.